Input: st1232 - note that the receive buffer is DMA-safe
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 22 Oct 2019 16:34:59 +0000 (09:34 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 29 Oct 2019 04:04:16 +0000 (21:04 -0700)
The receiving buffer is allocated separately from the main driver
data structure, and is naturally DMA-safe, so mark it as such when
building I2C transfer message.

Tested-by: Matthias Fend <Matthias.Fend@wolfvision.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/st1232.c

index 0aee330..a4a3b82 100644 (file)
@@ -66,7 +66,7 @@ static int st1232_ts_read_data(struct st1232_ts_data *ts)
                },
                {
                        .addr   = client->addr,
-                       .flags  = I2C_M_RD,
+                       .flags  = I2C_M_RD | I2C_M_DMA_SAFE,
                        .len    = ts->read_buf_len,
                        .buf    = ts->read_buf,
                }