diff options
Diffstat (limited to 'drivers/input/touchscreen/wacom/wacom_i2c_flash.c')
-rw-r--r-- | drivers/input/touchscreen/wacom/wacom_i2c_flash.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/wacom/wacom_i2c_flash.c b/drivers/input/touchscreen/wacom/wacom_i2c_flash.c index 691e66c..cf92018 100644 --- a/drivers/input/touchscreen/wacom/wacom_i2c_flash.c +++ b/drivers/input/touchscreen/wacom/wacom_i2c_flash.c @@ -73,6 +73,28 @@ int wacom_i2c_flash_cmd(struct wacom_i2c *wac_i2c) int ret, len, i; u8 buf[10], flashq; + +#if defined(CONFIG_MACH_KONA) + buf[0] = 0x0d; + buf[1] = FLASH_START0; + buf[2] = FLASH_START1; + buf[3] = FLASH_START2; + buf[4] = FLASH_START3; + buf[5] = FLASH_START4; + buf[6] = FLASH_START5; + buf[7] = 0x0d; + + printk(KERN_DEBUG "[E-PEN][jjals] w9002 running!!\n"); + + len = 8; + ret = i2c_master_send(wac_i2c->client, buf, len); + + if (ret < 0) { + printk(KERN_ERR + "Sending flash command failed\n"); + return -1; + } +#else buf[0] = 0x0d; buf[1] = FLASH_START0; @@ -110,8 +132,7 @@ int wacom_i2c_flash_cmd(struct wacom_i2c *wac_i2c) printk(KERN_DEBUG "[E-PEN]: flash send?:%d\n", ret); msleep(270); } - - wac_i2c->boot_mode = true; +#endif return 0; } @@ -174,6 +195,9 @@ int wacom_i2c_flash_enter(struct wacom_i2c *wac_i2c) { if (wacom_i2c_flash_query(wac_i2c, FLASH_QUERY, FLASH_ACK) == -1) return ERR_NOT_FLASH; + + wac_i2c->boot_mode = true; + return 0; } |