lkml.org 
[lkml]   [2024]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] gpio: 74x164: Enable output pins after registers are reset
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



\
 
 \ /
  Last update: 2024-05-27 15:24    [W:0.089 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site