From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Arturas Moskvinas <arturas.moskvinas@gmail.com>,
linus.walleij@linaro.org, u.kleine-koenig@pengutronix.de,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: 74x164: Enable output pins after registers are reset
Date: Tue, 27 Feb 2024 16:53:31 +0200 [thread overview]
Message-ID: <Zd33a69X9Ej4llbk@smile.fi.intel.com> (raw)
In-Reply-To: <CAMRc=McUsv9ic5aU7oAaJ06zWtpna0CkkxPWr2nqPhEig5vPOg@mail.gmail.com>
On Tue, Feb 27, 2024 at 02:14:40PM +0100, Bartosz Golaszewski wrote:
> On Tue, Feb 27, 2024 at 7:58 AM Arturas Moskvinas
> <arturas.moskvinas@gmail.com> wrote:
> > On 2/26/24 16:01, Andy Shevchenko wrote:
> > > On Mon, Feb 26, 2024 at 03:46:56PM +0200, Arturas Moskvinas wrote:
> > >> Move output enabling after chip registers are cleared.
> > > Does this fix anything? If so, maybe elaborate a bit the potential behavioural
> > > changes on the real lines.
> >
> > Chip outputs are enabled[1] before actual reset is performed[2] which
> > might cause pin output value to flip flop if previous pin value was set
> > to 1 in chip. Change fixes that behavior by making sure chip is fully
> > reset before all outputs are enabled.
> >
> > Flip-flop can be noticed when module is removed and inserted again and
> > one of the pins was changed to 1 before removal. 100 microsecond
> > flipping is noticeable on oscilloscope (100khz SPI bus).
> >
> > For a properly reset chip - output is enabled around 100 microseconds
> > (on 100khz SPI bus) later during probing process hence should be
> > irrelevant behavioral change.
> >
> > [1] -
> > https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L130
> > [2] -
> > https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L150
> >
> > Arturas Moskvinas
>
> And this is precisely the kind of information that needs to go into
> commit messages. I can tell *what* you're doing by looking at the
> code. What I can't tell is *why*.
+1. Please, add this to the commit message of v2, also try to find the commit
that you can mark to be fixed with help of Fixes tag.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-02-27 14:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 13:46 [PATCH] gpio: 74x164: Enable output pins after registers are reset Arturas Moskvinas
2024-02-26 14:01 ` Andy Shevchenko
2024-02-27 6:58 ` Arturas Moskvinas
2024-02-27 13:14 ` Bartosz Golaszewski
2024-02-27 14:53 ` Andy Shevchenko [this message]
2024-02-27 19:11 ` Arturas Moskvinas
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=Zd33a69X9Ej4llbk@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=arturas.moskvinas@gmail.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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