diff options
author | Ferruh Yigit <fery@cypress.com> | 2013-07-04 14:02:57 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-07-06 21:57:06 -0700 |
commit | 62f548d0c2d2418e39b8e4b7ec39b5ca2ef4380d (patch) | |
tree | eedbce56f669215f4ee0d57ed817335f612c4372 /drivers/input/touchscreen/cyttsp_spi.c | |
parent | 57961e3ba72f4a8a1aa52e978020ecc2ca03a79f (diff) | |
download | talos-op-linux-62f548d0c2d2418e39b8e4b7ec39b5ca2ef4380d.tar.gz talos-op-linux-62f548d0c2d2418e39b8e4b7ec39b5ca2ef4380d.zip |
Input: cyttsp4 - use 16bit address for I2C/SPI communication
In TSG4, register map is 512bytes long and to access all of it,
one bit from address byte is used (which bit to use differs for
I2C and SPI);
Since common code used for TSG3 and TSG4 for I2C, this parameter
wrongly used as u8. TSG3 does not access beyond 255 bytes
but TSG4 may.
Tested-on:TMA3XX DVB && TMA4XX DVB
Signed-off-by: Ferruh Yigit <fery@cypress.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/cyttsp_spi.c')
-rw-r--r-- | drivers/input/touchscreen/cyttsp_spi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/cyttsp_spi.c b/drivers/input/touchscreen/cyttsp_spi.c index 1df625337b84..4728bcb1916c 100644 --- a/drivers/input/touchscreen/cyttsp_spi.c +++ b/drivers/input/touchscreen/cyttsp_spi.c @@ -41,7 +41,7 @@ #define CY_SPI_BITS_PER_WORD 8 static int cyttsp_spi_xfer(struct device *dev, u8 *xfer_buf, - u8 op, u8 reg, u8 *buf, int length) + u8 op, u16 reg, u8 *buf, int length) { struct spi_device *spi = to_spi_device(dev); struct spi_message msg; @@ -126,14 +126,14 @@ static int cyttsp_spi_xfer(struct device *dev, u8 *xfer_buf, } static int cyttsp_spi_read_block_data(struct device *dev, u8 *xfer_buf, - u8 addr, u8 length, void *data) + u16 addr, u8 length, void *data) { return cyttsp_spi_xfer(dev, xfer_buf, CY_SPI_RD_OP, addr, data, length); } static int cyttsp_spi_write_block_data(struct device *dev, u8 *xfer_buf, - u8 addr, u8 length, const void *data) + u16 addr, u8 length, const void *data) { return cyttsp_spi_xfer(dev, xfer_buf, CY_SPI_WR_OP, addr, (void *)data, length); |