From: "David.Wu" <david.wu@rock-chips.com>
To: Doug Anderson <dianders@chromium.org>
Cc: "Heiko Stübner" <heiko@sntech.de>,
"Wolfram Sang" <wsa@the-dreams.de>,
"Mark Rutland" <mark.rutland@arm.com>,
"Tao Huang" <huangtao@rock-chips.com>,
"Jianqun Xu" <xjq@rock-chips.com>,
"Lin Huang" <hl@rock-chips.com>,
"Pawel Moll" <pawel.moll@arm.com>,
"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Eddie Cai" <cf@rock-chips.com>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Rob Herring" <robh+dt@kernel.org>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"Kumar Gala" <galak@codeaurora.org>, Chris <zyw@rock-chips.com>,
"Brian Norris" <briannorris@google.com>,
"David Riley" <davidriley@google.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v7 4/9] i2c: rk3x: Move setting STATE_START and add STATE_SETUP
Date: Fri, 6 May 2016 11:20:41 +0800 [thread overview]
Message-ID: <572C0D89.9050708@rock-chips.com> (raw)
In-Reply-To: <CAD=FV=WVKpJJbqc=UYbeObDurjte0iQOzvLL++i=wM9=TBeCDQ@mail.gmail.com>
Hi Doug,
在 2016/5/6 6:56, Doug Anderson 写道:
> David,
>
> On Wed, May 4, 2016 at 7:13 AM, David Wu <david.wu@rock-chips.com> wrote:
>> Signed-off-by: David Wu <david.wu@rock-chips.com>
>> ---
>> Change in v7:
>> - none
>>
>> drivers/i2c/busses/i2c-rk3x.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> Probably this change could be dropped now. Switching the location of
> setting START_START was much more important when you were supporting
> HIGH SPEED mode. I don't think we need it anymore, right?
>
Yes, I would drop it next version,STATE_SETUP didn't make sense, it was
not much more important, because there was a error printk for
rk3x_i2c_setup() called failed.
> ...if we want to keep this change, I'd say:
>
> 1. Add a description, like maybe:
>
> To help with debugging add a STATE_SETUP between STATE_IDLE and
> STATE_START to make it more obvious that we're not actually idle but we
> also haven't initiated the start bit. This change is not expected to
> have any impact but it does delay the changing of state to STATE_START.
> If previously we were getting an erroneous interrupt before we actually
> sent the start bit we'll now be treating that differently. The new
> behavior (catching the erroneous interrupt) should be better.
>
> 2. Change "i2c->state = STATE_SETUP" to the _start_ of
> rk3x_i2c_setup(). That would have a better chance of catching a
> spurious interrupt.
>
> 3. Add an error check at the start of rk3x_i2c_irq() similar to the
> check for STATE_IDLE (or use the same check and modify the printk).
> Specifically the justification for adding STATE_SETUP is to help with
> debugging (catch interrupts that were unexpected and print more info
> about our state), so we should make it useful for this.
>
>
> -Doug
>
>
>
next prev parent reply other threads:[~2016-05-06 3:20 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 14:13 [PATCH v7 0/9] add i2c driver supported for rk3399 David Wu
2016-05-04 14:13 ` [PATCH v7 1/9] i2c: rk3x: add documentation to fields in "struct rk3x_i2c" David Wu
2016-05-04 23:45 ` Doug Anderson
2016-05-04 23:50 ` Doug Anderson
2016-05-04 14:13 ` [PATCH v7 2/9] i2c: rk3x: use struct "rk3x_i2c_calced_timings" David Wu
2016-05-05 22:55 ` Doug Anderson
2016-05-06 2:19 ` David.Wu
2016-05-04 14:13 ` [PATCH v7 3/9] i2c: rk3x: Remove redundant rk3x_i2c_clean_ipd() David Wu
2016-05-05 22:55 ` Doug Anderson
2016-05-04 14:13 ` [PATCH v7 4/9] i2c: rk3x: Move setting STATE_START and add STATE_SETUP David Wu
2016-05-05 22:56 ` Doug Anderson
2016-05-06 3:20 ` David.Wu [this message]
2016-05-04 14:33 ` [PATCH v7 5/9] i2c: rk3x: Change SoC data to not use array David Wu
2016-05-05 21:36 ` Heiko Stübner
2016-05-05 22:57 ` Doug Anderson
2016-05-04 14:34 ` [PATCH v7 6/9] i2c: rk3x: Move spec timing data to "static const" structs David Wu
2016-05-05 22:58 ` Doug Anderson
2016-05-06 4:55 ` David.Wu
2016-05-04 14:35 ` [PATCH v7 7/9] dt-bindings: i2c: rk3x: add support for rk3399 David Wu
2016-05-05 22:12 ` Rob Herring
2016-05-06 6:09 ` David.Wu
2016-05-05 22:59 ` Doug Anderson
2016-05-04 14:36 ` [PATCH v7 8/9] i2c: rk3x: add i2c support for rk3399 soc David Wu
2016-05-05 23:00 ` Doug Anderson
2016-05-06 9:32 ` David.Wu
2016-05-06 18:00 ` Doug Anderson
2016-05-04 14:37 ` [PATCH v7 9/9] i2c: rk3x: support fast-mode plus for rk3399 David Wu
2016-05-05 23:02 ` Doug Anderson
2016-05-06 2:12 ` David.Wu
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=572C0D89.9050708@rock-chips.com \
--to=david.wu@rock-chips.com \
--cc=andy.shevchenko@gmail.com \
--cc=briannorris@google.com \
--cc=cf@rock-chips.com \
--cc=davidriley@google.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=galak@codeaurora.org \
--cc=heiko@sntech.de \
--cc=hl@rock-chips.com \
--cc=huangtao@rock-chips.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=wsa@the-dreams.de \
--cc=xjq@rock-chips.com \
--cc=zyw@rock-chips.com \
/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
Powered by JetHome