[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aPPrCv7arEYAOoS9@ashevche-desk.local>
Date: Sat, 18 Oct 2025 22:31:22 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: bigunclemax@...il.com, Dmitry Mastykin <mastichi@...il.com>,
Evgenii Shatokhin <e.shatokhin@...ro.com>,
Arturas Moskvinas <arturas.moskvinas@...il.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Andreas Kaessens <akaessens@...il.com>,
Zou Wei <zou_wei@...wei.com>,
Radim Pavlik <radim.pavlik@...-biometrics.com>,
Mike Looijmans <mike.looijmans@...ic.nl>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] pinctrl: mcp23s08: delete regmap reg_defaults to
avoid cache sync issues
On Mon, Oct 13, 2025 at 03:22:19PM +0200, Linus Walleij wrote:
> Hi Maksim,
>
> thanks for your patch!
>
> On Thu, Oct 9, 2025 at 3:29 PM <bigunclemax@...il.com> wrote:
> >
> > From: Maksim Kiselev <bigunclemax@...il.com>
> >
> > The probe function does not guarantee that chip registers are in their
> > default state. Thus using reg_defaults for regmap is incorrect.
> >
> > For example, the chip may have already been configured by the bootloader
> > before the Linux driver loads, or the mcp might not have a reset at all
> > and not reset a state between reboots.
> >
> > In such cases, using reg_defaults leads to the cache values diverging
> > from the actual registers values in the chip.
> >
> > Previous attempts to fix consequences of this issue were made in
> > 'commit 3ede3f8b4b4b ("pinctrl: mcp23s08: Reset all pins to input at
> > probe")', but this is insufficient. The OLAT register reset is also
> > required. And there's still potential for new issues arising due to cache
> > desynchronization of other registers.
> >
> > Therefore, remove reg_defaults entirely to eliminate the root cause
> > of these problems.
> >
> > Also remove the force reset all pins to input at probe as it is no longer
> > required.
> >
> > Link: https://lore.kernel.org/all/20251006074934.27180-1-bigunclemax@gmail.com/
> > Suggested-by: Mike Looijmans <mike.looijmans@...ic.nl>
> > Signed-off-by: Maksim Kiselev <bigunclemax@...il.com>
>
> I would surely like to see some Tested-by on this patch because
> this driver has *many* users.
>
> I added some people to the To: line who recently made changes to this
> driver, maybe they can test.
To add, I would suggest to look at Cypress driver, it uses the method to
recover defaults from the actual HW state.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists