diff options
| author | Alex Chen <alchen@nvidia.com> | 2014-11-25 01:46:58 -0500 |
|---|---|---|
| committer | David Pu <dpu@nvidia.com> | 2017-07-27 19:09:19 -0400 |
| commit | 2affa8b34228887e2e7eef4e526c7b02a966efcb (patch) | |
| tree | 5a14e28d8a8cecb58c0a403db360b2c59d94df91 /drivers/input | |
| parent | 835cd52a8d9f28e7983bef57f6ea92f7183f2b36 (diff) | |
input: touch: Raydium: Code drop v73.16
change list:
1. Enable CS_SUPPORT in driver
2. Fix compile error about data type with Android 5.0
3. Slowscan patch
4. Remove calibration file check string
5. Resolve clock reference unbalance issue
6. Refine quickly swiping issue
Bug 1546667
Bug 1561841
Bug 200043979
Bug 200052217
Bug 200055008
Bug 200057160
Change-Id: Iccf5a1de3ff903d06f2429d98fd00cfc75958176
Signed-off-by: Alex Chen <alchen@nvidia.com>
Reviewed-on: http://git-master/r/655175
(cherry picked from commit cf496be2e7118bf2c78dfd62acd817b0fc5c52a9)
Reviewed-on: http://git-master/r/660615
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jordan Nien <jnien@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/touchscreen/rm31080a_ts.c | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/drivers/input/touchscreen/rm31080a_ts.c b/drivers/input/touchscreen/rm31080a_ts.c index 1ef092292..1610271b7 100644 --- a/drivers/input/touchscreen/rm31080a_ts.c +++ b/drivers/input/touchscreen/rm31080a_ts.c | |||
| @@ -130,7 +130,6 @@ enum RM_TEST_MODE { | |||
| 130 | #define MAX_SLOT_AMOUNT MAX_REPORT_TOUCHED_POINTS | 130 | #define MAX_SLOT_AMOUNT MAX_REPORT_TOUCHED_POINTS |
| 131 | #endif | 131 | #endif |
| 132 | 132 | ||
| 133 | /*#define CS_SUPPORT*/ | ||
| 134 | #define MASK_USER_SPACE_POINTER 0x00000000FFFFFFFF /* 64-bit support */ | 133 | #define MASK_USER_SPACE_POINTER 0x00000000FFFFFFFF /* 64-bit support */ |
| 135 | 134 | ||
| 136 | /* do not use printk in kernel files */ | 135 | /* do not use printk in kernel files */ |
| @@ -2001,11 +2000,13 @@ static void rm_work_handler(struct work_struct *work) | |||
| 2001 | 2000 | ||
| 2002 | i_ret = rm_tch_ctrl_clear_int(); | 2001 | i_ret = rm_tch_ctrl_clear_int(); |
| 2003 | 2002 | ||
| 2003 | #ifdef ENABLE_SLOW_SCAN | ||
| 2004 | if (g_st_ts.b_slow_scan_flg == true) { | 2004 | if (g_st_ts.b_slow_scan_flg == true) { |
| 2005 | rm_tch_cmd_process((u8)(g_st_ts.u32_slow_scan_level - 1), | 2005 | rm_tch_cmd_process((u8)(g_st_ts.u32_slow_scan_level - 1), |
| 2006 | g_st_rm_slow_scan_cmd, NULL); | 2006 | g_st_rm_slow_scan_cmd, NULL); |
| 2007 | g_st_ts.b_slow_scan_flg = false; | 2007 | g_st_ts.b_slow_scan_flg = false; |
| 2008 | } | 2008 | } |
| 2009 | #endif | ||
| 2009 | 2010 | ||
| 2010 | u32_flag = rm_tch_ctrl_configure(); | 2011 | u32_flag = rm_tch_ctrl_configure(); |
| 2011 | 2012 | ||
| @@ -2051,12 +2052,14 @@ static int rm_work_thread_function(void *data) | |||
| 2051 | 2052 | ||
| 2052 | i_ret = rm_tch_ctrl_clear_int(); | 2053 | i_ret = rm_tch_ctrl_clear_int(); |
| 2053 | 2054 | ||
| 2055 | #ifdef ENABLE_SLOW_SCAN | ||
| 2054 | if (g_st_ts.b_slow_scan_flg == true) { | 2056 | if (g_st_ts.b_slow_scan_flg == true) { |
| 2055 | rm_tch_cmd_process( | 2057 | rm_tch_cmd_process( |
| 2056 | (u8)(g_st_ts.u32_slow_scan_level - 1), | 2058 | (u8)(g_st_ts.u32_slow_scan_level - 1), |
| 2057 | g_st_rm_slow_scan_cmd, NULL); | 2059 | g_st_rm_slow_scan_cmd, NULL); |
| 2058 | g_st_ts.b_slow_scan_flg = false; | 2060 | g_st_ts.b_slow_scan_flg = false; |
| 2059 | } | 2061 | } |
| 2062 | #endif | ||
| 2060 | 2063 | ||
| 2061 | u32_flag = rm_tch_ctrl_configure(); | 2064 | u32_flag = rm_tch_ctrl_configure(); |
| 2062 | 2065 | ||
| @@ -2271,16 +2274,8 @@ static void rm_tch_disable_irq(struct rm_tch_ts *ts) | |||
| 2271 | * Description: | 2274 | * Description: |
| 2272 | * Context dependent touch system. | 2275 | * Context dependent touch system. |
| 2273 | * Change scan speed for slowscan function. | 2276 | * Change scan speed for slowscan function. |
| 2274 | * Change scan speed flow: (by CY,20120305) | ||
| 2275 | * 1.Disable auto scan ([0x09]bit4=0,[0x09]bit6=1) | ||
| 2276 | * 2.Clear Scan start bit ([0x11]bit0=0) | ||
| 2277 | * 3.Read Scan start bit until it equals 0 | ||
| 2278 | * 4.Set LACTIVE and YACTIVE configuration | ||
| 2279 | * 5.Enable autoscan ([0x09]bit4=1,[0x09]bit6=1) | ||
| 2280 | * 6.Sleep 1 minisecond. | ||
| 2281 | * 7.Set Scan start bit ([0x11]bit0=1) | ||
| 2282 | * Input: | 2277 | * Input: |
| 2283 | * N/A | 2278 | * slowscan level |
| 2284 | * Output: | 2279 | * Output: |
| 2285 | * N/A | 2280 | * N/A |
| 2286 | *===========================================================================*/ | 2281 | *===========================================================================*/ |
| @@ -2293,13 +2288,6 @@ static void rm_tch_ctrl_slowscan(u32 level) | |||
| 2293 | 2288 | ||
| 2294 | g_st_ts.u32_slow_scan_level = level; | 2289 | g_st_ts.u32_slow_scan_level = level; |
| 2295 | g_st_ts.b_slow_scan_flg = true; | 2290 | g_st_ts.b_slow_scan_flg = true; |
| 2296 | |||
| 2297 | mutex_lock(&g_st_ts.mutex_scan_mode); | ||
| 2298 | if (g_st_ts.u8_scan_mode_state == RM_SCAN_IDLE_MODE) { | ||
| 2299 | g_st_ts.u8_scan_mode_state = RM_SCAN_PRE_IDLE_MODE; | ||
| 2300 | rm_tch_ctrl_leave_auto_mode(); | ||
| 2301 | } | ||
| 2302 | mutex_unlock(&g_st_ts.mutex_scan_mode); | ||
| 2303 | } | 2291 | } |
| 2304 | 2292 | ||
| 2305 | static u32 rm_tch_slowscan_round(u32 val) | 2293 | static u32 rm_tch_slowscan_round(u32 val) |
| @@ -2378,8 +2366,7 @@ static ssize_t rm_tch_touchfile_check_show(struct device *dev, | |||
| 2378 | struct device_attribute *attr, | 2366 | struct device_attribute *attr, |
| 2379 | char *buf) | 2367 | char *buf) |
| 2380 | { | 2368 | { |
| 2381 | return sprintf(buf, "0x%x\n", | 2369 | return sprintf(buf, "0x%x\n", g_st_ts.u8_touchfile_check); |
| 2382 | g_st_ts.u8_touchfile_check); | ||
| 2383 | } | 2370 | } |
| 2384 | 2371 | ||
| 2385 | static ssize_t rm_tch_touchfile_check_store(struct device *dev, | 2372 | static ssize_t rm_tch_touchfile_check_store(struct device *dev, |
| @@ -3937,10 +3924,6 @@ static int rm_tch_spi_remove(struct spi_device *spi) | |||
| 3937 | regulator_disable(ts->regulator_3v3); | 3924 | regulator_disable(ts->regulator_3v3); |
| 3938 | regulator_disable(ts->regulator_1v8); | 3925 | regulator_disable(ts->regulator_1v8); |
| 3939 | } | 3926 | } |
| 3940 | |||
| 3941 | if (ts->clk) | ||
| 3942 | clk_disable(ts->clk); | ||
| 3943 | |||
| 3944 | kfree(ts); | 3927 | kfree(ts); |
| 3945 | spi_set_drvdata(spi, NULL); | 3928 | spi_set_drvdata(spi, NULL); |
| 3946 | 3929 | ||
| @@ -4054,10 +4037,6 @@ static int rm_tch_spi_probe(struct spi_device *spi) | |||
| 4054 | } | 4037 | } |
| 4055 | pdata = g_input_dev->dev.parent->platform_data; | 4038 | pdata = g_input_dev->dev.parent->platform_data; |
| 4056 | usleep_range(5000, 6000); | 4039 | usleep_range(5000, 6000); |
| 4057 | /* | ||
| 4058 | if (ts->clk) | ||
| 4059 | clk_enable(ts->clk); | ||
| 4060 | */ | ||
| 4061 | 4040 | ||
| 4062 | gpio_set_value(pdata->gpio_reset, 0); | 4041 | gpio_set_value(pdata->gpio_reset, 0); |
| 4063 | msleep(120); | 4042 | msleep(120); |
| @@ -4103,10 +4082,6 @@ err_misc_reg: | |||
| 4103 | regulator_disable(ts->regulator_3v3); | 4082 | regulator_disable(ts->regulator_3v3); |
| 4104 | regulator_disable(ts->regulator_1v8); | 4083 | regulator_disable(ts->regulator_1v8); |
| 4105 | } | 4084 | } |
| 4106 | |||
| 4107 | if (ts->clk) | ||
| 4108 | clk_disable(ts->clk); | ||
| 4109 | |||
| 4110 | err_regulator_init: | 4085 | err_regulator_init: |
| 4111 | spi_set_drvdata(spi, NULL); | 4086 | spi_set_drvdata(spi, NULL); |
| 4112 | input_unregister_device(ts->input); | 4087 | input_unregister_device(ts->input); |
