Linux Documentation
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Bradford Love <brad@nextdimension.cc>,
	linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
	linux-media@vger.kernel.org
Cc: "Linus Walleij" <linusw@kernel.org>,
	"Bartosz Golaszewski" <brgl@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Daniel Mack" <daniel@zonque.org>,
	"Haojian Zhuang" <haojian.zhuang@gmail.com>,
	"Robert Jarzmik" <robert.jarzmik@free.fr>,
	"Russell King" <linux@armlinux.org.uk>,
	"Hauke Mehrtens" <hauke@hauke-m.de>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>
Subject: [PATCH v1 4/7] MIPS: BCM47XX: Open code gpio_request_one()
Date: Wed, 15 Jul 2026 20:46:44 +0200	[thread overview]
Message-ID: <20260715185112.1323510-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com>

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


  parent reply	other threads:[~2026-07-15 18:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` [PATCH v1 3/7] media: em28xx: Open code gpio_request_one() Andy Shevchenko
2026-07-15 18:46 ` Andy Shevchenko [this message]
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 ` [PATCH v1 6/7] MIPS: BCM63XX: Open code gpio_request_one() Andy Shevchenko
2026-07-15 18:46 ` [PATCH v1 7/7] gpiolib: Get rid of not used anymore gpio_request_one() Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260715185112.1323510-5-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=brad@nextdimension.cc \
    --cc=brgl@kernel.org \
    --cc=corbet@lwn.net \
    --cc=daniel@zonque.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mchehab@kernel.org \
    --cc=robert.jarzmik@free.fr \
    --cc=skhan@linuxfoundation.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox