lkml.org 
[lkml]   [2018]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 02/12] i2c: designware-master: use core to detect 'no zero length' quirk
From
Date
On 07/23/2018 11:26 PM, Wolfram Sang wrote:
> And don't reimplement in the driver.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> Only build tested.
>
> drivers/i2c/busses/i2c-designware-master.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
I tested this with patch 1 and I like it since with these patches the
test is done before firing up the HW, waiting for an interrupt and then
see the length is invalid for us.

i2ctransfer -f 8 r0@0x10

Before (with i2c_designware debugging on):
[ 15.607283] i2c_designware i2c_designware.1: i2c_dw_xfer: msgs: 1
[ 15.711988] i2c_designware i2c_designware.1: enabled=0x1 stat=0x10
[ 15.712002] i2c_designware i2c_designware.1: i2c_dw_xfer_msg: invalid
message length
Error: Sending messages failed: Invalid argument

After:
[ 25.838661] i2c i2c-8: adapter quirk: no zero length (addr 0x0010,
size 0, read)
Error: Sending messages failed: Operation not supported

Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

\
 
 \ /
  Last update: 2018-08-02 16:02    [W:0.265 / U:7.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site