[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdb4HDhN6G9JSe093jeBe4__jCFz_+r1grUbHwEr4Gt1hQ@mail.gmail.com>
Date: Mon, 13 Oct 2025 15:22:19 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: 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>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Andreas Kaessens <akaessens@...il.com>,
Zou Wei <zou_wei@...wei.com>, Radim Pavlik <radim.pavlik@...-biometrics.com>
Cc: 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
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.
Yours,
Linus Walleij
Powered by blists - more mailing lists