From: Shawn Guo <shawnguo@kernel.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Baoyou Xie <baoyou.xie@linaro.org>,
Baoyou Xie <xie.baoyou@sanechips.com.cn>,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Xin Zhou <zhou.xin8@sanechips.com.cn>
Subject: Re: [PATCH 2/2] i2c: zx2967: add i2c controller driver for ZTE's zx2967 family
Date: Thu, 22 Jun 2017 20:25:59 +0800 [thread overview]
Message-ID: <20170622122558.GB23753@dragon> (raw)
In-Reply-To: <20170622080730.o352kxrs5pz7wxnf@ninjato>
On Thu, Jun 22, 2017 at 10:07:30AM +0200, Wolfram Sang wrote:
>
> > The audio codec is on address 0x22.
> >
> > Why do you think it should be broken now?
>
> Because I thought that we skipped the error handling for every transfer
> when we removed the call to reset_hardware from the xfer function.
>
> So, either it still works because the transfer times out. But then
> i2cdetect should be really slow. The timeout is set to 1s, so it should
> take 1s to scan every address.
>
> Or I am completely missing something. Then, I am sorry for the noise.
It's me who is missing something. You are right. With the current
driver, i2cdetect takes 1s to scan most addresses. Except address 0x22,
those devices detected on other addresses are just wrong, and the
addresses vary from a scan to another.
With the proper error handling, i2cdetect now works very fast and only
gets audio codec on 0x22, which is correct.
$ i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] Y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Thanks a lot for identifying the bug.
Shawn
next prev parent reply other threads:[~2017-06-22 12:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 4:59 [PATCH 0/2] Add I2C driver for ZTE ZX2967 family SoCs Shawn Guo
2017-05-28 4:59 ` [PATCH 1/2] dt: bindings: add documentation for zx2967 family i2c controller Shawn Guo
2017-05-28 4:59 ` [PATCH 2/2] i2c: zx2967: add i2c controller driver for ZTE's zx2967 family Shawn Guo
2017-06-19 19:31 ` Wolfram Sang
2017-06-20 2:58 ` Shawn Guo
2017-06-20 7:41 ` Wolfram Sang
2017-06-21 16:06 ` Shawn Guo
2017-06-22 7:48 ` Shawn Guo
2017-06-22 8:07 ` Wolfram Sang
2017-06-22 12:25 ` Shawn Guo [this message]
2017-06-22 13:22 ` Wolfram Sang
2017-06-10 14:32 ` [PATCH 0/2] Add I2C driver for ZTE ZX2967 family SoCs Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170622122558.GB23753@dragon \
--to=shawnguo@kernel.org \
--cc=baoyou.xie@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa@the-dreams.de \
--cc=xie.baoyou@sanechips.com.cn \
--cc=zhou.xin8@sanechips.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).