From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: bigunclemax@gmail.com, "Dmitry Mastykin" <mastichi@gmail.com>,
"Evgenii Shatokhin" <e.shatokhin@yadro.com>,
"Arturas Moskvinas" <arturas.moskvinas@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Andreas Kaessens" <akaessens@gmail.com>,
"Zou Wei" <zou_wei@huawei.com>,
"Radim Pavlik" <radim.pavlik@tbs-biometrics.com>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] pinctrl: mcp23s08: delete regmap reg_defaults to avoid cache sync issues
Date: Sat, 18 Oct 2025 22:31:22 +0300 [thread overview]
Message-ID: <aPPrCv7arEYAOoS9@ashevche-desk.local> (raw)
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@gmail.com> wrote:
> >
> > From: Maksim Kiselev <bigunclemax@gmail.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@topic.nl>
> > Signed-off-by: Maksim Kiselev <bigunclemax@gmail.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
next reply other threads:[~2025-10-18 19:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-18 19:31 Andy Shevchenko [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-10-09 13:26 [PATCH v2] pinctrl: mcp23s08: delete regmap reg_defaults to avoid cache sync issues bigunclemax
2025-10-13 13:22 ` Linus Walleij
2025-10-20 19:40 ` Sander Vanheule
2025-10-22 14:45 ` Mike Looijmans
2025-10-24 6:54 ` Mike Looijmans
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=aPPrCv7arEYAOoS9@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=akaessens@gmail.com \
--cc=arturas.moskvinas@gmail.com \
--cc=bigunclemax@gmail.com \
--cc=e.shatokhin@yadro.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mastichi@gmail.com \
--cc=mike.looijmans@topic.nl \
--cc=radim.pavlik@tbs-biometrics.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=zou_wei@huawei.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