* [PATCH] Input: wdt87xx_i2c - Change the sleep time to 2500ms after the sw reset
@ 2015-07-11 14:36 HungNien Chen
2015-07-12 6:28 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: HungNien Chen @ 2015-07-11 14:36 UTC (permalink / raw)
To: linux-input; +Cc: linux-kernel, dmitry.torokhov, charliemooney, HungNien Chen
The original value is 200ms, it includes the loading fw & boot up to
the main function. After that, the main function will do algorithm
initialized and touch calibrtion about 1.1 second. The touch
calibration will change controller freq to scan the best working freq
and it has risk to make the i2c data error when doing fw update.
We extend the sleep to 2500ms after the sw reset to skip this period time.
Signed-off-by: HungNien Chen <hn.chen@weidahitech.com>
---
drivers/input/touchscreen/wdt87xx_i2c.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c b/drivers/input/touchscreen/wdt87xx_i2c.c
index b97cb4f..cfd1487 100644
--- a/drivers/input/touchscreen/wdt87xx_i2c.c
+++ b/drivers/input/touchscreen/wdt87xx_i2c.c
@@ -157,6 +157,7 @@
/* Controller requires minimum 300us between commands */
#define WDT_COMMAND_DELAY_MS 2
#define WDT_FLASH_WRITE_DELAY_MS 4
+#define WDT_FW_RESET_TIME 2500
struct wdt87xx_sys_param {
u16 fw_id;
@@ -413,7 +414,7 @@ static int wdt87xx_sw_reset(struct i2c_client *client)
}
/* Wait the device to be ready */
- msleep(200);
+ msleep(WDT_FW_RESET_TIME);
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Input: wdt87xx_i2c - Change the sleep time to 2500ms after the sw reset
2015-07-11 14:36 [PATCH] Input: wdt87xx_i2c - Change the sleep time to 2500ms after the sw reset HungNien Chen
@ 2015-07-12 6:28 ` Dmitry Torokhov
2015-07-13 11:47 ` Hn Chen
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2015-07-12 6:28 UTC (permalink / raw)
To: HungNien Chen; +Cc: linux-input, linux-kernel, charliemooney
On Sat, Jul 11, 2015 at 10:36:42PM +0800, HungNien Chen wrote:
> The original value is 200ms, it includes the loading fw & boot up to
> the main function. After that, the main function will do algorithm
> initialized and touch calibrtion about 1.1 second. The touch
> calibration will change controller freq to scan the best working freq
> and it has risk to make the i2c data error when doing fw update.
> We extend the sleep to 2500ms after the sw reset to skip this period time.
>
> Signed-off-by: HungNien Chen <hn.chen@weidahitech.com>
Applied, thank you.
> ---
> drivers/input/touchscreen/wdt87xx_i2c.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c b/drivers/input/touchscreen/wdt87xx_i2c.c
> index b97cb4f..cfd1487 100644
> --- a/drivers/input/touchscreen/wdt87xx_i2c.c
> +++ b/drivers/input/touchscreen/wdt87xx_i2c.c
> @@ -157,6 +157,7 @@
> /* Controller requires minimum 300us between commands */
> #define WDT_COMMAND_DELAY_MS 2
> #define WDT_FLASH_WRITE_DELAY_MS 4
> +#define WDT_FW_RESET_TIME 2500
>
> struct wdt87xx_sys_param {
> u16 fw_id;
> @@ -413,7 +414,7 @@ static int wdt87xx_sw_reset(struct i2c_client *client)
> }
>
> /* Wait the device to be ready */
> - msleep(200);
> + msleep(WDT_FW_RESET_TIME);
>
> return 0;
> }
> --
> 1.9.1
>
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] Input: wdt87xx_i2c - Change the sleep time to 2500ms after the sw reset
2015-07-12 6:28 ` Dmitry Torokhov
@ 2015-07-13 11:47 ` Hn Chen
0 siblings, 0 replies; 3+ messages in thread
From: Hn Chen @ 2015-07-13 11:47 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, charliemooney
Hi, Dmitry,
Thanks !
BR,
Hn.chen.
-----Original Message-----
From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com]
Sent: Sunday, July 12, 2015 2:29 PM
To: Hn Chen
Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; charliemooney@google.com
Subject: Re: [PATCH] Input: wdt87xx_i2c - Change the sleep time to 2500ms after the sw reset
On Sat, Jul 11, 2015 at 10:36:42PM +0800, HungNien Chen wrote:
> The original value is 200ms, it includes the loading fw & boot up to
> the main function. After that, the main function will do algorithm
> initialized and touch calibrtion about 1.1 second. The touch
> calibration will change controller freq to scan the best working freq
> and it has risk to make the i2c data error when doing fw update.
> We extend the sleep to 2500ms after the sw reset to skip this period time.
>
> Signed-off-by: HungNien Chen <hn.chen@weidahitech.com>
Applied, thank you.
> ---
> drivers/input/touchscreen/wdt87xx_i2c.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c
> b/drivers/input/touchscreen/wdt87xx_i2c.c
> index b97cb4f..cfd1487 100644
> --- a/drivers/input/touchscreen/wdt87xx_i2c.c
> +++ b/drivers/input/touchscreen/wdt87xx_i2c.c
> @@ -157,6 +157,7 @@
> /* Controller requires minimum 300us between commands */
> #define WDT_COMMAND_DELAY_MS 2
> #define WDT_FLASH_WRITE_DELAY_MS 4
> +#define WDT_FW_RESET_TIME 2500
>
> struct wdt87xx_sys_param {
> u16 fw_id;
> @@ -413,7 +414,7 @@ static int wdt87xx_sw_reset(struct i2c_client *client)
> }
>
> /* Wait the device to be ready */
> - msleep(200);
> + msleep(WDT_FW_RESET_TIME);
>
> return 0;
> }
> --
> 1.9.1
>
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-13 11:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-11 14:36 [PATCH] Input: wdt87xx_i2c - Change the sleep time to 2500ms after the sw reset HungNien Chen
2015-07-12 6:28 ` Dmitry Torokhov
2015-07-13 11:47 ` Hn Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).