Re: [PATCH v2 1/2] Input: mms114 - use smbus functions whenever possible
From: Stephan Gerhold <stephan@gerhold.net>
Date: 2019-10-21 16:26:46
On Mon, Oct 21, 2019 at 06:41:05PM +0300, Andi Shyti wrote:
Hi Stephan,quoted
Not sure if you saw my comment regarding your patch [1], so I'll just repeat it properly inline here: [1]: https://patchwork.kernel.org/patch/11178515/#22927311 On Sun, Oct 20, 2019 at 11:28:55PM +0300, Andi Shyti wrote:quoted
The exchange of data to and from the mms114 touchscreen never exceeds 256 bytes. In the worst case it goes up to 80 bytes in the interrupt handler while reading the events.i2c_smbus_read_i2c_block_data() is actually limited to I2C_SMBUS_BLOCK_MAX = 32.oh sorry, I don't know how I slipped on this. But this means that the i2c in the kernel is wrong (or outdated), smbus specifies 256 bytes of data[*]. I might have relied on the specification more than the code. I guess SMBUS needs some update.
You are right. It seems like that part of the specification was changed
with SMBus version 3.0 [1]:
D.6 255 Bytes in Process Call:
The maximum number of bytes allowed in the Block Write-Block Read
Process Call (Section 6.5.8) was increased from 32 to 255.
[1]: http://www.smbus.org/specs/SMBus_3_0_20141220.pdf