summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/mms114.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2020-05-17 21:10:28 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-05-17 21:10:28 -0700
commit2969869bfac3cb8c549f6cadea6b97bb1d9ec86f (patch)
tree50a585182a13e7ebe587ea1cf34f06272c218b02 /drivers/input/touchscreen/mms114.c
parent04e49867fad1f4a0739862bb15133f96ace1d190 (diff)
parentd34fced41e172fae2df7819b1d5a398c62067599 (diff)
downloadlinux-2969869bfac3cb8c549f6cadea6b97bb1d9ec86f.tar.bz2
Merge branch 'for-linus' into next
Merge for-linus branch to sync Elan touchscreen driver code.
Diffstat (limited to 'drivers/input/touchscreen/mms114.c')
-rw-r--r--drivers/input/touchscreen/mms114.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c
index d5e2d2a139a2..1f96657310b7 100644
--- a/drivers/input/touchscreen/mms114.c
+++ b/drivers/input/touchscreen/mms114.c
@@ -92,15 +92,15 @@ static int __mms114_read_reg(struct mms114_data *data, unsigned int reg,
if (reg <= MMS114_MODE_CONTROL && reg + len > MMS114_MODE_CONTROL)
BUG();
- /* Write register: use repeated start */
+ /* Write register */
xfer[0].addr = client->addr;
- xfer[0].flags = I2C_M_TEN | I2C_M_NOSTART;
+ xfer[0].flags = client->flags & I2C_M_TEN;
xfer[0].len = 1;
xfer[0].buf = &buf;
/* Read data */
xfer[1].addr = client->addr;
- xfer[1].flags = I2C_M_RD;
+ xfer[1].flags = (client->flags & I2C_M_TEN) | I2C_M_RD;
xfer[1].len = len;
xfer[1].buf = val;
@@ -438,10 +438,8 @@ static int mms114_probe(struct i2c_client *client,
const void *match_data;
int error;
- if (!i2c_check_functionality(client->adapter,
- I2C_FUNC_PROTOCOL_MANGLING)) {
- dev_err(&client->dev,
- "Need i2c bus that supports protocol mangling\n");
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
+ dev_err(&client->dev, "Not supported I2C adapter\n");
return -ENODEV;
}