[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190830130842.GG2870@ninjato>
Date: Fri, 30 Aug 2019 15:08:42 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: Hsin-Yi Wang <hsinyi@...omium.org>
Cc: Yingjoe Chen <yingjoe.chen@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Qii Wang <qii.wang@...iatek.com>,
Nicolas Boichat <drinkcat@...omium.org>,
Jun Gao <jun.gao@...iatek.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-i2c@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
Alexandru M Stan <amstan@...omium.org>
Subject: Re: [PATCH v2] i2c: mediatek: disable zero-length transfers for
mt8183
On Thu, Aug 22, 2019 at 05:45:17PM +0800, Hsin-Yi Wang wrote:
> When doing i2cdetect quick write mode, we would get transfer
> error ENOMEM, and i2cdetect shows there's no device at the address.
> Quoting from mt8183 datasheet, the number of transfers to be
> transferred in one transaction should be set to bigger than 1,
> so we should forbid zero-length transfer and update functionality.
>
> Incorrect return:
> localhost ~ # i2cdetect -q -y 0
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
> 00: -- -- -- -- -- -- -- -- -- -- -- -- --
> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 70: -- -- -- -- -- -- -- --
>
> After this patch:
> localhost ~ # i2cdetect -q -y 0
> Error: Can't use SMBus Quick Write command on this bus
>
> localhost ~ # i2cdetect -y 0
> Warning: Can't use SMBus Quick Write command, will skip some addresses
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
> 00:
> 10:
> 20:
> 30: -- -- -- -- -- -- -- --
> 40:
> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 60:
> 70:
Thanks for providing these test results. Much appreciated. To shorten
the commit log a little, I removed them before applying, though.
>
> Reported-by: Alexandru M Stan <amstan@...omium.org>
> Signed-off-by: Hsin-Yi Wang <hsinyi@...omium.org>
Applied to for-next, thanks!
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists