From 4d66cbb27b036fbe29c4c65fdb125f974119d277 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=94=A1=E6=9E=AB?= Date: Mon, 27 Jun 2011 11:48:04 +0800 Subject: [PATCH] add 5 point touch, close cs42l52 log for newton --- arch/arm/mach-rk29/board-rk29-newton.c | 181 ++----------------------- drivers/input/touchscreen/ft5406_ts.c | 2 +- drivers/rtc/Kconfig | 5 +- drivers/rtc/Makefile | 2 +- drivers/rtc/rtc-m41t66.c | 14 +- sound/soc/codecs/cs42l52.c | 2 +- sound/soc/rk29/rk29_cs42l52.c | 2 +- 7 files changed, 28 insertions(+), 180 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29-newton.c b/arch/arm/mach-rk29/board-rk29-newton.c index 18277814e336..e7a2e8256821 100755 --- a/arch/arm/mach-rk29/board-rk29-newton.c +++ b/arch/arm/mach-rk29/board-rk29-newton.c @@ -58,12 +58,12 @@ #ifdef CONFIG_VIDEO_RK29 /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ -#define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5642 /* back camera sensor */ -#define CONFIG_SENSOR_IIC_ADDR_0 0x78 +#define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV2655 /* back camera sensor */ +#define CONFIG_SENSOR_IIC_ADDR_0 0//0x60 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 1 #define CONFIG_SENSOR_POWER_PIN_0 INVALID_GPIO #define CONFIG_SENSOR_RESET_PIN_0 INVALID_GPIO -#define CONFIG_SENSOR_POWERDN_PIN_0 RK29_PIN6_PB7 +#define CONFIG_SENSOR_POWERDN_PIN_0 RK29_PIN5_PD7 #define CONFIG_SENSOR_FALSH_PIN_0 INVALID_GPIO #define CONFIG_SENSOR_POWERACTIVE_LEVEL_0 RK29_CAM_POWERACTIVE_L #define CONFIG_SENSOR_RESETACTIVE_LEVEL_0 RK29_CAM_RESETACTIVE_L @@ -396,78 +396,6 @@ static struct platform_device rk29_v4l2_output_devce = { .name = "rk29_vout", }; #endif -/*HANNSTAR_P1003 touch*/ -#if defined (CONFIG_HANNSTAR_P1003) -#define TOUCH_RESET_PIN RK29_PIN6_PC3 -#define TOUCH_INT_PIN RK29_PIN0_PA2 - -int p1003_init_platform_hw(void) -{ - if(gpio_request(TOUCH_RESET_PIN,NULL) != 0){ - gpio_free(TOUCH_RESET_PIN); - printk("p1003_init_platform_hw gpio_request error\n"); - return -EIO; - } - - if(gpio_request(TOUCH_INT_PIN,NULL) != 0){ - gpio_free(TOUCH_INT_PIN); - printk("p1003_init_platform_hw gpio_request error\n"); - return -EIO; - } - gpio_pull_updown(TOUCH_INT_PIN, 1); - gpio_direction_output(TOUCH_RESET_PIN, 0); - msleep(500); - gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW); - msleep(500); - gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH); - - return 0; -} - - -struct p1003_platform_data p1003_info = { - .model= 1003, - .init_platform_hw= p1003_init_platform_hw, - -}; -#endif -#if defined (CONFIG_EETI_EGALAX) -#define TOUCH_RESET_PIN RK29_PIN6_PC3 -#define TOUCH_INT_PIN RK29_PIN0_PA2 - -static int EETI_EGALAX_init_platform_hw(void) -{ - if(gpio_request(TOUCH_RESET_PIN,NULL) != 0){ - gpio_free(TOUCH_RESET_PIN); - printk("p1003_init_platform_hw gpio_request error\n"); - return -EIO; - } - - if(gpio_request(TOUCH_INT_PIN,NULL) != 0){ - gpio_free(TOUCH_INT_PIN); - printk("p1003_init_platform_hw gpio_request error\n"); - return -EIO; - } - gpio_pull_updown(TOUCH_INT_PIN, 1); - gpio_direction_output(TOUCH_RESET_PIN, 0); - msleep(500); - gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW); - msleep(500); - gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH); - - return 0; -} - - -static struct eeti_egalax_platform_data eeti_egalax_info = { - .model= 1003, - .init_platform_hw= EETI_EGALAX_init_platform_hw, - .standby_pin = TOUCH_SCREEN_STANDBY_PIN, - .standby_value = TOUCH_SCREEN_STANDBY_VALUE, - .disp_on_pin = TOUCH_SCREEN_DISPLAY_PIN, - .disp_on_value = TOUCH_SCREEN_DISPLAY_VALUE, -}; -#endif #if defined (CONFIG_TOUCHSCREEN_FT5406) #define TOUCH_RESET_PIN RK29_PIN6_PC3 @@ -765,6 +693,14 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = { .platform_data = &cs42l52_info, }, #endif +#if defined (CONFIG_RTC_M41T66) + { + .type = "rtc-M41T66", + .addr = 0x68, + .flags = 0, + .irq = RK29_PIN0_PA1, + }, +#endif #if defined (CONFIG_BATTERY_STC3100) { .type = "stc3100", @@ -788,14 +724,6 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = { .irq = RK29_PIN0_PA1, }, #endif -#if defined (CONFIG_RTC_M41T66) - { - .type = "rtc-M41T62", - .addr = 0xd0>>1, - .flags = 0, - .irq = RK29_PIN0_PA1, - }, -#endif #if defined (CONFIG_GS_MMA8452) { .type = "gs_mma8452", @@ -860,13 +788,12 @@ static struct i2c_board_info __initdata board_i2c2_devices[] = { #if defined (CONFIG_EETI_EGALAX) { .type = "egalax_i2c", - .addr = 0x30, + .addr = 0x04, .flags = 0, .irq = RK29_PIN0_PA2, .platform_data = &eeti_egalax_info, }, #endif - #if defined (CONFIG_TOUCHSCREEN_FT5406) { .type ="ft5x0x_ts", @@ -886,7 +813,6 @@ static struct i2c_board_info __initdata board_i2c2_devices[] = { #endif }; - #endif #ifdef CONFIG_I2C3_RK29 @@ -1375,7 +1301,7 @@ static struct platform_device rk29sdk_rfkill = { #ifdef CONFIG_VIVANTE #define GPU_HIGH_CLOCK 552 -#define GPU_LOW_CLOCK 300 +#define GPU_LOW_CLOCK 288 /* same as general pll clock rate below */ static struct resource resources_gpu[] = { [0] = { .name = "gpu_irq", @@ -1693,89 +1619,8 @@ struct rk29xx_spi_platform_data rk29xx_spi1_platdata = { .io_resume_leakage_bug = spi_io_resume_leakage_bug, }; -/***************************************************************************************** - * xpt2046 touch panel - * author: cmc@rock-chips.com - *****************************************************************************************/ -#define XPT2046_GPIO_INT RK29_PIN0_PA3 -#define DEBOUNCE_REPTIME 3 - -#if defined(CONFIG_TOUCHSCREEN_XPT2046_320X480_SPI) -static struct xpt2046_platform_data xpt2046_info = { - .model = 2046, - .keep_vref_on = 1, - .swap_xy = 0, - .x_min = 0, - .x_max = 320, - .y_min = 0, - .y_max = 480, - .debounce_max = 7, - .debounce_rep = DEBOUNCE_REPTIME, - .debounce_tol = 20, - .gpio_pendown = XPT2046_GPIO_INT, - .penirq_recheck_delay_usecs = 1, -}; -#elif defined(CONFIG_TOUCHSCREEN_XPT2046_320X480_CBN_SPI) -static struct xpt2046_platform_data xpt2046_info = { - .model = 2046, - .keep_vref_on = 1, - .swap_xy = 0, - .x_min = 0, - .x_max = 320, - .y_min = 0, - .y_max = 480, - .debounce_max = 7, - .debounce_rep = DEBOUNCE_REPTIME, - .debounce_tol = 20, - .gpio_pendown = XPT2046_GPIO_INT, - .penirq_recheck_delay_usecs = 1, -}; -#elif defined(CONFIG_TOUCHSCREEN_XPT2046_SPI) -static struct xpt2046_platform_data xpt2046_info = { - .model = 2046, - .keep_vref_on = 1, - .swap_xy = 1, - .x_min = 0, - .x_max = 800, - .y_min = 0, - .y_max = 480, - .debounce_max = 7, - .debounce_rep = DEBOUNCE_REPTIME, - .debounce_tol = 20, - .gpio_pendown = XPT2046_GPIO_INT, - - .penirq_recheck_delay_usecs = 1, -}; -#elif defined(CONFIG_TOUCHSCREEN_XPT2046_CBN_SPI) -static struct xpt2046_platform_data xpt2046_info = { - .model = 2046, - .keep_vref_on = 1, - .swap_xy = 1, - .x_min = 0, - .x_max = 800, - .y_min = 0, - .y_max = 480, - .debounce_max = 7, - .debounce_rep = DEBOUNCE_REPTIME, - .debounce_tol = 20, - .gpio_pendown = XPT2046_GPIO_INT, - - .penirq_recheck_delay_usecs = 1, -}; -#endif static struct spi_board_info board_spi_devices[] = { -#if defined(CONFIG_TOUCHSCREEN_XPT2046_320X480_SPI) || defined(CONFIG_TOUCHSCREEN_XPT2046_320X480_CBN_SPI)\ - ||defined(CONFIG_TOUCHSCREEN_XPT2046_SPI) || defined(CONFIG_TOUCHSCREEN_XPT2046_CBN_SPI) - { - .modalias = "xpt2046_ts", - .chip_select = 0, - .max_speed_hz = 125 * 1000 * 26,/* (max sample rate @ 3V) * (cmd + data + overhead) */ - .bus_num = 0, - .irq = XPT2046_GPIO_INT, - .platform_data = &xpt2046_info, - }, -#endif }; diff --git a/drivers/input/touchscreen/ft5406_ts.c b/drivers/input/touchscreen/ft5406_ts.c index 3ac24cd313f2..72ae097c9fb8 100755 --- a/drivers/input/touchscreen/ft5406_ts.c +++ b/drivers/input/touchscreen/ft5406_ts.c @@ -88,7 +88,7 @@ static struct i2c_client *this_client; -#define CONFIG_FT5X0X_MULTITOUCH 0 +#define CONFIG_FT5X0X_MULTITOUCH 1 #define TOUCH_RESET_PIN RK29_PIN6_PC3 struct ts_event { diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index f555e68d602c..12d2c045bbfe 100755 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -155,12 +155,11 @@ config RTC_HYM8563 This driver can also be built as a module. If so, the module will be called rtc-HYM8563. -config RTC_DRV_M41T66 +config RTC_M41T66 tristate "ST M41T66" + depends on I2C_RK2818 || I2C_RK29 help If you say Y here you will get support for the ST M41T66. - This driver can also be built as a module. If so, the module - will be called rtc-m41t80. config RTC_DRV_DS1307 tristate "Dallas/Maxim DS1307/37/38/39/40, ST M41T00, EPSON RX-8025" diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index cacd3255468c..ffc421a089d6 100755 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -90,5 +90,5 @@ obj-$(CONFIG_RTC_DRV_WM831X) += rtc-wm831x.o obj-$(CONFIG_RTC_DRV_WM8350) += rtc-wm8350.o obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o obj-$(CONFIG_RTC_HYM8563) += rtc-HYM8563.o -obj-$(CONFIG_RTC_DRV_M41T66) += rtc-m41t66.o +obj-$(CONFIG_RTC_M41T66) += rtc-m41t66.o diff --git a/drivers/rtc/rtc-m41t66.c b/drivers/rtc/rtc-m41t66.c index 2e1b4b6a4c29..c233068971e1 100755 --- a/drivers/rtc/rtc-m41t66.c +++ b/drivers/rtc/rtc-m41t66.c @@ -102,8 +102,8 @@ #define DRV_VERSION "0.05" #define DRV_NAME "rtc-M41T62" -#if 0 -#define DBG(x...) printk(KERN_INFO "rtc-M41T62:" x) +#if 1 +#define DBG printk//(x...) printk(KERN_INFO "rtc-M41T62:" x) #else #define DBG(x...) #endif @@ -663,7 +663,7 @@ static int m41t62_sysfs_register(struct device *dev) */ static int __devinit m41t62_probe(struct i2c_client *client, const struct i2c_device_id *id) { - //DBG("%s>>>>>>>>>>>>>client->flags:%d\n",__func__,client->flags); + printk("%s>>>>>>>>>>>>>client->flags:%d\n",__func__,client->flags); int rc = 0; struct rock_rtc *rk_rtc = NULL; struct rtc_device *rtc = NULL; @@ -794,8 +794,12 @@ static struct i2c_driver m41t62_driver = { static int __init m41t62_rtc_init(void) { - DBG("%s>>>>>>>>>\n",__func__); - return i2c_add_driver(&m41t62_driver); + int ret; + + printk("%s\n",__func__); + ret = i2c_add_driver(&m41t62_driver); + printk("%s:return = %d\n",__func__,ret); + return ret; } static void __exit m41t62_rtc_exit(void) diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index d4b33f78ec0c..8a1a1b217173 100755 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -38,7 +38,7 @@ #include "cs42l52.h" #include //#include "cs42L52_control.h" -#define DEBUG +//#define DEBUG #ifdef DEBUG #define SOCDBG(fmt, arg...) printk(KERN_ERR "%s: %s() " fmt, SOC_CS42L52_NAME, __FUNCTION__, ##arg) #else diff --git a/sound/soc/rk29/rk29_cs42l52.c b/sound/soc/rk29/rk29_cs42l52.c index 2e61bf26cba2..d4c92cbf90bd 100755 --- a/sound/soc/rk29/rk29_cs42l52.c +++ b/sound/soc/rk29/rk29_cs42l52.c @@ -24,7 +24,7 @@ #include "rk29_pcm.h" #include "rk29_i2s.h" -#if 1 +#if 0 #define DBG(x...) printk(KERN_INFO x) #else #define DBG(x...) -- 2.34.1