add 5 point touch, close cs42l52 log for newton
author蔡枫 <cf@rock-chips.com>
Mon, 27 Jun 2011 03:48:04 +0000 (11:48 +0800)
committer蔡枫 <cf@rock-chips.com>
Mon, 27 Jun 2011 03:48:04 +0000 (11:48 +0800)
arch/arm/mach-rk29/board-rk29-newton.c
drivers/input/touchscreen/ft5406_ts.c
drivers/rtc/Kconfig
drivers/rtc/Makefile
drivers/rtc/rtc-m41t66.c
sound/soc/codecs/cs42l52.c
sound/soc/rk29/rk29_cs42l52.c

index 18277814e3361ec28b03e6e471a3d92b00bb94e7..e7a2e825682105e0d1a9cd3a68b82ec13ee57edb 100755 (executable)
 #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
 };
 
 
index 3ac24cd313f2965aeae9c74532d979be03ae2362..72ae097c9fb8c7830e7c181c720274556ded2973 100755 (executable)
@@ -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 {
index f555e68d602c82c676c62f90cd26629f8b956adc..12d2c045bbfe7b2448773cb40bcfa1745f20b487 100755 (executable)
@@ -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"
index cacd3255468cd0a929dc457afe07fea1656040fd..ffc421a089d6cbc710d3554c0da8f3d5f7e55561 100755 (executable)
@@ -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
 
index 2e1b4b6a4c2945cc9602f64a39d55161a9651a3f..c233068971e1f4928e5407493ee53b840aa3e318 100755 (executable)
 \r
 #define DRV_VERSION "0.05"\r
 #define DRV_NAME  "rtc-M41T62"\r
-#if 0\r
-#define DBG(x...)      printk(KERN_INFO  "rtc-M41T62:" x)\r
+#if 1\r
+#define DBG   printk//(x...)   printk(KERN_INFO  "rtc-M41T62:" x)\r
 #else\r
 #define DBG(x...)\r
 #endif\r
@@ -663,7 +663,7 @@ static int m41t62_sysfs_register(struct device *dev)
  */\r
 static int __devinit m41t62_probe(struct i2c_client *client, const struct i2c_device_id *id)\r
 {\r
-       //DBG("%s>>>>>>>>>>>>>client->flags:%d\n",__func__,client->flags);\r
+       printk("%s>>>>>>>>>>>>>client->flags:%d\n",__func__,client->flags);\r
        int rc = 0;\r
        struct rock_rtc *rk_rtc = NULL;\r
        struct rtc_device *rtc = NULL;\r
@@ -794,8 +794,12 @@ static struct i2c_driver m41t62_driver = {
 \r
 static int __init m41t62_rtc_init(void)\r
 {\r
-       DBG("%s>>>>>>>>>\n",__func__);\r
-       return i2c_add_driver(&m41t62_driver);\r
+       int ret;\r
+       \r
+       printk("%s\n",__func__);\r
+       ret = i2c_add_driver(&m41t62_driver);\r
+       printk("%s:return = %d\n",__func__,ret);\r
+       return ret;\r
 }\r
 \r
 static void __exit m41t62_rtc_exit(void)\r
index d4b33f78ec0c03e09ebe96ee5a298890ca7d35a0..8a1a1b21717364c413596f6c041218ede41cb17f 100755 (executable)
@@ -38,7 +38,7 @@
 #include "cs42l52.h"
 #include <mach/board.h>
 //#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
index 2e61bf26cba2964f67bffe4245a7a387d2d6b60c..d4c92cbf90bd5f5944c0cc87ea0249bb5145e49e 100755 (executable)
@@ -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...)