diff options
author | jeffrey.lin <jeffrey.lin@rad-ic.com> | 2020-12-15 21:50:12 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-12-16 04:49:33 +0300 |
commit | fafd320ae51b9c72d371585b2501f86640ea7b7d (patch) | |
tree | 448c897e7f72d04b6329829c8ebda85dedfed288 /drivers/input/touchscreen/raydium_i2c_ts.c | |
parent | 1e2020aa0da00051d94c4690c023c45d8f3834bd (diff) | |
download | linux-fafd320ae51b9c72d371585b2501f86640ea7b7d.tar.xz |
Input: raydium_ts_i2c - do not send zero length
Add default write command package to prevent i2c quirk error of zero
data length as Raydium touch firmware update is executed.
Signed-off-by: jeffrey.lin <jeffrey.lin@rad-ic.com>
Link: https://lore.kernel.org/r/1608031217-7247-1-git-send-email-jeffrey.lin@raydium.corp-partner.google.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/raydium_i2c_ts.c')
-rw-r--r-- | drivers/input/touchscreen/raydium_i2c_ts.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c index e694a9b2b1e5..678afac85507 100644 --- a/drivers/input/touchscreen/raydium_i2c_ts.c +++ b/drivers/input/touchscreen/raydium_i2c_ts.c @@ -395,6 +395,7 @@ static int raydium_i2c_write_object(struct i2c_client *client, enum raydium_bl_ack state) { int error; + static const u8 cmd[] = { 0xFF, 0x39 }; error = raydium_i2c_send(client, RM_CMD_BOOT_WRT, data, len); if (error) { @@ -403,7 +404,7 @@ static int raydium_i2c_write_object(struct i2c_client *client, return error; } - error = raydium_i2c_send(client, RM_CMD_BOOT_ACK, NULL, 0); + error = raydium_i2c_send(client, RM_CMD_BOOT_ACK, cmd, sizeof(cmd)); if (error) { dev_err(&client->dev, "Ack obj command failed: %d\n", error); return error; |