From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Alvin Šipraga" <alvin.sipraga@analog.com>
Cc: "Michael Hennerich" <michael.hennerich@analog.com>,
"Xiaolong Chen" <xiaolong.chen@gmail.com>,
"Yuanbo Ye" <yuan-bo.ye@motorola.com>,
"Tao Hu" <taohu@motorola.com>, "Nuno Sá" <nuno.sa@analog.com>,
linux-gpio@vger.kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: adp5588-keys - cache GPIO state before registering the gpiochip
Date: Wed, 26 Aug 2026 05:25:29 -0700 [thread overview]
Message-ID: <ao7bNPVKN1q4dWOS@google.com> (raw)
In-Reply-To: <20260818-adp5588-gpio-cache-v1-1-650a2674fc0d@analog.com>
On Tue, Aug 18, 2026 at 06:00:02PM +0200, Alvin Šipraga wrote:
> So as not to clobber any pre-programmed GPIO state in the execution
> of its gpiochip ops, the driver caches things during probe time.
> However, since those ops can be called both during and immediately after
> the call to devm_gpiochip_add_data(), it is imperative that things are
> cached before that. That's not the case right now, so reorder the two
> steps to prevent any clobbering.
>
> In a conrete example which motivated this change, a bootloader was
> preconfiguring an important GPIO output to HIGH before booting the
> kernel. Linux would then inadvertently set that output to LOW while
> configuring a GPIO hog on a discrete GPIO line within the same 8-bit
> bank (because the cached value was 0=LOW).
>
> Fixes: ba9f507a1bea ("Input: adp5588-keys - export unused GPIO pins")
> Signed-off-by: Alvin Šipraga <alvin.sipraga@analog.com>
Applied, thank you.
--
Dmitry
prev parent reply other threads:[~2026-08-26 12:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 16:00 [PATCH] Input: adp5588-keys - cache GPIO state before registering the gpiochip Alvin Šipraga
2026-08-18 16:08 ` Nuno Sá
2026-08-18 16:11 ` sashiko-bot
2026-08-18 16:27 ` Alvin Šipraga
2026-08-26 12:29 ` Dmitry Torokhov
2026-08-26 12:25 ` Dmitry Torokhov [this message]
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=ao7bNPVKN1q4dWOS@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=alvin.sipraga@analog.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=nuno.sa@analog.com \
--cc=taohu@motorola.com \
--cc=xiaolong.chen@gmail.com \
--cc=yuan-bo.ye@motorola.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.