在添加触屏驱动的时候,提示下面的错误:
drivers/input/touchscreen/s3c2410_ts.c: In function 's3c2410_ts_connect':
drivers/input/touchscreen/s3c2410_ts.c:38: error: implicit declaration of function 's3c2410_gpio_cfgpin'
drivers/input/touchscreen/s3c2410_ts.c: In function 'touch_timer_fire':
drivers/input/touchscreen/s3c2410_ts.c:89: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:89: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c: In function 'stylus_action':
drivers/input/touchscreen/s3c2410_ts.c:143: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:143: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:172:67: warning: backslash and newline separated by space
drivers/input/touchscreen/s3c2410_ts.c: In function 's3c2410ts_init':
drivers/input/touchscreen/s3c2410_ts.c:175: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:175: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:187: warning: left shift count >= width of type
make[3]: *** [drivers/input/touchscreen/s3c2410_ts.o] 错误 1
make[2]: *** [drivers/input/touchscreen] 错误 2
make[1]: *** [drivers/input] 错误 2
make: *** [drivers] 错误 2
解决办法:
添加一个头文件为#include <linux/gpio.h>
因为在2.6.32内核中,s3c2410_gpio_cfgpin是在include/linux/gpio.h中定义的,所以要添加#include <linux/gpio.h>