一、移植
1.将驱动源文件em30713.c 添加到:
\kernel\drivers\input\misc\2.在此目录的makefile添加:
obj-$(CONFIG_SENSORS_EM30713) += em30713.o
3.在此目录的Kconfig添加:
config SENSORS_EM30713
tristate "Epticore EM30713 proximity and ambient light sensor"
depends on I2C=y
help
If you say yes here you get support for Epticore EM30713
proximity and ambient light sensor.
4.将驱动头文件em30713.h 添加到:
\kernel\include\linux\input\
5.在\kernel\arch\arm\configs\prj_hummer_q_defconfig添加:
CONFIG_SENSORS_EM30713=y
6.在\kernel\arch\arm\mach-msm\board-msm7627a-sensor.c添加:
1)头文件包含
#ifdef CONFIG_SENSORS_EM30713
#include <linux/input/em30713.h>
#endif3
2)向I2C注册设备
定义static struct i2c_board_info ps_als_i2c_info[] __in