Re: [PATCH v1 4/7] MIPS: BCM47XX: Open code gpio_request_one()
From: Thomas Bogendoerfer
Date: Thu Oct 22 2026 - 15:03:33 EST
On Wed, Jul 15, 2026 at 08:46:44PM +0200, 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@xxxxxxxxxxxxxxx>
> ---
> 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
Acked-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]