summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-tegra.c
diff options
context:
space:
mode:
authorSowjanya Komatineni <skomatineni@nvidia.com>2019-02-12 22:06:44 +0300
committerWolfram Sang <wsa@the-dreams.de>2019-02-14 19:47:58 +0300
commitf4e3f4ae1d9c9330de355f432b69952e8cef650c (patch)
tree532e0d5dc2e317f3620ff35e21b8ecd8a3d6be3a /drivers/i2c/busses/i2c-tegra.c
parentce9562424501dee2ce44e6f22d8c9e82917f40d1 (diff)
downloadlinux-f4e3f4ae1d9c9330de355f432b69952e8cef650c.tar.xz
i2c: tegra: fix maximum transfer size
Tegra186 and prior supports maximum 4K bytes per packet transfer including 12 bytes of packet header. This patch fixes max write length limit to account packet header size for transfers. Cc: stable@vger.kernel.org # 4.4+ Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-tegra.c')
-rw-r--r--drivers/i2c/busses/i2c-tegra.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index a46446dbc48a..036cab795426 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -901,7 +901,7 @@ static const struct i2c_algorithm tegra_i2c_algo = {
static const struct i2c_adapter_quirks tegra_i2c_quirks = {
.flags = I2C_AQ_NO_ZERO_LEN,
.max_read_len = 4096,
- .max_write_len = 4096,
+ .max_write_len = 4096 - 12,
};
static const struct i2c_adapter_quirks tegra194_i2c_quirks = {