* [PATCH v1 1/7] ARM: pxa: spitz: Open code gpio_request_one()
2026-07-15 18:46 [PATCH v1 0/7] gpiolib: kill gpio_request_one() Andy Shevchenko
@ 2026-07-15 18:46 ` Andy Shevchenko
2026-07-15 18:46 ` [PATCH v1 2/7] media: em28xx: Split em28xx_pctv_290e_set_lna_gpio() helper Andy Shevchenko
` (7 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-07-15 18:46 UTC (permalink / raw)
To: Andy Shevchenko, Bradford Love, linux-gpio, linux-doc,
linux-kernel, linux-arm-kernel, linux-mips, linux-media
Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet, Shuah Khan,
Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Hauke Mehrtens, Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
Open code the gpio_request_one() call to be able to kill that API
in the follow changes.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/arm/mach-pxa/spitz_pm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index 03b4b347f11a..f46a3fb7e07c 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -108,7 +108,8 @@ static void spitz_presuspend(void)
PGSR2 |= GPIO_bit(SPITZ_GPIO_KEY_STROBE0);
pxa2xx_mfp_config(&gpio18_config, 1);
- gpio_request_one(18, GPIOF_OUT_INIT_HIGH, "Unknown");
+ gpio_request(18, "Unknown");
+ gpio_direction_output(18, 1);
gpio_free(18);
PRER = GPIO_bit(SPITZ_GPIO_KEY_INT);
--
2.50.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v1 2/7] media: em28xx: Split em28xx_pctv_290e_set_lna_gpio() helper
2026-07-15 18:46 [PATCH v1 0/7] gpiolib: kill gpio_request_one() Andy Shevchenko
2026-07-15 18:46 ` [PATCH v1 1/7] ARM: pxa: spitz: Open code gpio_request_one() Andy Shevchenko
@ 2026-07-15 18:46 ` Andy Shevchenko
2026-07-27 9:52 ` Hans Verkuil
2026-07-15 18:46 ` [PATCH v1 3/7] media: em28xx: Open code gpio_request_one() Andy Shevchenko
` (6 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2026-07-15 18:46 UTC (permalink / raw)
To: Andy Shevchenko, Bradford Love, linux-gpio, linux-doc,
linux-kernel, linux-arm-kernel, linux-mips, linux-media
Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet, Shuah Khan,
Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Hauke Mehrtens, Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
Split em28xx_pctv_290e_set_lna_gpio() helper in order to deduplicate
the GPIO request and setting.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/media/usb/em28xx/em28xx-dvb.c | 31 ++++++++++++---------------
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index 8482fc4045ea..ef148a27c94d 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -737,17 +737,14 @@ static void pctv_520e_init(struct em28xx *dev)
regs[i].r, regs[i].len);
};
-static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe)
+static int em28xx_pctv_290e_set_lna_gpio(struct em28xx *dev, u32 lna)
{
- struct dtv_frontend_properties *c = &fe->dtv_property_cache;
- struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv;
- struct em28xx *dev = i2c_bus->dev;
#ifdef CONFIG_GPIOLIB_LEGACY
struct em28xx_dvb *dvb = dev->dvb;
int ret;
unsigned long flags;
- if (c->lna == 1)
+ if (lna == 1)
flags = GPIOF_OUT_INIT_HIGH; /* enable LNA */
else
flags = GPIOF_OUT_INIT_LOW; /* disable LNA */
@@ -761,11 +758,20 @@ static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe)
return ret;
#else
dev_warn(&dev->intf->dev, "%s: LNA control is disabled (lna=%u)\n",
- KBUILD_MODNAME, c->lna);
+ KBUILD_MODNAME, lna);
return 0;
#endif
}
+static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe)
+{
+ struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+ struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv;
+ struct em28xx *dev = i2c_bus->dev;
+
+ return em28xx_pctv_290e_set_lna_gpio(dev, c->lna);
+}
+
static int em28xx_pctv_292e_set_lna(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
@@ -1920,19 +1926,10 @@ static int em28xx_dvb_init(struct em28xx *dev)
goto out_free;
}
-#ifdef CONFIG_GPIOLIB_LEGACY
/* enable LNA for DVB-T, DVB-T2 and DVB-C */
- result = gpio_request_one(dvb->lna_gpio,
- GPIOF_OUT_INIT_LOW, NULL);
- if (result)
- dev_err(&dev->intf->dev,
- "gpio request failed %d\n",
- result);
- else
- gpio_free(dvb->lna_gpio);
+ em28xx_pctv_290e_set_lna_gpio(dev, 0);
- result = 0; /* continue even set LNA fails */
-#endif
+ /* continue even set LNA fails */
dvb->fe[0]->ops.set_lna = em28xx_pctv_290e_set_lna;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v1 2/7] media: em28xx: Split em28xx_pctv_290e_set_lna_gpio() helper
2026-07-15 18:46 ` [PATCH v1 2/7] media: em28xx: Split em28xx_pctv_290e_set_lna_gpio() helper Andy Shevchenko
@ 2026-07-27 9:52 ` Hans Verkuil
0 siblings, 0 replies; 14+ messages in thread
From: Hans Verkuil @ 2026-07-27 9:52 UTC (permalink / raw)
To: Andy Shevchenko, Bradford Love, linux-gpio, linux-doc,
linux-kernel, linux-arm-kernel, linux-mips, linux-media
Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet, Shuah Khan,
Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Hauke Mehrtens, Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
On 15/07/2026 20:46, Andy Shevchenko wrote:
> Split em28xx_pctv_290e_set_lna_gpio() helper in order to deduplicate
> the GPIO request and setting.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Regards,
Hans
> ---
> drivers/media/usb/em28xx/em28xx-dvb.c | 31 ++++++++++++---------------
> 1 file changed, 14 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
> index 8482fc4045ea..ef148a27c94d 100644
> --- a/drivers/media/usb/em28xx/em28xx-dvb.c
> +++ b/drivers/media/usb/em28xx/em28xx-dvb.c
> @@ -737,17 +737,14 @@ static void pctv_520e_init(struct em28xx *dev)
> regs[i].r, regs[i].len);
> };
>
> -static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe)
> +static int em28xx_pctv_290e_set_lna_gpio(struct em28xx *dev, u32 lna)
> {
> - struct dtv_frontend_properties *c = &fe->dtv_property_cache;
> - struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv;
> - struct em28xx *dev = i2c_bus->dev;
> #ifdef CONFIG_GPIOLIB_LEGACY
> struct em28xx_dvb *dvb = dev->dvb;
> int ret;
> unsigned long flags;
>
> - if (c->lna == 1)
> + if (lna == 1)
> flags = GPIOF_OUT_INIT_HIGH; /* enable LNA */
> else
> flags = GPIOF_OUT_INIT_LOW; /* disable LNA */
> @@ -761,11 +758,20 @@ static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe)
> return ret;
> #else
> dev_warn(&dev->intf->dev, "%s: LNA control is disabled (lna=%u)\n",
> - KBUILD_MODNAME, c->lna);
> + KBUILD_MODNAME, lna);
> return 0;
> #endif
> }
>
> +static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe)
> +{
> + struct dtv_frontend_properties *c = &fe->dtv_property_cache;
> + struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv;
> + struct em28xx *dev = i2c_bus->dev;
> +
> + return em28xx_pctv_290e_set_lna_gpio(dev, c->lna);
> +}
> +
> static int em28xx_pctv_292e_set_lna(struct dvb_frontend *fe)
> {
> struct dtv_frontend_properties *c = &fe->dtv_property_cache;
> @@ -1920,19 +1926,10 @@ static int em28xx_dvb_init(struct em28xx *dev)
> goto out_free;
> }
>
> -#ifdef CONFIG_GPIOLIB_LEGACY
> /* enable LNA for DVB-T, DVB-T2 and DVB-C */
> - result = gpio_request_one(dvb->lna_gpio,
> - GPIOF_OUT_INIT_LOW, NULL);
> - if (result)
> - dev_err(&dev->intf->dev,
> - "gpio request failed %d\n",
> - result);
> - else
> - gpio_free(dvb->lna_gpio);
> + em28xx_pctv_290e_set_lna_gpio(dev, 0);
>
> - result = 0; /* continue even set LNA fails */
> -#endif
> + /* continue even set LNA fails */
> dvb->fe[0]->ops.set_lna = em28xx_pctv_290e_set_lna;
> }
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v1 3/7] media: em28xx: Open code gpio_request_one()
2026-07-15 18:46 [PATCH v1 0/7] gpiolib: kill gpio_request_one() Andy Shevchenko
2026-07-15 18:46 ` [PATCH v1 1/7] ARM: pxa: spitz: Open code gpio_request_one() Andy Shevchenko
2026-07-15 18:46 ` [PATCH v1 2/7] media: em28xx: Split em28xx_pctv_290e_set_lna_gpio() helper Andy Shevchenko
@ 2026-07-15 18:46 ` Andy Shevchenko
2026-07-27 9:53 ` Hans Verkuil
2026-07-15 18:46 ` [PATCH v1 4/7] MIPS: BCM47XX: " Andy Shevchenko
` (5 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2026-07-15 18:46 UTC (permalink / raw)
To: Andy Shevchenko, Bradford Love, linux-gpio, linux-doc,
linux-kernel, linux-arm-kernel, linux-mips, linux-media
Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet, Shuah Khan,
Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Hauke Mehrtens, Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
Open code the gpio_request_one() call to be able to kill that API
in the follow changes.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/media/usb/em28xx/em28xx-dvb.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index ef148a27c94d..d7f8dcf27900 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -742,18 +742,14 @@ static int em28xx_pctv_290e_set_lna_gpio(struct em28xx *dev, u32 lna)
#ifdef CONFIG_GPIOLIB_LEGACY
struct em28xx_dvb *dvb = dev->dvb;
int ret;
- unsigned long flags;
- if (lna == 1)
- flags = GPIOF_OUT_INIT_HIGH; /* enable LNA */
- else
- flags = GPIOF_OUT_INIT_LOW; /* disable LNA */
-
- ret = gpio_request_one(dvb->lna_gpio, flags, NULL);
- if (ret)
+ ret = gpio_request(dvb->lna_gpio, NULL);
+ if (ret) {
dev_err(&dev->intf->dev, "gpio request failed %d\n", ret);
- else
+ } else {
+ gpio_direction_output(dvb->lna_gpio, !!(lna == 1));
gpio_free(dvb->lna_gpio);
+ }
return ret;
#else
--
2.50.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v1 3/7] media: em28xx: Open code gpio_request_one()
2026-07-15 18:46 ` [PATCH v1 3/7] media: em28xx: Open code gpio_request_one() Andy Shevchenko
@ 2026-07-27 9:53 ` Hans Verkuil
0 siblings, 0 replies; 14+ messages in thread
From: Hans Verkuil @ 2026-07-27 9:53 UTC (permalink / raw)
To: Andy Shevchenko, Bradford Love, linux-gpio, linux-doc,
linux-kernel, linux-arm-kernel, linux-mips, linux-media
Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet, Shuah Khan,
Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Hauke Mehrtens, Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
On 15/07/2026 20:46, Andy Shevchenko wrote:
> Open code the gpio_request_one() call to be able to kill that API
> in the follow changes.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Regards,
Hans
> ---
> drivers/media/usb/em28xx/em28xx-dvb.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
> index ef148a27c94d..d7f8dcf27900 100644
> --- a/drivers/media/usb/em28xx/em28xx-dvb.c
> +++ b/drivers/media/usb/em28xx/em28xx-dvb.c
> @@ -742,18 +742,14 @@ static int em28xx_pctv_290e_set_lna_gpio(struct em28xx *dev, u32 lna)
> #ifdef CONFIG_GPIOLIB_LEGACY
> struct em28xx_dvb *dvb = dev->dvb;
> int ret;
> - unsigned long flags;
>
> - if (lna == 1)
> - flags = GPIOF_OUT_INIT_HIGH; /* enable LNA */
> - else
> - flags = GPIOF_OUT_INIT_LOW; /* disable LNA */
> -
> - ret = gpio_request_one(dvb->lna_gpio, flags, NULL);
> - if (ret)
> + ret = gpio_request(dvb->lna_gpio, NULL);
> + if (ret) {
> dev_err(&dev->intf->dev, "gpio request failed %d\n", ret);
> - else
> + } else {
> + gpio_direction_output(dvb->lna_gpio, !!(lna == 1));
> gpio_free(dvb->lna_gpio);
> + }
>
> return ret;
> #else
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v1 4/7] MIPS: BCM47XX: Open code gpio_request_one()
2026-07-15 18:46 [PATCH v1 0/7] gpiolib: kill gpio_request_one() Andy Shevchenko
` (2 preceding siblings ...)
2026-07-15 18:46 ` [PATCH v1 3/7] media: em28xx: Open code gpio_request_one() Andy Shevchenko
@ 2026-07-15 18:46 ` Andy Shevchenko
2026-07-15 18:46 ` [PATCH v1 5/7] MIPS: BCM63XX: Remove one time use ephy_reset_gpio_flags Andy Shevchenko
` (4 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-07-15 18:46 UTC (permalink / raw)
To: Andy Shevchenko, Bradford Love, linux-gpio, linux-doc,
linux-kernel, linux-arm-kernel, linux-mips, linux-media
Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet, Shuah Khan,
Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Hauke Mehrtens, Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
Open code the gpio_request_one() call to be able to kill that API
in the follow changes.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/mips/bcm47xx/workarounds.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/mips/bcm47xx/workarounds.c b/arch/mips/bcm47xx/workarounds.c
index 745c6228eb2c..9148d2c219d1 100644
--- a/arch/mips/bcm47xx/workarounds.c
+++ b/arch/mips/bcm47xx/workarounds.c
@@ -9,11 +9,13 @@ static void __init bcm47xx_workarounds_enable_usb_power(int usb_power)
{
int err;
- err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
- if (err)
+ err = gpio_request(usb_power, "usb_power");
+ if (err) {
pr_err("Failed to request USB power gpio: %d\n", err);
- else
+ } else {
+ gpio_direction_output(usb_power, 1);
gpio_free(usb_power);
+ }
}
void __init bcm47xx_workarounds(void)
--
2.50.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v1 5/7] MIPS: BCM63XX: Remove one time use ephy_reset_gpio_flags
2026-07-15 18:46 [PATCH v1 0/7] gpiolib: kill gpio_request_one() Andy Shevchenko
` (3 preceding siblings ...)
2026-07-15 18:46 ` [PATCH v1 4/7] MIPS: BCM47XX: " Andy Shevchenko
@ 2026-07-15 18:46 ` Andy Shevchenko
2026-07-15 18:46 ` [PATCH v1 6/7] MIPS: BCM63XX: Open code gpio_request_one() Andy Shevchenko
` (3 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-07-15 18:46 UTC (permalink / raw)
To: Andy Shevchenko, Bradford Love, linux-gpio, linux-doc,
linux-kernel, linux-arm-kernel, linux-mips, linux-media
Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet, Shuah Khan,
Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Hauke Mehrtens, Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
ephy_reset_gpio_flags exists solely to supply polarity to the reset GPIO.
But in practice it's kept all the same and currently only a single user
present. Drop the member and use hard coded GPIO flags instead.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/mips/bcm63xx/boards/board_bcm963xx.c | 7 +++----
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 3 ---
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index c5617b889b1c..57e916c06792 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -42,7 +42,7 @@ static struct board_info __initdata board_cvg834g = {
.expected_cpu_id = 0x3368,
.ephy_reset_gpio = 36,
- .ephy_reset_gpio_flags = GPIOF_OUT_INIT_HIGH,
+
.has_pci = 1,
.has_uart0 = 1,
.has_uart1 = 1,
@@ -903,9 +903,8 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_leds);
- if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags)
- gpio_request_one(board.ephy_reset_gpio,
- board.ephy_reset_gpio_flags, "ephy-reset");
+ if (board.ephy_reset_gpio)
+ gpio_request_one(board.ephy_reset_gpio, GPIOF_OUT_INIT_HIGH, "ephy-reset");
return 0;
}
diff --git a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
index 830f53f28e3f..018a56cbc328 100644
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
@@ -46,9 +46,6 @@ struct board_info {
/* External PHY reset GPIO */
unsigned int ephy_reset_gpio;
-
- /* External PHY reset GPIO flags from gpio.h */
- unsigned long ephy_reset_gpio_flags;
};
#endif /* ! BOARD_BCM963XX_H_ */
--
2.50.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v1 6/7] MIPS: BCM63XX: Open code gpio_request_one()
2026-07-15 18:46 [PATCH v1 0/7] gpiolib: kill gpio_request_one() Andy Shevchenko
` (4 preceding siblings ...)
2026-07-15 18:46 ` [PATCH v1 5/7] MIPS: BCM63XX: Remove one time use ephy_reset_gpio_flags Andy Shevchenko
@ 2026-07-15 18:46 ` Andy Shevchenko
2026-07-15 18:46 ` [PATCH v1 7/7] gpiolib: Get rid of not used anymore gpio_request_one() Andy Shevchenko
` (2 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-07-15 18:46 UTC (permalink / raw)
To: Andy Shevchenko, Bradford Love, linux-gpio, linux-doc,
linux-kernel, linux-arm-kernel, linux-mips, linux-media
Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet, Shuah Khan,
Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Hauke Mehrtens, Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
Open code the gpio_request_one() call to be able to kill that API
in the follow changes.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/mips/bcm63xx/boards/board_bcm963xx.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index 57e916c06792..993341604439 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -903,8 +903,11 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_leds);
- if (board.ephy_reset_gpio)
- gpio_request_one(board.ephy_reset_gpio, GPIOF_OUT_INIT_HIGH, "ephy-reset");
+ if (board.ephy_reset_gpio) {
+ gpio_request(board.ephy_reset_gpio, "ephy-reset");
+ gpio_direction_output(board.ephy_reset_gpio, 1);
+ gpio_free(board.ephy_reset_gpio);
+ }
return 0;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v1 7/7] gpiolib: Get rid of not used anymore gpio_request_one()
2026-07-15 18:46 [PATCH v1 0/7] gpiolib: kill gpio_request_one() Andy Shevchenko
` (5 preceding siblings ...)
2026-07-15 18:46 ` [PATCH v1 6/7] MIPS: BCM63XX: Open code gpio_request_one() Andy Shevchenko
@ 2026-07-15 18:46 ` Andy Shevchenko
[not found] ` <6a57fbc2.20aff8f6.286553.85fe@mx.google.com>
2026-07-24 21:40 ` [PATCH v1 0/7] " Linus Walleij
8 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-07-15 18:46 UTC (permalink / raw)
To: Andy Shevchenko, Bradford Love, linux-gpio, linux-doc,
linux-kernel, linux-arm-kernel, linux-mips, linux-media
Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet, Shuah Khan,
Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Hauke Mehrtens, Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
No more users.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
Documentation/driver-api/gpio/consumer.rst | 2 +-
drivers/gpio/gpiolib-legacy.c | 31 ----------------------
include/linux/gpio/legacy.h | 8 ------
3 files changed, 1 insertion(+), 40 deletions(-)
diff --git a/Documentation/driver-api/gpio/consumer.rst b/Documentation/driver-api/gpio/consumer.rst
index bb3366047fad..03edd9472f07 100644
--- a/Documentation/driver-api/gpio/consumer.rst
+++ b/Documentation/driver-api/gpio/consumer.rst
@@ -463,7 +463,7 @@ and vice-versa::
The GPIO number returned by desc_to_gpio() can safely be used as a parameter of
the gpio\_*() functions for as long as the GPIO descriptor `desc` is not freed.
All the same, a GPIO number passed to gpio_to_desc() must first be properly
-acquired using e.g. gpio_request_one(), and the returned GPIO descriptor is only
+acquired using e.g. gpio_request(), and the returned GPIO descriptor is only
considered valid until that GPIO number is released using gpio_free().
Freeing a GPIO obtained by one API with the other API is forbidden and an
diff --git a/drivers/gpio/gpiolib-legacy.c b/drivers/gpio/gpiolib-legacy.c
index ef3f2ef30cf2..c2b04605b203 100644
--- a/drivers/gpio/gpiolib-legacy.c
+++ b/drivers/gpio/gpiolib-legacy.c
@@ -21,37 +21,6 @@ void gpio_free(unsigned gpio)
}
EXPORT_SYMBOL_GPL(gpio_free);
-/**
- * gpio_request_one - request a single GPIO with initial configuration
- * @gpio: the GPIO number
- * @flags: GPIO configuration as specified by GPIOF_*
- * @label: a literal description string of this GPIO
- *
- * **DEPRECATED** This function is deprecated and must not be used in new code.
- *
- * Returns:
- * 0 on success, or negative errno on failure.
- */
-int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
-{
- int err;
-
- err = gpio_request(gpio, label);
- if (err)
- return err;
-
- if (flags & GPIOF_IN)
- err = gpio_direction_input(gpio);
- else
- err = gpio_direction_output(gpio, !!(flags & GPIOF_OUT_INIT_HIGH));
-
- if (err)
- gpio_free(gpio);
-
- return err;
-}
-EXPORT_SYMBOL_GPL(gpio_request_one);
-
/*
* **DEPRECATED** This function is deprecated and must not be used in new code.
*/
diff --git a/include/linux/gpio/legacy.h b/include/linux/gpio/legacy.h
index 557ef635935e..d4273162ed13 100644
--- a/include/linux/gpio/legacy.h
+++ b/include/linux/gpio/legacy.h
@@ -82,8 +82,6 @@ static inline int gpio_to_irq(unsigned gpio)
return gpiod_to_irq(gpio_to_desc(gpio));
}
-int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
-
int devm_gpio_request_one(struct device *dev, unsigned gpio,
unsigned long flags, const char *label);
@@ -104,12 +102,6 @@ static inline int gpio_request(unsigned gpio, const char *label)
return -ENOSYS;
}
-static inline int gpio_request_one(unsigned gpio,
- unsigned long flags, const char *label)
-{
- return -ENOSYS;
-}
-
static inline void gpio_free(unsigned gpio)
{
might_sleep();
--
2.50.1
^ permalink raw reply related [flat|nested] 14+ messages in thread[parent not found: <6a57fbc2.20aff8f6.286553.85fe@mx.google.com>]
* Re: [v1,0/7] gpiolib: kill gpio_request_one()
[not found] ` <6a57fbc2.20aff8f6.286553.85fe@mx.google.com>
@ 2026-07-16 20:18 ` Andy Shevchenko
2026-07-20 8:55 ` Ricardo Ribalda Delgado
0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2026-07-16 20:18 UTC (permalink / raw)
To: linux-media; +Cc: Linux Media CI
On Wed, Jul 15, 2026 at 02:29:38PM -0700, Patchwork Integration wrote:
> Dear Andy Shevchenko:
>
> Thanks for your patches! Unfortunately the Media CI robot detected some
> issues:
>
> # Test media-patchstyle:rc core
> fatal: Not a valid object name 8dac27bfa2f9
> /builds/linux-media/users/patchwork/include/media/rc-map.h:265: duplicate value for rc-hauppauge
> rc-videomate-m1f.c: name #define RC_MAP_VIDEOMATE_K100 does not match rc-videomate-k100
> /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:125: expecting rc-rc6-mce found rc-rc5-tv
> /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:126: expecting rc-real-audio-220-32-keys found rc-rc6-mce
> /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:127: expecting rc-reddo found rc-real-audio-220-32-keys
> /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:128: expecting rc-siemens-gigaset-rc20 found rc-reddo
> /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:150: expecting rc-vega-s9x found rc-videomate-k100
> /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:151: expecting rc-videomate-m1f found rc-videomate-s350
> /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:152: expecting rc-videomate-s350 found rc-videomate-tv-pvr
> /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:153: expecting rc-videomate-tv-pvr found rc-videostrong-kii-pro
> /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:154: expecting rc-videostrong-kii-pro found rc-vega-s9x
> /builds/linux-media/users/patchwork/include/media/rc-map.h:312: rc-rc5-tv does not exist
> /builds/linux-media/users/patchwork/include/media/rc-map.h:339: rc-videomate-k100 does not exist
> /builds/linux-media/users/patchwork/include/media/rc-map.h: missing entry for rc-videomate-m1f
> errors: 14
What is this?
> Please fix your series, and upload a new version. If you have a patchwork
> account, do not forget to mark the current series as Superseded.
>
> For more details, check the full report at:
> https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/105065189/artifacts/report.htm .
>
> ---
> Check the latest rules for contributing your patches at:
> https://docs.kernel.org/driver-api/media/maintainer-entry-profile.html
>
> If you believe that the CI is wrong, kindly open an issue at
> https://gitlab.freedesktop.org/linux-media/media-ci/-/issues or reply-all
> to this message.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [v1,0/7] gpiolib: kill gpio_request_one()
2026-07-16 20:18 ` [v1,0/7] gpiolib: kill gpio_request_one() Andy Shevchenko
@ 2026-07-20 8:55 ` Ricardo Ribalda Delgado
2026-07-20 12:02 ` Andy Shevchenko
0 siblings, 1 reply; 14+ messages in thread
From: Ricardo Ribalda Delgado @ 2026-07-20 8:55 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-media, Linux Media CI
Hi Andy
On Thu, Jul 16, 2026 at 10:20 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Wed, Jul 15, 2026 at 02:29:38PM -0700, Patchwork Integration wrote:
> > Dear Andy Shevchenko:
> >
> > Thanks for your patches! Unfortunately the Media CI robot detected some
> > issues:
> >
> > # Test media-patchstyle:rc core
> > fatal: Not a valid object name 8dac27bfa2f9
> > /builds/linux-media/users/patchwork/include/media/rc-map.h:265: duplicate value for rc-hauppauge
> > rc-videomate-m1f.c: name #define RC_MAP_VIDEOMATE_K100 does not match rc-videomate-k100
> > /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:125: expecting rc-rc6-mce found rc-rc5-tv
> > /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:126: expecting rc-real-audio-220-32-keys found rc-rc6-mce
> > /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:127: expecting rc-reddo found rc-real-audio-220-32-keys
> > /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:128: expecting rc-siemens-gigaset-rc20 found rc-reddo
> > /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:150: expecting rc-vega-s9x found rc-videomate-k100
> > /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:151: expecting rc-videomate-m1f found rc-videomate-s350
> > /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:152: expecting rc-videomate-s350 found rc-videomate-tv-pvr
> > /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:153: expecting rc-videomate-tv-pvr found rc-videostrong-kii-pro
> > /builds/linux-media/users/patchwork/Documentation/devicetree/bindings/media/rc.yaml:154: expecting rc-videostrong-kii-pro found rc-vega-s9x
> > /builds/linux-media/users/patchwork/include/media/rc-map.h:312: rc-rc5-tv does not exist
> > /builds/linux-media/users/patchwork/include/media/rc-map.h:339: rc-videomate-k100 does not exist
> > /builds/linux-media/users/patchwork/include/media/rc-map.h: missing entry for rc-videomate-m1f
> > errors: 14
>
> What is this?
Please ignore. Media-CI applied your patch to the fixes tree instead
of the next tree and "fixes" has some issues with the rc-checks
Sorry about that.
>
> > Please fix your series, and upload a new version. If you have a patchwork
> > account, do not forget to mark the current series as Superseded.
> >
> > For more details, check the full report at:
> > https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/105065189/artifacts/report.htm .
> >
> > ---
> > Check the latest rules for contributing your patches at:
> > https://docs.kernel.org/driver-api/media/maintainer-entry-profile.html
> >
> > If you believe that the CI is wrong, kindly open an issue at
> > https://gitlab.freedesktop.org/linux-media/media-ci/-/issues or reply-all
> > to this message.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
>
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [v1,0/7] gpiolib: kill gpio_request_one()
2026-07-20 8:55 ` Ricardo Ribalda Delgado
@ 2026-07-20 12:02 ` Andy Shevchenko
0 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-07-20 12:02 UTC (permalink / raw)
To: Ricardo Ribalda Delgado; +Cc: linux-media, Linux Media CI
On Mon, Jul 20, 2026 at 10:55:23AM +0200, Ricardo Ribalda Delgado wrote:
> On Thu, Jul 16, 2026 at 10:20 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Wed, Jul 15, 2026 at 02:29:38PM -0700, Patchwork Integration wrote:
...
> > > Thanks for your patches! Unfortunately the Media CI robot detected some
> > > issues:
> > What is this?
>
> Please ignore. Media-CI applied your patch to the fixes tree instead
> of the next tree and "fixes" has some issues with the rc-checks
>
> Sorry about that.
I see, thanks for explanation. Can somebody Review/Ack the media patches,
please?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/7] gpiolib: kill gpio_request_one()
2026-07-15 18:46 [PATCH v1 0/7] gpiolib: kill gpio_request_one() Andy Shevchenko
` (7 preceding siblings ...)
[not found] ` <6a57fbc2.20aff8f6.286553.85fe@mx.google.com>
@ 2026-07-24 21:40 ` Linus Walleij
8 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2026-07-24 21:40 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Bradford Love, linux-gpio, linux-doc, linux-kernel,
linux-arm-kernel, linux-mips, linux-media, Bartosz Golaszewski,
Jonathan Corbet, Shuah Khan, Daniel Mack, Haojian Zhuang,
Robert Jarzmik, Russell King, Hauke Mehrtens,
Rafał Miłecki, Thomas Bogendoerfer,
Mauro Carvalho Chehab
On Wed, Jul 15, 2026 at 8:51 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> This is the finilazation of the work announced in the commit 61e1fd2abca4
> ("gpiolib: legacy: Make sure we kill gpio_request_one() first"). With this
> small series we kill gpio_request_one() and leave only two legacy calls
> devm_gpio_request_one() and gpio_request(), where the managed one has only
> a few users and high chances to be killed soon as well.
>
> The series is supposed to go via GPIO tree (due to nature of the last patch)
> with possible immutable branch for others. Please, ack.
The kernel is clearly a better place after these patches than before it, so:
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 14+ messages in thread