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 7/7] gpiolib: Get rid of not used anymore gpio_request_one()
Date: Wed, 15 Jul 2026 20:46:47 +0200 [thread overview]
Message-ID: <20260715185112.1323510-8-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com>
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
prev 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 ` [PATCH v1 4/7] MIPS: BCM47XX: " Andy Shevchenko
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 ` Andy Shevchenko [this message]
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-8-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