Commit 4e748233 authored by HungNien Chen's avatar HungNien Chen Committed by Dmitry Torokhov

Input: wdt87xx_i2c - fix the flash erase issue

The spec says that flash erase time is 30ms typical/200ms max, so let's
replace current 50ms wait with 200ms to avoid potential failures.
Signed-off-by: default avatarHungNien Chen <hn.chen@weidahitech.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent de56bea0
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#define WDT87XX_NAME "wdt87xx_i2c" #define WDT87XX_NAME "wdt87xx_i2c"
#define WDT87XX_DRV_VER "0.9.7" #define WDT87XX_DRV_VER "0.9.8"
#define WDT87XX_FW_NAME "wdt87xx_fw.bin" #define WDT87XX_FW_NAME "wdt87xx_fw.bin"
#define WDT87XX_CFG_NAME "wdt87xx_cfg.bin" #define WDT87XX_CFG_NAME "wdt87xx_cfg.bin"
...@@ -157,6 +157,7 @@ ...@@ -157,6 +157,7 @@
/* Controller requires minimum 300us between commands */ /* Controller requires minimum 300us between commands */
#define WDT_COMMAND_DELAY_MS 2 #define WDT_COMMAND_DELAY_MS 2
#define WDT_FLASH_WRITE_DELAY_MS 4 #define WDT_FLASH_WRITE_DELAY_MS 4
#define WDT_FLASH_ERASE_DELAY_MS 200
#define WDT_FW_RESET_TIME 2500 #define WDT_FW_RESET_TIME 2500
struct wdt87xx_sys_param { struct wdt87xx_sys_param {
...@@ -726,7 +727,7 @@ static int wdt87xx_write_firmware(struct i2c_client *client, const void *chunk) ...@@ -726,7 +727,7 @@ static int wdt87xx_write_firmware(struct i2c_client *client, const void *chunk)
break; break;
} }
msleep(50); msleep(WDT_FLASH_ERASE_DELAY_MS);
error = wdt87xx_write_data(client, data, start_addr, error = wdt87xx_write_data(client, data, start_addr,
page_size); page_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment