input: touchscreen: raydium add detection of AVC sensor
Xiaohui Tao [Tue, 30 Jul 2013 23:50:49 +0000 (16:50 -0700)]
Change-Id: I32db26ebfa18d219f2df05b75dcd5e45250c9b23
Signed-off-by: Xiaohui Tao <xtao@nvidia.com>
Reviewed-on: http://git-master/r/255809
Reviewed-by: Mitch Luban <mluban@nvidia.com>

drivers/input/touchscreen/rm31080a_ts.c
include/linux/spi/rm31080a_ts.h

index 03136e4..62b31de 100644 (file)
@@ -907,11 +907,9 @@ static u32 rm_tch_get_platform_id(u8 *p)
 static u32 rm_tch_get_gpio_sensor_select(u8 *p)
 {
        u32 u32Ret = 0;
-       /* wait to be implemented...
-               struct rm_spi_ts_platform_data *pdata;
-               pdata = g_input_dev->dev.parent->platform_data;
-               u32Ret = gpio_set_value(pdata->gpio_sensor_select0) | (1 << gpio_set_value(pdata->gpio_sensor_select1));
-       */
+       struct rm_spi_ts_platform_data *pdata;
+       pdata = g_input_dev->dev.parent->platform_data;
+       u32Ret = pdata->gpio_sensor_select0 | pdata->gpio_sensor_select1 << 1;
        u32Ret = copy_to_user(p, &u32Ret, sizeof(u32Ret));
        if (u32Ret != 0)
                return FAIL;
index 4cac129..274568f 100644 (file)
@@ -178,10 +178,8 @@ struct rm_spi_ts_platform_data {
        int platform_id;
        unsigned char *name_of_clock;
        unsigned char *name_of_clock_con;
-       /* wait to be implemented...
-               int gpio_sensor_select0;
-               int gpio_sensor_select1;
-       */
+       int gpio_sensor_select0;
+       int gpio_sensor_select1;
 };
 
 int rm_tch_spi_byte_write(unsigned char u8Addr, unsigned char u8Value);