i2c: xlr: fix extra read/write at end of rx transfer
authorMåns Rullgård <mans@mansr.com>
Tue, 15 Dec 2015 23:15:05 +0000 (23:15 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 16 Dec 2015 10:42:30 +0000 (11:42 +0100)
commita45af72a609b095820feab26c49286337301377e
treec347d0cd0b11d7f4b0872d02aefea64d5786c1bd
parent75d31c2372e4a08319919b14bd160c48305373a1
i2c: xlr: fix extra read/write at end of rx transfer

The BYTECNT register holds the transfer size minus one.  Setting it to
the correct value removes the need for a dummy read/write at the end of
each transfer.  As zero-length transfers are not supported, do not
advertise I2C_FUNC_SMBUS_QUICK.

In other words, this patch makes the driver transfer the number of bytes
requested unless this is zero, which is not supported by the hardware
and is thus refused.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-xlr.c
This page took 0.024968 seconds and 5 git commands to generate.