* Re: [PATCH v2 09/10] Input: matrix_keyboard - replace linux/gpio.h inclusion
From: Dmitry Torokhov @ 2026-07-11 4:49 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-gpio, Linus Walleij, Bartosz Golaszewski, Arnd Bergmann,
Andrew Lunn, Sebastian Hesselbarth, Gregory Clement, Frank Li,
Robert Jarzmik, Krzysztof Kozlowski, Greg Ungerer,
Thomas Bogendoerfer, Hauke Mehrtens, Rafał Miłecki,
Yoshinori Sato, John Paul Adrian Glaubitz, Dominik Brodowski,
linux-kernel, linux-arm-kernel, linux-samsung-soc, patches,
linux-m68k, linux-mips, linux-sh, linux-input, linux-sunxi,
linux-phy, linux-rockchip, linux-sound, Bartosz Golaszewski
In-Reply-To: <20260710211954.1373336-10-arnd@kernel.org>
On Fri, Jul 10, 2026 at 11:19:54PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> linux/gpio.h is going away, so remove that since the driver already
> includes linux/gpio/consumer.h.
>
> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Adjusted the subject (s/replace/remove) and applied, thank you.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH v3] Input: qt1050 - wait for calibration to complete
From: Miles Krause @ 2026-07-11 3:18 UTC (permalink / raw)
To: mileskrause5200
Cc: Dmitry Torokhov, Rob Herring, Marco Felsch, linux-input,
linux-kernel, Sashiko
In-Reply-To: <20260710-qt1050-calibration-status-bit-v3-1-cc9ae3f0b2ec@gmail.com>
Please disregard this series. Further review showed that the
calibration sequence requires hardware validation and a broader
investigation than this patch provides.
Thank you for the review.
On Fri, Jul 10, 2026 at 10:52 PM Miles Krause via B4 Relay
<devnull+mileskrause5200.gmail.com@kernel.org> wrote:
>
> From: Miles Krause <mileskrause5200@gmail.com>
>
> The CALIBRATE flag is set when calibration begins and clears when it
> finishes. regmap_read_poll_timeout() stops when its condition becomes
> true, so the existing condition returns when calibration starts instead
> of waiting for it to finish.
>
> First wait for the flag to become set, then wait for it to clear before
> continuing with the soft reset. Use a 500 ms completion timeout to leave
> margin beyond the usual calibration time.
>
> Fixes: cbebf5addec1 ("Input: qt1050 - add Microchip AT42QT1050 support")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/r/20260711024428.ED7FF1F000E9@smtp.kernel.org
> Signed-off-by: Miles Krause <mileskrause5200@gmail.com>
> ---
> Compile-tested on x86_64 with:
>
> make O=out allmodconfig
> make O=out W=1 drivers/input/keyboard/qt1050.o
>
> Sparse-tested with:
>
> make O=out-sparse allmodconfig
> make O=out-sparse C=1 CHECK=sparse drivers/input/keyboard/qt1050.o
> ---
> Changes in v3:
> - Wait for calibration to start before waiting for completion.
> - Increase the calibration completion timeout to 500 ms.
> - Link to v2: https://patch.msgid.link/20260710-qt1050-calibration-status-bit-v2-1-a58da64bdf7e@gmail.com
>
> Changes in v2:
> - Invert the polling condition to wait for calibration to finish.
> - Reframe the change as a bug fix based on Sashiko's review.
> - Link to v1: https://patch.msgid.link/20260710-qt1050-calibration-status-bit-v1-1-e4f7d1d797b6@gmail.com
>
> To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> To: Rob Herring <robh@kernel.org>
> To: Marco Felsch <m.felsch@pengutronix.de>
> Cc: linux-input@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/input/keyboard/qt1050.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/keyboard/qt1050.c b/drivers/input/keyboard/qt1050.c
> index f9f480c91032..8cd061587302 100644
> --- a/drivers/input/keyboard/qt1050.c
> +++ b/drivers/input/keyboard/qt1050.c
> @@ -27,7 +27,8 @@
> #define QT1050_FW_VERSION 0x01
>
> /* Detection status */
> -#define QT1050_DET_STATUS 0x02
> +#define QT1050_DET_STATUS 0x02
> +#define QT1050_DET_STATUS_CALIBRATE BIT(7)
>
> /* Key status */
> #define QT1050_KEY_STATUS 0x03
> @@ -498,9 +499,18 @@ static int qt1050_probe(struct i2c_client *client)
> return err;
> }
> err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
> - status >> 7 == 1, 10000, 200000);
> + status & QT1050_DET_STATUS_CALIBRATE,
> + 10000, 200000);
> if (err) {
> - dev_err(dev, "Calibration failed: %d\n", err);
> + dev_err(dev, "Calibration did not start: %d\n", err);
> + return err;
> + }
> +
> + err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
> + !(status & QT1050_DET_STATUS_CALIBRATE),
> + 10000, 500000);
> + if (err) {
> + dev_err(dev, "Calibration did not complete: %d\n", err);
> return err;
> }
>
>
> ---
> base-commit: c8f174900926d3b58cd048ac33b4cbb3de419bfe
> change-id: 20260710-qt1050-calibration-status-bit-0b2e479ffd4b
>
> Best regards,
> --
> Miles Krause <mileskrause5200@gmail.com>
>
>
^ permalink raw reply
* Re: [PATCH v3] Input: qt1050 - wait for calibration to complete
From: sashiko-bot @ 2026-07-11 3:05 UTC (permalink / raw)
To: Miles Krause; +Cc: linux-input, dmitry.torokhov
In-Reply-To: <20260710-qt1050-calibration-status-bit-v3-1-cc9ae3f0b2ec@gmail.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
Pre-existing issues:
- [High] Polling for a transient 'calibration started' state makes the probe highly susceptible to random timeouts due to thread preemption or scheduling delays.
- [High] The calibration is triggered and awaited before the soft reset and firmware data application, rendering the calibration useless and leaving the device uncalibrated.
- [High] Command register `QT1050_RES_CAL` is not volatile, leading to cached commands being erroneously re-written.
- [High] If `regmap_write()` fails during suspend, the IRQ remains disabled indefinitely.
--
--- Patch [1]: [PATCH v3] Input: qt1050 - wait for calibration to complete ---
commit ae3cb773621fc88acc85ed8d8f19253b64a18472
Author: Miles Krause <mileskrause5200@gmail.com>
Input: qt1050 - wait for calibration to complete
The CALIBRATE flag is set when calibration begins and clears when it
finishes. regmap_read_poll_timeout() stops when its condition becomes
true, so the existing condition returns when calibration starts instead
of waiting for it to finish.
First wait for the flag to become set, then wait for it to clear before
continuing with the soft reset. Use a 500 ms completion timeout to leave
margin beyond the usual calibration time.
Link: https://lore.kernel.org/r/20260711024428.ED7FF1F000E9@smtp.kernel.org
> --- a/drivers/input/keyboard/qt1050.c
> +++ b/drivers/input/keyboard/qt1050.c
[ ... ]
> @@ -498,9 +499,18 @@ static int qt1050_probe(struct i2c_client *client)
> return err;
> }
> err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
> - status >> 7 == 1, 10000, 200000);
> + status & QT1050_DET_STATUS_CALIBRATE,
> + 10000, 200000);
[Severity: High]
This is a pre-existing issue, but does polling for a transient state here
make the probe susceptible to random timeouts?
If calibration completes very quickly before the first read, or if the
kernel thread is delayed or preempted, could we miss the 1 state entirely
and time out after 200ms? Since this causes probe to fail with -ETIMEDOUT,
could this randomly leave the device unusable on faster buses?
> + if (err) {
> + dev_err(dev, "Calibration did not start: %d\n", err);
> + return err;
> + }
> +
> + err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
> + !(status & QT1050_DET_STATUS_CALIBRATE),
> + 10000, 500000);
> + if (err) {
> + dev_err(dev, "Calibration did not complete: %d\n", err);
> return err;
> }
[Severity: High]
This isn't a bug introduced by this patch, but looking at the sequence in
qt1050_probe(), calibration is triggered before the soft reset and custom
firmware data application:
qt1050_probe() {
...
err = regmap_update_bits(ts->regmap, QT1050_RES_CAL, 0x7f,
QT1050_RES_CAL_CALIBRATE);
...
err = regmap_update_bits(ts->regmap, QT1050_RES_CAL,
QT1050_RES_CAL_RESET, QT1050_RES_CAL_RESET);
...
err = qt1050_apply_fw_data(ts);
}
Does this logic render the calibration ineffective? Modifying the physical
capacitive tuning parameters usually requires recalibration after they are
set to establish accurate baselines, rather than before.
[Severity: High]
Also pre-existing, but do these read-modify-write operations modify a cached
command register and accidentally accumulate bits?
QT1050_RES_CAL is omitted from the volatile registers list in
qt1050_volatile_reg(). Triggering calibration caches BIT(1). Later,
triggering the soft reset causes regmap_update_bits() to read BIT(1) from
the cache, set BIT(7), and write BIT(7) | BIT(1) to the hardware.
Could this trigger both a calibration and a soft reset simultaneously and
cause unpredictable firmware behavior?
[Severity: High]
This is a pre-existing issue unrelated to the patch above, but looking at
qt1050_suspend(), if regmap_write() fails, does the IRQ remain permanently
disabled?
qt1050_suspend() {
disable_irq(client->irq);
...
return regmap_write(ts->regmap, QT1050_LPMODE,
device_may_wakeup(dev) ? 125 : 0);
}
If the I2C write fails, the function returns the error directly.
Since the PM core will not call resume for a device that failed to suspend,
enable_irq() is never called. Could this leave the touch panel permanently
dead until the module is reloaded?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710-qt1050-calibration-status-bit-v3-1-cc9ae3f0b2ec@gmail.com?part=1
^ permalink raw reply
* [PATCH v3] Input: qt1050 - wait for calibration to complete
From: Miles Krause via B4 Relay @ 2026-07-11 2:52 UTC (permalink / raw)
To: Dmitry Torokhov, Rob Herring, Marco Felsch
Cc: linux-input, linux-kernel, Sashiko, Miles Krause
From: Miles Krause <mileskrause5200@gmail.com>
The CALIBRATE flag is set when calibration begins and clears when it
finishes. regmap_read_poll_timeout() stops when its condition becomes
true, so the existing condition returns when calibration starts instead
of waiting for it to finish.
First wait for the flag to become set, then wait for it to clear before
continuing with the soft reset. Use a 500 ms completion timeout to leave
margin beyond the usual calibration time.
Fixes: cbebf5addec1 ("Input: qt1050 - add Microchip AT42QT1050 support")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/r/20260711024428.ED7FF1F000E9@smtp.kernel.org
Signed-off-by: Miles Krause <mileskrause5200@gmail.com>
---
Compile-tested on x86_64 with:
make O=out allmodconfig
make O=out W=1 drivers/input/keyboard/qt1050.o
Sparse-tested with:
make O=out-sparse allmodconfig
make O=out-sparse C=1 CHECK=sparse drivers/input/keyboard/qt1050.o
---
Changes in v3:
- Wait for calibration to start before waiting for completion.
- Increase the calibration completion timeout to 500 ms.
- Link to v2: https://patch.msgid.link/20260710-qt1050-calibration-status-bit-v2-1-a58da64bdf7e@gmail.com
Changes in v2:
- Invert the polling condition to wait for calibration to finish.
- Reframe the change as a bug fix based on Sashiko's review.
- Link to v1: https://patch.msgid.link/20260710-qt1050-calibration-status-bit-v1-1-e4f7d1d797b6@gmail.com
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rob Herring <robh@kernel.org>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/input/keyboard/qt1050.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/qt1050.c b/drivers/input/keyboard/qt1050.c
index f9f480c91032..8cd061587302 100644
--- a/drivers/input/keyboard/qt1050.c
+++ b/drivers/input/keyboard/qt1050.c
@@ -27,7 +27,8 @@
#define QT1050_FW_VERSION 0x01
/* Detection status */
-#define QT1050_DET_STATUS 0x02
+#define QT1050_DET_STATUS 0x02
+#define QT1050_DET_STATUS_CALIBRATE BIT(7)
/* Key status */
#define QT1050_KEY_STATUS 0x03
@@ -498,9 +499,18 @@ static int qt1050_probe(struct i2c_client *client)
return err;
}
err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
- status >> 7 == 1, 10000, 200000);
+ status & QT1050_DET_STATUS_CALIBRATE,
+ 10000, 200000);
if (err) {
- dev_err(dev, "Calibration failed: %d\n", err);
+ dev_err(dev, "Calibration did not start: %d\n", err);
+ return err;
+ }
+
+ err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
+ !(status & QT1050_DET_STATUS_CALIBRATE),
+ 10000, 500000);
+ if (err) {
+ dev_err(dev, "Calibration did not complete: %d\n", err);
return err;
}
---
base-commit: c8f174900926d3b58cd048ac33b4cbb3de419bfe
change-id: 20260710-qt1050-calibration-status-bit-0b2e479ffd4b
Best regards,
--
Miles Krause <mileskrause5200@gmail.com>
^ permalink raw reply related
* Re: [PATCH v2] Input: qt1050 - wait for calibration to complete
From: sashiko-bot @ 2026-07-11 2:44 UTC (permalink / raw)
To: Miles Krause; +Cc: linux-input, dmitry.torokhov
In-Reply-To: <20260710-qt1050-calibration-status-bit-v2-1-a58da64bdf7e@gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [High] Race condition in calibration polling loop causes immediate premature exit.
- [Medium] The 200ms timeout is dangerously tight to wait for the entire calibration process to finish.
Pre-existing issues:
- [High] The interrupt handler reports static firmware keycodes instead of the dynamic `keycodes` array, breaking userspace key remapping (`EVIOCSKEYCODE`).
--
--- Patch [1]: [PATCH v2] Input: qt1050 - wait for calibration to complete ---
commit 4b6f3ed53ac1e4647765d5813d7b91b2a1e6100d
Author: Miles Krause <mileskrause5200@gmail.com>
Input: qt1050 - wait for calibration to complete
The commit fixes a polling condition where regmap_read_poll_timeout() stopped
when calibration started rather than when it finished. It names the
calibration status bit and inverts the polling condition.
Closes: https://lore.kernel.org/r/20260711011903.0605C1F000E9@smtp.kernel.org
> diff --git a/drivers/input/keyboard/qt1050.c b/drivers/input/keyboard/qt1050.c
> index f9f480c910325..457acae0986aa 100644
> --- a/drivers/input/keyboard/qt1050.c
> +++ b/drivers/input/keyboard/qt1050.c
[ ... ]
> @@ -498,7 +499,8 @@ static int qt1050_probe(struct i2c_client *client)
> return err;
> }
> err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
> - status >> 7 == 1, 10000, 200000);
> + !(status & QT1050_DET_STATUS_CALIBRATE),
[Severity: High]
Will this polling condition evaluate to true on the very first read?
Because I2C transactions and hardware state changes take time, the first read
in qt1050_probe() will likely return a status where the calibration bit is
still 0. This would instantly satisfy the wait condition and bypass the loop
before calibration even begins, leaving the device in an uncalibrated state
when the subsequent soft reset occurs.
> + 10000, 200000);
[Severity: Medium]
Is this 200ms maximum timeout dangerously tight for an operation that takes
approximately 200ms to complete?
The original 200ms timeout was used to wait for calibration to start, but
using it to wait for the entire calibration process leaves virtually no margin
for hardware or timing variances, potentially causing the probe to
sporadically fail with -ETIMEDOUT.
> if (err) {
> dev_err(dev, "Calibration failed: %d\n", err);
> return err;
[Severity: High]
This is a pre-existing issue, but does the interrupt handler report the static
firmware keycode instead of the dynamically mapped one?
During probe, the driver properly sets input->keycode = ts->keycodes to
support dynamic remapping, but in qt1050_irq_threaded() it hardcodes the
static array:
drivers/input/keyboard/qt1050.c:qt1050_irq_threaded() {
...
input_report_key(input, ts->keys[i].keycode,
test_bit(i, &new_keys));
...
}
When userspace remaps a key via EVIOCSKEYCODE, the input core updates
ts->keycodes and clears the old keycode's bit. Because the ISR still reports
the old, unmapped keycode, the input core safely filters it out and drops the
event, breaking userspace key remapping entirely.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710-qt1050-calibration-status-bit-v2-1-a58da64bdf7e@gmail.com?part=1
^ permalink raw reply
* [PATCH v2] Input: qt1050 - wait for calibration to complete
From: Miles Krause via B4 Relay @ 2026-07-11 2:35 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: linux-input, linux-kernel, Sashiko, Miles Krause, Rob Herring,
Marco Felsch
From: Miles Krause <mileskrause5200@gmail.com>
The CALIBRATE flag is set when calibration begins and clears when it
finishes. regmap_read_poll_timeout() stops when its condition becomes
true, so the existing condition returns when calibration starts instead
of waiting for it to finish.
Name the calibration status bit and invert the polling condition so the
subsequent soft reset does not potentially interrupt calibration.
Fixes: cbebf5addec1 ("Input: qt1050 - add Microchip AT42QT1050 support")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/r/20260711011903.0605C1F000E9@smtp.kernel.org
Signed-off-by: Miles Krause <mileskrause5200@gmail.com>
---
Compile-tested on x86_64 with:
make O=out allmodconfig
make O=out W=1 drivers/input/keyboard/qt1050.o
Sparse-tested with:
make O=out-sparse allmodconfig
make O=out-sparse C=1 CHECK=sparse drivers/input/keyboard/qt1050.o
---
Changes in v2:
- Invert the polling condition to wait for calibration to finish.
- Reframe the change as a bug fix based on Sashiko's review.
- Link to v1: https://patch.msgid.link/20260710-qt1050-calibration-status-bit-v1-1-e4f7d1d797b6@gmail.com
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rob Herring <robh@kernel.org>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/input/keyboard/qt1050.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/qt1050.c b/drivers/input/keyboard/qt1050.c
index f9f480c91032..457acae0986a 100644
--- a/drivers/input/keyboard/qt1050.c
+++ b/drivers/input/keyboard/qt1050.c
@@ -27,7 +27,8 @@
#define QT1050_FW_VERSION 0x01
/* Detection status */
-#define QT1050_DET_STATUS 0x02
+#define QT1050_DET_STATUS 0x02
+#define QT1050_DET_STATUS_CALIBRATE BIT(7)
/* Key status */
#define QT1050_KEY_STATUS 0x03
@@ -498,7 +499,8 @@ static int qt1050_probe(struct i2c_client *client)
return err;
}
err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
- status >> 7 == 1, 10000, 200000);
+ !(status & QT1050_DET_STATUS_CALIBRATE),
+ 10000, 200000);
if (err) {
dev_err(dev, "Calibration failed: %d\n", err);
return err;
---
base-commit: c8f174900926d3b58cd048ac33b4cbb3de419bfe
change-id: 20260710-qt1050-calibration-status-bit-0b2e479ffd4b
Best regards,
--
Miles Krause <mileskrause5200@gmail.com>
^ permalink raw reply related
* Re: [PATCH] Input: qt1050 - name calibration status bit
From: sashiko-bot @ 2026-07-11 1:19 UTC (permalink / raw)
To: Miles Krause; +Cc: linux-input, dmitry.torokhov
In-Reply-To: <20260710-qt1050-calibration-status-bit-v1-1-e4f7d1d797b6@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The polling loop for calibration completion exits immediately because the break condition is inverted, potentially causing probe failure or aborted calibration.
--
--- Patch [1]: [PATCH] Input: qt1050 - name calibration status bit ---
commit 8a227bbb51956d6b0303c06859d65e498d26eb5f
Author: Miles Krause <mileskrause5200@gmail.com>
Input: qt1050 - name calibration status bit
This commit introduces a named constant for the calibration status bit 7
in the QT1050_DET_STATUS register. It replaces an open-coded shift and
comparison with this new constant in the calibration polling loop to
improve readability.
> diff --git a/drivers/input/keyboard/qt1050.c b/drivers/input/keyboard/qt1050.c
> index f9f480c910325..2371ac027aabd 100644
> --- a/drivers/input/keyboard/qt1050.c
> +++ b/drivers/input/keyboard/qt1050.c
[ ... ]
> @@ -498,7 +499,8 @@ static int qt1050_probe(struct i2c_client *client)
> return err;
> }
> err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
> - status >> 7 == 1, 10000, 200000);
> + status & QT1050_DET_STATUS_CALIBRATE,
> + 10000, 200000);
[Severity: High]
This is a pre-existing issue, but does this polling condition in qt1050_probe()
wait for the calibration to complete or for it to start?
The regmap_read_poll_timeout() macro exits when the condition evaluates
to true. Since QT1050_DET_STATUS_CALIBRATE (bit 7) indicates calibration is
in progress, this condition is true while running and false when complete.
If calibration completes before the first read, won't this poll for the full
200ms timeout and return -ETIMEDOUT, causing the probe to fail? Alternatively,
if calibration is still running, won't this exit immediately and allow the
subsequent soft-reset to abort the calibration process?
Should this condition be inverted to check that the calibrate bit is cleared?
> if (err) {
> dev_err(dev, "Calibration failed: %d\n", err);
> return err;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710-qt1050-calibration-status-bit-v1-1-e4f7d1d797b6@gmail.com?part=1
^ permalink raw reply
* [PATCH] Input: qt1050 - name calibration status bit
From: Miles Krause via B4 Relay @ 2026-07-11 1:09 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, Miles Krause
From: Miles Krause <mileskrause5200@gmail.com>
Detection status bit 7 indicates that a calibration cycle is in
progress. Define a name for the bit and use it in the polling
condition instead of an open-coded shift and comparison.
No functional change.
Signed-off-by: Miles Krause <mileskrause5200@gmail.com>
---
Compile-tested on x86_64 with:
make O=out allmodconfig
make O=out W=1 drivers/input/keyboard/qt1050.o
Sparse-tested with:
make O=out-sparse allmodconfig
make O=out-sparse C=1 CHECK=sparse drivers/input/keyboard/qt1050.o
---
drivers/input/keyboard/qt1050.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/qt1050.c b/drivers/input/keyboard/qt1050.c
index f9f480c91032..2371ac027aab 100644
--- a/drivers/input/keyboard/qt1050.c
+++ b/drivers/input/keyboard/qt1050.c
@@ -27,7 +27,8 @@
#define QT1050_FW_VERSION 0x01
/* Detection status */
-#define QT1050_DET_STATUS 0x02
+#define QT1050_DET_STATUS 0x02
+#define QT1050_DET_STATUS_CALIBRATE BIT(7)
/* Key status */
#define QT1050_KEY_STATUS 0x03
@@ -498,7 +499,8 @@ static int qt1050_probe(struct i2c_client *client)
return err;
}
err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
- status >> 7 == 1, 10000, 200000);
+ status & QT1050_DET_STATUS_CALIBRATE,
+ 10000, 200000);
if (err) {
dev_err(dev, "Calibration failed: %d\n", err);
return err;
---
base-commit: c8f174900926d3b58cd048ac33b4cbb3de419bfe
change-id: 20260710-qt1050-calibration-status-bit-0b2e479ffd4b
Best regards,
--
Miles Krause <mileskrause5200@gmail.com>
^ permalink raw reply related
* Re: [PATCH v2 5/6] tools/build: selftests: Allow versioning LLVM lld
From: Ihor Solodrai @ 2026-07-10 22:30 UTC (permalink / raw)
To: James Clark, Nathan Chancellor, Nick Desaulniers, Bill Wendling,
Justin Stitt, Jiri Kosina, Benjamin Tissoires, Shuah Khan,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Andrii Nakryiko, Eduard Zingerman,
Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau,
Kumar Kartikeya Dwivedi, Song Liu, Yonghong Song
Cc: linux-kernel, llvm, linux-input, linux-kselftest, bpf,
linux-perf-users
In-Reply-To: <20260518-james-perf-llvm-version-v2-5-f12cc4f031d8@linaro.org>
On 5/18/26 2:03 AM, James Clark wrote:
> Building with LLVM=... could result in a different version of lld being
> used than the main toolchain for liburandom_read.so because it's
> hardcoded to "lld" in this makefile.
>
> Make it consistent with the rest of the LLVM toolchain by adding an LLD
> variable to Makefile.include. Keep the fallback for other architectures
> in tools/testing/selftests/bpf/Makefile as it seems like it's something
> specific to this make rule and shouldn't be global.
>
> Clang only accepts either a full path to "/x/x/ld.lld" or "lld-15" style
> inputs to "-fuse-ld=", so the only way to make it work with both
> prefixed and postfixed paths is to always take the full path. Also I
> don't think the original use of "lld" over "ld.lld" was significant as
> this is always a linux build, so that can be changed to make it work in
> both cases.
>
> Signed-off-by: James Clark <james.clark@linaro.org>
> ---
> tools/scripts/Makefile.include | 2 ++
> tools/testing/selftests/bpf/Makefile | 8 ++++----
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
> index 380ad84ac51e..5c2d505cba62 100644
> --- a/tools/scripts/Makefile.include
> +++ b/tools/scripts/Makefile.include
> @@ -67,6 +67,7 @@ ifneq ($(LLVM),)
> $(call allow-override,HOSTAR,$(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX))
> $(call allow-override,LD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX))
> $(call allow-override,HOSTLD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX))
> + $(call allow-override,LLD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX))
> $(call allow-override,CXX,$(LLVM_PREFIX)clang++$(LLVM_SUFFIX))
> $(call allow-override,STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX))
> $(call allow-override,LLVM_STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX))
> @@ -91,6 +92,7 @@ else
> # Some tools still require Clang, LLC and/or LLVM utils
> $(call allow-override,CLANG,clang)
> $(call allow-override,LLC,llc)
> + $(call allow-override,LLD,ld.lld)
> $(call allow-override,LLVM_CONFIG,llvm-config)
> $(call allow-override,LLVM_OBJCOPY,llvm-objcopy)
> $(call allow-override,LLVM_STRIP,llvm-strip)
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 6ef6872adbc3..836e783f0170 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -245,9 +245,9 @@ $(OUTPUT)/%:%.c
>
> # LLVM's ld.lld doesn't support all the architectures, so use it only on x86
> ifeq ($(SRCARCH),$(filter $(SRCARCH),x86 riscv))
> -LLD := lld
> +USE_LD := $(shell command -v $(LLD))
> else
> -LLD := $(shell command -v $(LD))
> +USE_LD := $(shell command -v $(LD))
Can confirm v2 fixes the v1 breakage I reported.
One nit on the empty USE_LD case the bot raised. It isn't actually a
build failure: if command -v finds nothing, USE_LD is empty and clang
gets a bare "-fuse-ld=".
Since it's unintentional, how about we just add a check to ensure the
linker was found?
Something like:
$(Q)test -n "$(USE_LD)" || { \
echo "$@: linker '$(LINKER)' not found - add it to PATH, or pass \
LLVM=/path/ or LLD=/abs/ld.lld" >&2; exit 1; }
> endif
>
> # Filter out -static for liburandom_read.so and its dependent targets so that static builds
> @@ -258,7 +258,7 @@ $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urandom_read_lib2.c liburandom
> $(filter-out -static,$(CFLAGS) $(LDFLAGS)) \
> $(filter %.c,$^) $(filter-out -static,$(LDLIBS)) \
> -Wno-unused-command-line-argument \
> - -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \
> + -fuse-ld=$(USE_LD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \
> -Wl,--version-script=liburandom_read.map \
> -fPIC -shared -o $@
>
> @@ -268,7 +268,7 @@ $(OUTPUT)/urandom_read: urandom_read.c urandom_read_aux.c $(OUTPUT)/liburandom_r
> $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $(filter %.c,$^) \
> -Wno-unused-command-line-argument \
> -lurandom_read $(filter-out -static,$(LDLIBS)) -L$(OUTPUT) \
> - -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \
> + -fuse-ld=$(USE_LD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \
> -Wl,-rpath=. -o $@
>
> $(OUTPUT)/sign-file: ../../../../scripts/sign-file.c
>
^ permalink raw reply
* Re: [PATCH v2 4/6] tools/build: Allow versioning LLVM readelf
From: Ihor Solodrai @ 2026-07-10 22:29 UTC (permalink / raw)
To: James Clark, Nathan Chancellor, Nick Desaulniers, Bill Wendling,
Justin Stitt, Jiri Kosina, Benjamin Tissoires, Shuah Khan,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Andrii Nakryiko, Eduard Zingerman,
Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau,
Kumar Kartikeya Dwivedi, Song Liu, Yonghong Song
Cc: linux-kernel, llvm, linux-input, linux-kselftest, bpf,
linux-perf-users
In-Reply-To: <20260518-james-perf-llvm-version-v2-4-f12cc4f031d8@linaro.org>
On 5/18/26 2:03 AM, James Clark wrote:
> Documentation/kbuild/llvm.rst mentions that readelf is included in the
> LLVM toolchain, but it's not currently included in this block.
>
> Add it so that LLVM=... options also apply to readelf. Users in tools/
> were Perf which was hardcoding it, and another was the BPF makefile.
> Both already include Makefile.include so convert them to use the new
> variable.
>
> It also didn't have the cross compile prefix, so either readelf didn't
> mind opening cross binaries, or it wasn't working for cross builds.
I'm pretty sure it's the former. readelf/llvm-readelf are only used
libbpf makefile to read ELF symbol tables, which should be arch-independent.
We've been cross-compiling the kernel (and libbpf) on BPF CI for a
long time. So the unprefixed readelf is already working, and adding
the $(CROSS_COMPILE) prefix only adds a new requirement.
I don't think this change in tools/lib/bpf/Makefile is a good idea,
we could potentially break some environments. Even though hardcoded
readelf doesn't look nice.
>
> Signed-off-by: James Clark <james.clark@linaro.org>
> ---
> tools/lib/bpf/Makefile | 8 ++++----
> tools/perf/Makefile.perf | 1 -
> tools/scripts/Makefile.include | 2 ++
> 3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
> index 168140f8e646..180dca9c57c8 100644
> --- a/tools/lib/bpf/Makefile
> +++ b/tools/lib/bpf/Makefile
> @@ -114,12 +114,12 @@ PC_FILE := $(addprefix $(OUTPUT),$(PC_FILE))
>
> TAGS_PROG := $(if $(shell which etags 2>/dev/null),etags,ctags)
>
> -GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(BPF_IN_SHARED) | \
> +GLOBAL_SYM_COUNT = $(shell $(READELF) -s --wide $(BPF_IN_SHARED) | \
> cut -d "@" -f1 | sed 's/_v[0-9]_[0-9]_[0-9].*//' | \
> sed 's/\[.*\]//' | \
> awk '/GLOBAL/ && /DEFAULT/ && !/UND|ABS/ {print $$NF}' | \
> sort -u | wc -l)
> -VERSIONED_SYM_COUNT = $(shell readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \
> +VERSIONED_SYM_COUNT = $(shell $(READELF) --dyn-syms --wide $(OUTPUT)libbpf.so | \
> sed 's/\[.*\]//' | \
> awk '/GLOBAL/ && /DEFAULT/ && !/UND|ABS/ {print $$NF}' | \
> grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | sort -u | wc -l)
> @@ -182,12 +182,12 @@ check_abi: $(OUTPUT)libbpf.so $(VERSION_SCRIPT)
> "versioned symbols in $^ ($(VERSIONED_SYM_COUNT))." \
> "Please make sure all LIBBPF_API symbols are" \
> "versioned in $(VERSION_SCRIPT)." >&2; \
> - readelf -s --wide $(BPF_IN_SHARED) | \
> + $(READELF) -s --wide $(BPF_IN_SHARED) | \
> cut -d "@" -f1 | sed 's/_v[0-9]_[0-9]_[0-9].*//' | \
> sed 's/\[.*\]//' | \
> awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'| \
> sort -u > $(OUTPUT)libbpf_global_syms.tmp; \
> - readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \
> + $(READELF) --dyn-syms --wide $(OUTPUT)libbpf.so | \
> sed 's/\[.*\]//' | \
> awk '/GLOBAL/ && /DEFAULT/ && !/UND|ABS/ {print $$NF}'| \
> grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | \
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 0aba14f22a06..63276bf55856 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -215,7 +215,6 @@ FLEX ?= flex
> BISON ?= bison
> STRIP = strip
> AWK = awk
> -READELF ?= readelf
>
> # include Makefile.config by default and rule out
> # non-config cases
> diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
> index e81e5b479c56..380ad84ac51e 100644
> --- a/tools/scripts/Makefile.include
> +++ b/tools/scripts/Makefile.include
> @@ -73,6 +73,7 @@ ifneq ($(LLVM),)
> $(call allow-override,LLC,$(LLVM_PREFIX)llc$(LLVM_SUFFIX))
> $(call allow-override,LLVM_CONFIG,$(LLVM_PREFIX)llvm-config$(LLVM_SUFFIX))
> $(call allow-override,LLVM_OBJCOPY,$(LLVM_PREFIX)llvm-objcopy$(LLVM_SUFFIX))
> + $(call allow-override,READELF,$(LLVM_PREFIX)llvm-readelf$(LLVM_SUFFIX))
> else
> # Allow setting various cross-compile vars or setting CROSS_COMPILE as a prefix.
> $(call allow-override,CC,$(CROSS_COMPILE)gcc)
> @@ -80,6 +81,7 @@ else
> $(call allow-override,LD,$(CROSS_COMPILE)ld)
> $(call allow-override,CXX,$(CROSS_COMPILE)g++)
> $(call allow-override,STRIP,$(CROSS_COMPILE)strip)
> + $(call allow-override,READELF,$(CROSS_COMPILE)readelf)
>
> # Host versions aren't prefixed
> $(call allow-override,HOSTAR,ar)
>
^ permalink raw reply
* Re: [PATCH v2 5/6] tools/build: selftests: Allow versioning LLVM lld
From: Ihor Solodrai @ 2026-07-10 22:26 UTC (permalink / raw)
To: James Clark
Cc: sashiko-reviews, dmitry.torokhov, linux-perf-users, bpf,
linux-input, Arnaldo Carvalho de Melo
In-Reply-To: <e060c4cf-59fe-42f0-bb05-adb520a6c80a@linaro.org>
On 5/21/26 6:16 AM, James Clark wrote:
>
>
> On 20/05/2026 8:50 pm, Arnaldo Carvalho de Melo wrote:
>> On Mon, May 18, 2026 at 10:47:53AM +0100, James Clark wrote:
>>>
>>> [...]
>>
>> Hey, this touches several tools and libs, did you get acks besides the
>> one from Ian?
>>
>> - Arnaldo
>
> Only the build bpf failure report from Ihor on V1 but nothing from anyone on V2. Ihor did you get a chance to look at this version?
Hi James. I'm terribly sorry for long delay, I missed your ping.
The first thing to note is that the series doesn't apply anymore to
either bpf-next or 7.2-rc2, so please respin when you get a chance.
Other than that I have two comments.
Will reply to the patches shortly.
>
> Thanks
> James
>
^ permalink raw reply
* Re: [PATCH 6/6] [v6] gpiolib: turn off legacy interface by default
From: sashiko-bot @ 2026-07-10 21:35 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: dmitry.torokhov, linux-input, linux-leds, lee
In-Reply-To: <20260710211854.1371746-7-arnd@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Drivers MFD_AAT2870_CORE, MFD_SI476X_CORE, and SND_SOC_TLV320DAC33 become silently unselectable on standard kernels because they still use `depends on GPIOLIB_LEGACY`.
--
--- Patch [6]: [PATCH 6/6] [v6] gpiolib: turn off legacy interface by default ---
commit c81360523a83f6de8b9f91867c27fb9f36e0da52
Author: Arnd Bergmann <arnd@arndb.de>
gpiolib: turn off legacy interface by default
This commit turns off the legacy GPIO interface by default, allowing it to
be enabled manually only for compile testing. It relies on the assumption
that all legacy users now select CONFIG_GPIOLIB_LEGACY.
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 020e51e30317a..543de15a12f63 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -4,7 +4,14 @@
> #
>
> config GPIOLIB_LEGACY
> - def_bool y
> + bool "Legacy GPIO interfaces" if COMPILE_TEST
[Severity: High]
Does this change silently disable MFD_AAT2870_CORE, MFD_SI476X_CORE, and
SND_SOC_TLV320DAC33 in production builds?
The commit message states that all users of the legacy interface now select
CONFIG_GPIOLIB_LEGACY, but it appears these drivers still depend on it
instead:
drivers/mfd/Kconfig:
config MFD_AAT2870_CORE
...
depends on GPIOLIB_LEGACY
drivers/mfd/Kconfig:
config MFD_SI476X_CORE
...
depends on GPIOLIB_LEGACY
sound/soc/codecs/Kconfig:
config SND_SOC_TLV320DAC33
...
depends on GPIOLIB_LEGACY
Since GPIOLIB_LEGACY now defaults to n and its prompt is hidden without
COMPILE_TEST, won't these dependencies prevent the drivers from being
selected on standard kernels, causing their hardware to stop functioning?
> + help
> + There are a few legacy platforms that use the traditional GPIO
> + number based interfaces instead of GPIO descriptors.
> + Say Y here to enable build testing drivers that are specific
> + to those platforms.
> +
> + If unsure, say N.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710211854.1371746-1-arnd@kernel.org?part=6
^ permalink raw reply
* Re: [PATCH 3/6] [v6] leds: gpio: make legacy gpiolib interface optional
From: sashiko-bot @ 2026-07-10 21:32 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-leds, linux-input, lee, dmitry.torokhov
In-Reply-To: <20260710211854.1371746-4-arnd@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Disabling CONFIG_GPIOLIB_LEGACY breaks compilation for unrelated non-legacy drivers that set `struct gpio_led::active_low`.
- [Low] The commit message description is not capitalized, violating the LED subsystem guidelines.
--
--- Patch [3]: [PATCH 3/6] [v6] leds: gpio: make legacy gpiolib interface optional ---
commit ad55bf4fa40ddbff55ee69fcb15b56da1f063668
Author: Arnd Bergmann <arnd@arndb.de>
> leds: gpio: make legacy gpiolib interface optional
[Severity: Low]
This isn't a bug, but should the commit description be capitalized after the
subsystem prefix to match the LED subsystem guidelines? For example,
"leds: gpio: Make legacy..."
This commit makes the legacy GPIO library interface optional in the leds-gpio
driver by guarding the platform_data handling with CONFIG_GPIOLIB_LEGACY.
Link: https://lore.kernel.org/all/e9252384-a55c-4a91-9c61-06e05a0b2ce4@app.fastmail.com/
[ ... ]
> diff --git a/include/linux/leds.h b/include/linux/leds.h
> index b16b803cc1ac5..e646bffcd8e74 100644
> --- a/include/linux/leds.h
> +++ b/include/linux/leds.h
> @@ -676,8 +676,10 @@ typedef int (*gpio_blink_set_t)(struct gpio_desc *desc, int state,
> struct gpio_led {
> const char *name;
> const char *default_trigger;
> +#ifdef CONFIG_GPIOLIB_LEGACY
> unsigned gpio;
> unsigned active_low : 1;
> +#endif
[Severity: Low]
Does hiding active_low behind CONFIG_GPIOLIB_LEGACY break the build for
unrelated non-legacy drivers (such as ath10k) that still rely on setting this
field in struct gpio_led?
> unsigned retain_state_suspended : 1;
> unsigned panic_indicator : 1;
> unsigned default_state : 2;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710211854.1371746-1-arnd@kernel.org?part=3
^ permalink raw reply
* Re: [PATCH 2/6] [v6] Input: gpio-keys: make legacy gpiolib optional
From: sashiko-bot @ 2026-07-10 21:31 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: dmitry.torokhov, lee, linux-leds, linux-input
In-Reply-To: <20260710211854.1371746-3-arnd@kernel.org>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [High] Legacy platforms that specify both a valid GPIO and an IRQ for a button are forced into purely interrupt-driven mode, degrading them to simulated pulse buttons.
- [Low] The patch includes a non-existent header file `linux/gpio/legacy.h`, unconditionally breaking the build.
Pre-existing issues:
- [High] The Rohm MFD drivers dynamically mutate a globally shared static struct during probe, breaking reentrancy and violating MFD guidelines.
--
--- Patch [2]: [PATCH 2/6] [v6] Input: gpio-keys: make legacy gpiolib optional ---
commit 1e2acc08348477940313314a2e3563828ed3ae8b
Author: Arnd Bergmann <arnd@arndb.de>
Input: gpio-keys: make legacy gpiolib optional
Most users of gpio-keys and gpio-keys-polled use modern gpiolib interfaces,
but there are still number of ancient sh, arm32 and x86 machines that have
never been converted. Add an #ifdef block for the parts of the driver that
are only used on those legacy machines.
Link: https://lore.kernel.org/all/b3c94552-c104-42e3-be15-7e8362e8039e@gmail.com/
Link: https://lore.kernel.org/all/afJXG4_rtaj3l2Dk@google.com/
Link: https://lore.kernel.org/all/ajQ-CtU131FAJ9ES@google.com/
> diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
> --- a/drivers/input/keyboard/gpio_keys.c
> +++ b/drivers/input/keyboard/gpio_keys.c
> @@ -23,8 +23,8 @@
> #include <linux/input.h>
> #include <linux/gpio_keys.h>
> #include <linux/workqueue.h>
> -#include <linux/gpio.h>
> #include <linux/gpio/consumer.h>
> +#include <linux/gpio/legacy.h>
[Severity: Low]
Does this header file exist in the source tree? Because this include is
outside of any #ifdef blocks, it looks like it will unconditionally break
the build for anyone compiling with CONFIG_KEYBOARD_GPIO enabled.
> #include <linux/of.h>
> #include <linux/of_irq.h>
> #include <linux/spinlock.h>
[ ... ]
> @@ -528,7 +528,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
> */
> bdata->gpiod = NULL;
> }
> - } else if (gpio_is_valid(button->gpio)) {
> +#ifdef CONFIG_GPIOLIB_LEGACY
> + } else if (!button->irq && gpio_is_valid(button->gpio)) {
[Severity: High]
Does this new !button->irq condition inadvertently break legacy boards that
legitimately supply both a valid .gpio and an .irq?
For example, in arch/arm/mach-sa1100/assabet.c, assabet_keys_buttons defines
buttons with both .gpio = 0 and .irq = IRQ_GPIO0. Since the GPIO is no
longer requested when an IRQ is present, wouldn't the driver fall back to
purely interrupt-driven mode?
If so, this would lack a GPIO descriptor to read the physical button level,
turning holdable physical buttons into simulated momentary pulses via the
auto-release timer.
> /*
> * Legacy GPIO number, so request the GPIO here and
> * convert it to descriptor.
[ ... ]
> diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
> --- a/drivers/input/keyboard/gpio_keys_polled.c
> +++ b/drivers/input/keyboard/gpio_keys_polled.c
> @@ -18,8 +18,8 @@
> #include <linux/input.h>
> #include <linux/ioport.h>
> #include <linux/platform_device.h>
> -#include <linux/gpio.h>
> #include <linux/gpio/consumer.h>
> +#include <linux/gpio/legacy.h>
[Severity: Low]
Similar to gpio_keys.c, does this unconditionally break the build since
linux/gpio/legacy.h is missing from the tree?
> #include <linux/gpio_keys.h>
> #include <linux/property.h>
[ ... ]
> diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c
> --- a/drivers/mfd/rohm-bd71828.c
> +++ b/drivers/mfd/rohm-bd71828.c
> @@ -39,7 +39,6 @@
>
> static struct gpio_keys_button button = {
> .code = KEY_POWER,
> - .gpio = -1,
> .type = EV_KEY,
> .wakeup = 1,
> };
[Severity: High]
This isn't a bug introduced by this patch, but this static struct is modified
dynamically during bd71828_i2c_probe() when assigning button.irq = ret.
Since mfd_add_devices() only shallow-copies the platform data, doesn't
mutating a globally shared static struct during probe break reentrancy?
Multiple instances of the PMIC or repeated probes due to unbind/deferral
could clobber each other's IRQ number here.
> diff --git a/drivers/mfd/rohm-bd718x7.c b/drivers/mfd/rohm-bd718x7.c
> --- a/drivers/mfd/rohm-bd718x7.c
> +++ b/drivers/mfd/rohm-bd718x7.c
> @@ -20,7 +20,6 @@
>
> static struct gpio_keys_button button = {
> .code = KEY_POWER,
> - .gpio = -1,
> .type = EV_KEY,
> };
[Severity: High]
This is a pre-existing issue, but just like in rohm-bd71828.c, mutating this
shared static struct during bd718xx_i2c_probe() violates MFD guidelines and
could cause race conditions with concurrent or repeated probes.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710211854.1371746-1-arnd@kernel.org?part=2
^ permalink raw reply
* Re: [PATCH 5/6] [v6] x86/olpc: select GPIOLIB_LEGACY
From: sashiko-bot @ 2026-07-10 21:28 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-input, linux-leds, lee, dmitry.torokhov
In-Reply-To: <20260710211854.1371746-6-arnd@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Replacing `#include <linux/gpio.h>` with `#include <linux/gpio/legacy.h>` causes a fatal compile error because the new header file does not exist in the kernel tree.
--
--- Patch [5]: [PATCH 5/6] [v6] x86/olpc: select GPIOLIB_LEGACY ---
commit dfd246b7263a8d5eeb27b20b07f4d9310db7a8d6
Author: Arnd Bergmann <arnd@arndb.de>
x86/olpc: select GPIOLIB_LEGACY
This commit selects CONFIG_GPIOLIB_LEGACY for the OLPC platform to resolve
implicit function declaration errors for legacy GPIO functions. It also
updates the audio driver Kconfig to depend on GPIOLIB_LEGACY or !OLPC.
> diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c
> index 30751b42d54ef..a5b47960ba32e 100644
> --- a/arch/x86/platform/olpc/olpc-xo1-sci.c
> +++ b/arch/x86/platform/olpc/olpc-xo1-sci.c
> @@ -9,7 +9,7 @@
>
> #include <linux/cs5535.h>
> #include <linux/device.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/legacy.h>
[Severity: Low]
Does this header actually exist in the kernel tree? Compiling this file
with CONFIG_OLPC enabled appears to result in a fatal No such file or
directory error because include/linux/gpio/legacy.h is missing.
> #include <linux/input.h>
> #include <linux/interrupt.h>
[ ... ]
> diff --git a/sound/pci/cs5535audio/cs5535audio_olpc.c b/sound/pci/cs5535audio/cs5535audio_olpc.c
> index 122170a410d9e..cfdcc5bf4341e 100644
> --- a/sound/pci/cs5535audio/cs5535audio_olpc.c
> +++ b/sound/pci/cs5535audio/cs5535audio_olpc.c
> @@ -9,7 +9,7 @@
> #include <sound/info.h>
> #include <sound/control.h>
> #include <sound/ac97_codec.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/legacy.h>
[Severity: Low]
Similarly, will this cause a build failure here for the same missing header
reason?
>
> #include <asm/olpc.h>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710211854.1371746-1-arnd@kernel.org?part=5
^ permalink raw reply
* Re: [PATCH 4/6] [v6] sh: select legacy gpiolib interface
From: sashiko-bot @ 2026-07-10 21:26 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: dmitry.torokhov, linux-input, lee, linux-leds
In-Reply-To: <20260710211854.1371746-5-arnd@kernel.org>
> From: Arnd Bergmann <arnd@arndb.de>
>
> Many board files on sh reference the legacy gpiolib interfaces that
> are becoming optional. To ensure the boards can keep building, select
> CONFIG_GPIOLIB_LEGACY on each of the boards that have one of the
> hardcoded calls.
>
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> # for input
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710211854.1371746-1-arnd@kernel.org?part=4
^ permalink raw reply
* Re: [PATCH 1/6] [v6] Input: soc_button_array - select CONFIG_GPIOLIB_LEGACY
From: sashiko-bot @ 2026-07-10 21:26 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: lee, linux-leds, dmitry.torokhov, linux-input
In-Reply-To: <20260710211854.1371746-2-arnd@kernel.org>
> From: Arnd Bergmann <arnd@arndb.de>
>
> This driver converts information from ACPI in x86 based tablets and
> laptops into platform_data for the gpio_keys driver, using the obsolete
> gpio number based interfaces.
>
> This should really be converted to some other method, but since the
> conversion is nontrivial, have this one select GPIOLIB_LEGACY for the
> time being.
>
> This enables turning GPIOLIB_LEGACY off by default on most kernel
> builds. Since the driver is only used on x86 portables, add a CONFIG_X86
> dependency, which means non-x86 allmodconfig builds usuallly build
> without the legacy gpio support.
>
> Link: https://lore.kernel.org/all/ah-1z9LhVG0wtfBw@google.com/
> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> # for input
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710211854.1371746-1-arnd@kernel.org?part=1
^ permalink raw reply
* [PATCH v2 09/10] Input: matrix_keyboard - replace linux/gpio.h inclusion
From: Arnd Bergmann @ 2026-07-10 21:19 UTC (permalink / raw)
To: linux-gpio, Linus Walleij, Bartosz Golaszewski
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Frank Li, Robert Jarzmik, Krzysztof Kozlowski,
Greg Ungerer, Thomas Bogendoerfer, Hauke Mehrtens,
Rafał Miłecki, Yoshinori Sato,
John Paul Adrian Glaubitz, Dmitry Torokhov, Dominik Brodowski,
linux-kernel, linux-arm-kernel, linux-samsung-soc, patches,
linux-m68k, linux-mips, linux-sh, linux-input, linux-sunxi,
linux-phy, linux-rockchip, linux-sound, Bartosz Golaszewski
In-Reply-To: <20260710211954.1373336-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
linux/gpio.h is going away, so remove that since the driver already
includes linux/gpio/consumer.h.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/input/keyboard/matrix_keypad.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index e50a6fea9a60..8863b741d1a3 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -16,7 +16,6 @@
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/module.h>
-#include <linux/gpio.h>
#include <linux/input/matrix_keypad.h>
#include <linux/slab.h>
#include <linux/of.h>
--
2.39.5
^ permalink raw reply related
* [PATCH v2 08/10] phy: replace linux/gpio.h inclusions
From: Arnd Bergmann @ 2026-07-10 21:19 UTC (permalink / raw)
To: linux-gpio, Linus Walleij, Bartosz Golaszewski
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Frank Li, Robert Jarzmik, Krzysztof Kozlowski,
Greg Ungerer, Thomas Bogendoerfer, Hauke Mehrtens,
Rafał Miłecki, Yoshinori Sato,
John Paul Adrian Glaubitz, Dmitry Torokhov, Dominik Brodowski,
linux-kernel, linux-arm-kernel, linux-samsung-soc, patches,
linux-m68k, linux-mips, linux-sh, linux-input, linux-sunxi,
linux-phy, linux-rockchip, linux-sound, Bartosz Golaszewski
In-Reply-To: <20260710211954.1373336-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
linux/gpio.h should no longer be used, so remove those and
make sure linux/gpio/consumer.h is included instead.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c | 1 -
drivers/phy/rockchip/phy-rockchip-usbdp.c | 2 +-
drivers/phy/ti/phy-j721e-wiz.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c b/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
index 8473fa574529..171bf097a8b8 100644
--- a/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
+++ b/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
@@ -3,7 +3,6 @@
#include <linux/delay.h>
#include <linux/extcon-provider.h>
-#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/interrupt.h>
diff --git a/drivers/phy/rockchip/phy-rockchip-usbdp.c b/drivers/phy/rockchip/phy-rockchip-usbdp.c
index fba35510d88c..d0d736a30d08 100644
--- a/drivers/phy/rockchip/phy-rockchip-usbdp.c
+++ b/drivers/phy/rockchip/phy-rockchip-usbdp.c
@@ -11,7 +11,7 @@
#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/mfd/syscon.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index 7531a8a04912..1f5dba49ace4 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -11,7 +11,6 @@
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/io.h>
#include <linux/module.h>
--
2.39.5
^ permalink raw reply related
* [PATCH v2 07/10] pcmcia: replace linux/gpio.h inclusions
From: Arnd Bergmann @ 2026-07-10 21:19 UTC (permalink / raw)
To: linux-gpio, Linus Walleij, Bartosz Golaszewski
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Frank Li, Robert Jarzmik, Krzysztof Kozlowski,
Greg Ungerer, Thomas Bogendoerfer, Hauke Mehrtens,
Rafał Miłecki, Yoshinori Sato,
John Paul Adrian Glaubitz, Dmitry Torokhov, Dominik Brodowski,
linux-kernel, linux-arm-kernel, linux-samsung-soc, patches,
linux-m68k, linux-mips, linux-sh, linux-input, linux-sunxi,
linux-phy, linux-rockchip, linux-sound, Bartosz Golaszewski
In-Reply-To: <20260710211954.1373336-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
The pcmcia drivers all use the legacy interfaces, so convert to
include linux/gpio/legacy.h instead.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/pcmcia/bcm63xx_pcmcia.c | 2 +-
drivers/pcmcia/db1xxx_ss.c | 2 +-
drivers/pcmcia/sa1100_h3600.c | 2 +-
drivers/pcmcia/soc_common.c | 2 +-
drivers/pcmcia/xxs1500_ss.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/pcmcia/bcm63xx_pcmcia.c b/drivers/pcmcia/bcm63xx_pcmcia.c
index 724fd6ee0fd0..1612b5d76975 100644
--- a/drivers/pcmcia/bcm63xx_pcmcia.c
+++ b/drivers/pcmcia/bcm63xx_pcmcia.c
@@ -14,7 +14,7 @@
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/pci.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <bcm63xx_regs.h>
#include <bcm63xx_io.h>
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c
index 7b896d7dbc9f..410d24762f13 100644
--- a/drivers/pcmcia/db1xxx_ss.c
+++ b/drivers/pcmcia/db1xxx_ss.c
@@ -23,7 +23,7 @@
*/
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/interrupt.h>
#include <linux/pm.h>
#include <linux/module.h>
diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c
index 10cb99c20a7f..6c52d90795eb 100644
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@ -11,7 +11,7 @@
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <mach/hardware.h>
#include <asm/irq.h>
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 87aa3f667117..23585e3968e9 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -32,8 +32,8 @@
#include <linux/cpufreq.h>
-#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
+#include <linux/gpio/legacy.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
diff --git a/drivers/pcmcia/xxs1500_ss.c b/drivers/pcmcia/xxs1500_ss.c
index 8a8aae1843b5..ba1bd0f9d9f8 100644
--- a/drivers/pcmcia/xxs1500_ss.c
+++ b/drivers/pcmcia/xxs1500_ss.c
@@ -7,7 +7,7 @@
*/
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/ioport.h>
--
2.39.5
^ permalink raw reply related
* [PATCH v2 06/10] ASoC: replace linux/gpio.h inclusions
From: Arnd Bergmann @ 2026-07-10 21:19 UTC (permalink / raw)
To: linux-gpio, Linus Walleij, Bartosz Golaszewski
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Frank Li, Robert Jarzmik, Krzysztof Kozlowski,
Greg Ungerer, Thomas Bogendoerfer, Hauke Mehrtens,
Rafał Miłecki, Yoshinori Sato,
John Paul Adrian Glaubitz, Dmitry Torokhov, Dominik Brodowski,
linux-kernel, linux-arm-kernel, linux-samsung-soc, patches,
linux-m68k, linux-mips, linux-sh, linux-input, linux-sunxi,
linux-phy, linux-rockchip, linux-sound, Bartosz Golaszewski
In-Reply-To: <20260710211954.1373336-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
linux/gpio.h is going away,s o use linux/gpio/consumer.h instead.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/soc/codecs/cs42l84.c | 1 -
sound/soc/codecs/cx2072x.c | 2 +-
sound/soc/codecs/dmic.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs42l84.c b/sound/soc/codecs/cs42l84.c
index f2a58163de0e..f2448b4c11fc 100644
--- a/sound/soc/codecs/cs42l84.c
+++ b/sound/soc/codecs/cs42l84.c
@@ -16,7 +16,6 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/i2c.h>
-#include <linux/gpio.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/acpi.h>
diff --git a/sound/soc/codecs/cx2072x.c b/sound/soc/codecs/cx2072x.c
index 83c6cbd40804..0dd35fa86cc5 100644
--- a/sound/soc/codecs/cx2072x.c
+++ b/sound/soc/codecs/cx2072x.c
@@ -11,7 +11,7 @@
#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/module.h>
diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c
index 61e1bf1b3c9e..cbed11136935 100644
--- a/sound/soc/codecs/dmic.c
+++ b/sound/soc/codecs/dmic.c
@@ -6,7 +6,6 @@
*/
#include <linux/delay.h>
-#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
--
2.39.5
^ permalink raw reply related
* [PATCH v2 05/10] mfd: replace linux/gpio.h inclusions
From: Arnd Bergmann @ 2026-07-10 21:19 UTC (permalink / raw)
To: linux-gpio, Linus Walleij, Bartosz Golaszewski
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Frank Li, Robert Jarzmik, Krzysztof Kozlowski,
Greg Ungerer, Thomas Bogendoerfer, Hauke Mehrtens,
Rafał Miłecki, Yoshinori Sato,
John Paul Adrian Glaubitz, Dmitry Torokhov, Dominik Brodowski,
linux-kernel, linux-arm-kernel, linux-samsung-soc, patches,
linux-m68k, linux-mips, linux-sh, linux-input, linux-sunxi,
linux-phy, linux-rockchip, linux-sound, Bartosz Golaszewski
In-Reply-To: <20260710211954.1373336-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
linux/gpio.h should no longer be used, convert these instead to
either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mfd/aat2870-core.c | 2 +-
drivers/mfd/arizona-irq.c | 2 +-
drivers/mfd/lp3943.c | 2 +-
drivers/mfd/sm501.c | 2 +-
drivers/mfd/tps6105x.c | 2 +-
drivers/mfd/tps65911-comparator.c | 2 +-
drivers/mfd/wm8994-irq.c | 2 +-
include/linux/mfd/lp3943.h | 2 +-
include/linux/mfd/ti-lmu.h | 1 -
include/linux/mfd/tps65910.h | 2 +-
include/linux/mfd/ucb1x00.h | 2 +-
11 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c
index 34d66ba9646a..0d56cd6fbc6a 100644
--- a/drivers/mfd/aat2870-core.c
+++ b/drivers/mfd/aat2870-core.c
@@ -13,7 +13,7 @@
#include <linux/uaccess.h>
#include <linux/i2c.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/mfd/core.h>
#include <linux/mfd/aat2870.h>
#include <linux/regulator/machine.h>
diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c
index 544016d420fe..14f9cb2c4b67 100644
--- a/drivers/mfd/arizona-irq.c
+++ b/drivers/mfd/arizona-irq.c
@@ -8,7 +8,7 @@
*/
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
diff --git a/drivers/mfd/lp3943.c b/drivers/mfd/lp3943.c
index 6764553147e4..1918b5c7a5e7 100644
--- a/drivers/mfd/lp3943.c
+++ b/drivers/mfd/lp3943.c
@@ -28,7 +28,7 @@
*/
#include <linux/err.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/mfd/core.h>
#include <linux/mfd/lp3943.h>
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index b5bda477ebfc..9d5bb67e8084 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -35,7 +35,7 @@ struct sm501_device {
struct sm501_gpio;
#ifdef CONFIG_MFD_SM501_GPIO
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
struct sm501_gpio_chip {
struct gpio_chip gpio;
diff --git a/drivers/mfd/tps6105x.c b/drivers/mfd/tps6105x.c
index e2f6858d101e..b11cd2c03311 100644
--- a/drivers/mfd/tps6105x.c
+++ b/drivers/mfd/tps6105x.c
@@ -16,7 +16,7 @@
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/err.h>
diff --git a/drivers/mfd/tps65911-comparator.c b/drivers/mfd/tps65911-comparator.c
index 7098712ea008..cc8545a972bc 100644
--- a/drivers/mfd/tps65911-comparator.c
+++ b/drivers/mfd/tps65911-comparator.c
@@ -14,7 +14,7 @@
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/debugfs.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/mfd/tps65910.h>
#define COMP1 0
diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c
index a46cea948763..a15483489b9d 100644
--- a/drivers/mfd/wm8994-irq.c
+++ b/drivers/mfd/wm8994-irq.c
@@ -9,7 +9,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/irq.h>
#include <linux/mfd/core.h>
diff --git a/include/linux/mfd/lp3943.h b/include/linux/mfd/lp3943.h
index 402f01078fcc..5d2d172d3598 100644
--- a/include/linux/mfd/lp3943.h
+++ b/include/linux/mfd/lp3943.h
@@ -10,7 +10,7 @@
#ifndef __MFD_LP3943_H__
#define __MFD_LP3943_H__
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/regmap.h>
/* Registers */
diff --git a/include/linux/mfd/ti-lmu.h b/include/linux/mfd/ti-lmu.h
index 0bc0e8199798..2089ec5124e8 100644
--- a/include/linux/mfd/ti-lmu.h
+++ b/include/linux/mfd/ti-lmu.h
@@ -10,7 +10,6 @@
#ifndef __MFD_TI_LMU_H__
#define __MFD_TI_LMU_H__
-#include <linux/gpio.h>
#include <linux/notifier.h>
#include <linux/regmap.h>
#include <linux/gpio/consumer.h>
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h
index f67ef0a4e041..3813fc9c2b55 100644
--- a/include/linux/mfd/tps65910.h
+++ b/include/linux/mfd/tps65910.h
@@ -12,7 +12,7 @@
#ifndef __LINUX_MFD_TPS65910_H
#define __LINUX_MFD_TPS65910_H
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/regmap.h>
/* TPS chip id list */
diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
index ede237384723..4ad54e22ed33 100644
--- a/include/linux/mfd/ucb1x00.h
+++ b/include/linux/mfd/ucb1x00.h
@@ -9,7 +9,7 @@
#include <linux/device.h>
#include <linux/mfd/mcp.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/gpio/driver.h>
#include <linux/mutex.h>
--
2.39.5
^ permalink raw reply related
* [PATCH v2 04/10] sh: replace linux/gpio.h inclusions
From: Arnd Bergmann @ 2026-07-10 21:19 UTC (permalink / raw)
To: linux-gpio, Linus Walleij, Bartosz Golaszewski
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Frank Li, Robert Jarzmik, Krzysztof Kozlowski,
Greg Ungerer, Thomas Bogendoerfer, Hauke Mehrtens,
Rafał Miłecki, Yoshinori Sato,
John Paul Adrian Glaubitz, Dmitry Torokhov, Dominik Brodowski,
linux-kernel, linux-arm-kernel, linux-samsung-soc, patches,
linux-m68k, linux-mips, linux-sh, linux-input, linux-sunxi,
linux-phy, linux-rockchip, linux-sound, Bartosz Golaszewski
In-Reply-To: <20260710211954.1373336-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
linux/gpio.h should no longer be used, convert these instead to
linux/gpio/legacy.h for the sh boards using the legacy interfaces,
or remove it where it is not needed at all.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/sh/boards/board-magicpanelr2.c | 2 +-
arch/sh/boards/board-sh7757lcr.c | 2 +-
arch/sh/boards/board-urquell.c | 2 +-
arch/sh/boards/mach-ap325rxa/setup.c | 2 +-
arch/sh/boards/mach-ecovec24/setup.c | 2 +-
arch/sh/boards/mach-highlander/pinmux-r7785rp.c | 2 +-
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 2 +-
arch/sh/boards/mach-kfr2r09/setup.c | 2 +-
arch/sh/boards/mach-migor/lcd_qvga.c | 2 +-
arch/sh/boards/mach-migor/setup.c | 2 +-
arch/sh/boards/mach-rsk/devices-rsk7203.c | 2 +-
arch/sh/boards/mach-rsk/devices-rsk7269.c | 1 -
arch/sh/boards/mach-se/7724/setup.c | 2 +-
arch/sh/include/mach-common/mach/magicpanelr2.h | 2 --
arch/sh/kernel/cpu/sh4a/setup-shx3.c | 2 +-
15 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/arch/sh/boards/board-magicpanelr2.c b/arch/sh/boards/board-magicpanelr2.c
index 75de893152af..3f14118a1015 100644
--- a/arch/sh/boards/board-magicpanelr2.c
+++ b/arch/sh/boards/board-magicpanelr2.c
@@ -10,7 +10,7 @@
#include <linux/irq.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h>
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
index bca54e489e11..6d18f59ef261 100644
--- a/arch/sh/boards/board-sh7757lcr.c
+++ b/arch/sh/boards/board-sh7757lcr.c
@@ -7,7 +7,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/irq.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
diff --git a/arch/sh/boards/board-urquell.c b/arch/sh/boards/board-urquell.c
index dad2b3b40735..1f73c04d341f 100644
--- a/arch/sh/boards/board-urquell.c
+++ b/arch/sh/boards/board-urquell.c
@@ -14,7 +14,7 @@
#include <linux/smc91x.h>
#include <linux/mtd/physmap.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/irq.h>
#include <linux/clk.h>
#include <linux/sh_intc.h>
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
index bb5004a8ac02..17c3f568d92e 100644
--- a/arch/sh/boards/mach-ap325rxa/setup.c
+++ b/arch/sh/boards/mach-ap325rxa/setup.c
@@ -17,7 +17,7 @@
#include <linux/clkdev.h>
#include <linux/delay.h>
#include <linux/device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/gpio/consumer.h>
#include <linux/gpio/machine.h>
#include <linux/i2c.h>
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index a641e26f8fdf..ca4b4dd1ddef 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -20,7 +20,7 @@
#include <linux/mmc/host.h>
#include <linux/platform_data/sh_mmcif.h>
#include <linux/mtd/physmap.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/gpio/machine.h>
#include <linux/platform_data/gpio_backlight.h>
#include <linux/platform_data/tmio.h>
diff --git a/arch/sh/boards/mach-highlander/pinmux-r7785rp.c b/arch/sh/boards/mach-highlander/pinmux-r7785rp.c
index 689bd8732d9e..3a1057ee9ace 100644
--- a/arch/sh/boards/mach-highlander/pinmux-r7785rp.c
+++ b/arch/sh/boards/mach-highlander/pinmux-r7785rp.c
@@ -3,7 +3,7 @@
* Copyright (C) 2008 Paul Mundt
*/
#include <linux/init.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <cpu/sh7785.h>
#include <mach/highlander.h>
diff --git a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
index f6bbac106d13..68716660de34 100644
--- a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
+++ b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
@@ -14,7 +14,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <video/sh_mobile_lcdc.h>
#include <mach/kfr2r09.h>
#include <cpu/sh7724.h>
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index 70236859919d..30dd7dae7906 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -14,7 +14,7 @@
#include <linux/clkdev.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/gpio/machine.h>
#include <linux/i2c.h>
#include <linux/init.h>
diff --git a/arch/sh/boards/mach-migor/lcd_qvga.c b/arch/sh/boards/mach-migor/lcd_qvga.c
index 4ebf130510bc..f72934e370fd 100644
--- a/arch/sh/boards/mach-migor/lcd_qvga.c
+++ b/arch/sh/boards/mach-migor/lcd_qvga.c
@@ -14,7 +14,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <video/sh_mobile_lcdc.h>
#include <cpu/sh7722.h>
#include <mach/migor.h>
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 1853e6319a66..b0198e7cb9ab 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -22,7 +22,7 @@
#include <linux/smc91x.h>
#include <linux/delay.h>
#include <linux/clk.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/gpio/machine.h>
#include <linux/videodev2.h>
#include <linux/sh_intc.h>
diff --git a/arch/sh/boards/mach-rsk/devices-rsk7203.c b/arch/sh/boards/mach-rsk/devices-rsk7203.c
index e6b05d4588b7..eb56b57812bd 100644
--- a/arch/sh/boards/mach-rsk/devices-rsk7203.c
+++ b/arch/sh/boards/mach-rsk/devices-rsk7203.c
@@ -10,7 +10,7 @@
#include <linux/interrupt.h>
#include <linux/smsc911x.h>
#include <linux/input.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/gpio_keys.h>
#include <linux/leds.h>
#include <asm/machvec.h>
diff --git a/arch/sh/boards/mach-rsk/devices-rsk7269.c b/arch/sh/boards/mach-rsk/devices-rsk7269.c
index 4b1e386b51dd..54edd9958eca 100644
--- a/arch/sh/boards/mach-rsk/devices-rsk7269.c
+++ b/arch/sh/boards/mach-rsk/devices-rsk7269.c
@@ -11,7 +11,6 @@
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/smsc911x.h>
-#include <linux/gpio.h>
#include <asm/machvec.h>
#include <asm/io.h>
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index e500feb91053..bed8f44fcecb 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -15,7 +15,7 @@
#include <linux/delay.h>
#include <linux/device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/input/sh_keysc.h>
diff --git a/arch/sh/include/mach-common/mach/magicpanelr2.h b/arch/sh/include/mach-common/mach/magicpanelr2.h
index c2d218cea74b..29d86dd21b7b 100644
--- a/arch/sh/include/mach-common/mach/magicpanelr2.h
+++ b/arch/sh/include/mach-common/mach/magicpanelr2.h
@@ -10,8 +10,6 @@
#ifndef __ASM_SH_MAGICPANELR2_H
#define __ASM_SH_MAGICPANELR2_H
-#include <linux/gpio.h>
-
#define __IO_PREFIX mpr2
#include <asm/io_generic.h>
diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
index 7014d6d199b3..60be8dca54f6 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
@@ -9,7 +9,7 @@
#include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/io.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/sh_timer.h>
#include <linux/sh_intc.h>
#include <cpu/shx3.h>
--
2.39.5
^ permalink raw reply related
* [PATCH v2 03/10] mips: replace linux/gpio.h inclusions
From: Arnd Bergmann @ 2026-07-10 21:19 UTC (permalink / raw)
To: linux-gpio, Linus Walleij, Bartosz Golaszewski
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Frank Li, Robert Jarzmik, Krzysztof Kozlowski,
Greg Ungerer, Thomas Bogendoerfer, Hauke Mehrtens,
Rafał Miłecki, Yoshinori Sato,
John Paul Adrian Glaubitz, Dmitry Torokhov, Dominik Brodowski,
linux-kernel, linux-arm-kernel, linux-samsung-soc, patches,
linux-m68k, linux-mips, linux-sh, linux-input, linux-sunxi,
linux-phy, linux-rockchip, linux-sound, Bartosz Golaszewski
In-Reply-To: <20260710211954.1373336-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
linux/gpio.h should no longer be used, convert these instead to
either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/mips/alchemy/board-xxs1500.c | 2 +-
arch/mips/alchemy/devboards/db1000.c | 2 +-
arch/mips/alchemy/devboards/db1200.c | 2 +-
arch/mips/alchemy/devboards/db1550.c | 2 +-
arch/mips/bcm47xx/workarounds.c | 2 +-
arch/mips/bcm63xx/boards/board_bcm963xx.c | 1 +
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 +-
arch/mips/txx9/rbtx4927/setup.c | 2 +-
8 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/mips/alchemy/board-xxs1500.c b/arch/mips/alchemy/board-xxs1500.c
index f175bce2987f..a03762dde4e7 100644
--- a/arch/mips/alchemy/board-xxs1500.c
+++ b/arch/mips/alchemy/board-xxs1500.c
@@ -11,7 +11,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <asm/bootinfo.h>
diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c
index 8fb24b220e3a..5eff34a8683b 100644
--- a/arch/mips/alchemy/devboards/db1000.c
+++ b/arch/mips/alchemy/devboards/db1000.c
@@ -8,7 +8,7 @@
#include <linux/clk.h>
#include <linux/dma-mapping.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/gpio/machine.h>
#include <linux/gpio/property.h>
#include <linux/init.h>
diff --git a/arch/mips/alchemy/devboards/db1200.c b/arch/mips/alchemy/devboards/db1200.c
index de2a9083ed9a..539b311fc8af 100644
--- a/arch/mips/alchemy/devboards/db1200.c
+++ b/arch/mips/alchemy/devboards/db1200.c
@@ -7,7 +7,7 @@
#include <linux/clk.h>
#include <linux/dma-mapping.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
diff --git a/arch/mips/alchemy/devboards/db1550.c b/arch/mips/alchemy/devboards/db1550.c
index b8295a5c2e9a..579fc8f1eaed 100644
--- a/arch/mips/alchemy/devboards/db1550.c
+++ b/arch/mips/alchemy/devboards/db1550.c
@@ -7,7 +7,7 @@
#include <linux/clk.h>
#include <linux/dma-mapping.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/io.h>
diff --git a/arch/mips/bcm47xx/workarounds.c b/arch/mips/bcm47xx/workarounds.c
index 745c6228eb2c..dc9e5483347d 100644
--- a/arch/mips/bcm47xx/workarounds.c
+++ b/arch/mips/bcm47xx/workarounds.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "bcm47xx_private.h"
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <bcm47xx_board.h>
#include <bcm47xx.h>
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index c5617b889b1c..71628dac6c26 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -7,6 +7,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/init.h>
+#include <linux/gpio/legacy.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/platform_device.h>
diff --git a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
index 830f53f28e3f..428cf4508f9a 100644
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
@@ -3,7 +3,7 @@
#define BOARD_BCM963XX_H_
#include <linux/types.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/leds.h>
#include <bcm63xx_dev_enet.h>
#include <bcm63xx_dev_usb_usbd.h>
diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c
index 31955c1d5555..b4fbe6a2a73a 100644
--- a/arch/mips/txx9/rbtx4927/setup.c
+++ b/arch/mips/txx9/rbtx4927/setup.c
@@ -48,7 +48,7 @@
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/leds.h>
#include <asm/io.h>
#include <asm/reboot.h>
--
2.39.5
^ permalink raw reply related
* [PATCH v2 02/10] m68k/coldfire: replace linux/gpio.h inclusions
From: Arnd Bergmann @ 2026-07-10 21:19 UTC (permalink / raw)
To: linux-gpio, Linus Walleij, Bartosz Golaszewski
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Frank Li, Robert Jarzmik, Krzysztof Kozlowski,
Greg Ungerer, Thomas Bogendoerfer, Hauke Mehrtens,
Rafał Miłecki, Yoshinori Sato,
John Paul Adrian Glaubitz, Dmitry Torokhov, Dominik Brodowski,
linux-kernel, linux-arm-kernel, linux-samsung-soc, patches,
linux-m68k, linux-mips, linux-sh, linux-input, linux-sunxi,
linux-phy, linux-rockchip, linux-sound, Bartosz Golaszewski
In-Reply-To: <20260710211954.1373336-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
linux/gpio.h should no longer be used, convert these instead to
linux/gpio/legacy.h for coldfire.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/m68k/coldfire/device.c | 2 +-
arch/m68k/include/asm/mcfgpio.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/m68k/coldfire/device.c b/arch/m68k/coldfire/device.c
index 1420bae0964f..9a0258acd998 100644
--- a/arch/m68k/coldfire/device.c
+++ b/arch/m68k/coldfire/device.c
@@ -12,7 +12,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/spi/spi.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/fec.h>
#include <linux/dmaengine.h>
#include <asm/traps.h>
diff --git a/arch/m68k/include/asm/mcfgpio.h b/arch/m68k/include/asm/mcfgpio.h
index 7103cfa4edb6..29726aa40eb6 100644
--- a/arch/m68k/include/asm/mcfgpio.h
+++ b/arch/m68k/include/asm/mcfgpio.h
@@ -16,7 +16,7 @@ int __mcfgpio_request(unsigned gpio);
void __mcfgpio_free(unsigned gpio);
#ifdef CONFIG_GPIOLIB
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#else
/* our alternate 'gpiolib' functions */
--
2.39.5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox