diff options
| author | Alvin Šipraga <alvin.sipraga@analog.com> | 2026-08-18 18:00:02 +0200 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-08-26 05:23:44 -0700 |
| commit | 21efadc62272cabee9bec27777ae75d84a9ca8a8 (patch) | |
| tree | cc1f7ebf58a4d469c578185ff524bb3f65f5051d /tools/perf/scripts/python/bin | |
| parent | b4d85f863e5a6f1fa01b186001af0f68f4f5239e (diff) | |
| download | linux-next-21efadc62272cabee9bec27777ae75d84a9ca8a8.tar.gz linux-next-21efadc62272cabee9bec27777ae75d84a9ca8a8.zip | |
Input: adp5588-keys - cache GPIO state before registering the gpiochip
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 the concrete 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>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20260818-adp5588-gpio-cache-v1-1-650a2674fc0d@analog.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
