[09/13] phy: replace linux/gpio.h inclusions
Commit Message
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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c | 2 +-
drivers/phy/rockchip/phy-rockchip-usbdp.c | 2 +-
drivers/phy/ti/phy-j721e-wiz.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Comments
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/consumer.h>` results in duplicate include directives.
--
commit 172e670e08c06c1b704f9f5d80187a66ba9bb20c
Author: Arnd Bergmann <arnd@arndb.de>
phy: replace linux/gpio.h inclusions
linux/gpio.h should no longer be used, convert these instead to
either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
> diff --git a/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c b/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
> index 8473fa5745296..d9c06129ed23e 100644
> --- a/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
> +++ b/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
> @@ -3,7 +3,7 @@
>
> #include <linux/delay.h>
> #include <linux/extcon-provider.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/gpio/consumer.h>
[Severity: Low]
This isn't a bug, but the replacement leaves us with consecutive duplicate
linux/gpio/consumer.h inclusions. Could the redundant include be removed?
[ ... ]
> diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
> index 7531a8a049123..2233babc00781 100644
> --- a/drivers/phy/ti/phy-j721e-wiz.c
> +++ b/drivers/phy/ti/phy-j721e-wiz.c
> @@ -11,7 +11,7 @@
> #include <linux/slab.h>
> #include <linux/clk.h>
> #include <linux/clk-provider.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/gpio/consumer.h>
[Severity: Low]
This isn't a bug, but similar to the broadcom phy driver, this creates
duplicate linux/gpio/consumer.h inclusions here as well. Should the second
one be dropped?
On Tue, Jun 30, 2026, at 15:28, sashiko-bot@kernel.org wrote:
>
> [Severity: Low]
> This isn't a bug, but the replacement leaves us with consecutive duplicate
> linux/gpio/consumer.h inclusions. Could the redundant include be removed?
This was already reported and fixed earlier, all of these will
be addressed in v2.
Arnd
@@ -3,7 +3,7 @@
#include <linux/delay.h>
#include <linux/extcon-provider.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -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>
@@ -11,7 +11,7 @@
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/gpio/consumer.h>
#include <linux/io.h>
#include <linux/module.h>