[PATCH 13/13] gpiolib: remove linux/gpio.h
Arnd Bergmann <[email protected]> Mon, 29 Jun 2026 15:26:33 +0200
| Newsgroups | org.kernel.vger.linux-sh,dev.linux.lists.linux-sunxi,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-phy,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-gpio,org.kernel.vger.linux-input,org.kernel.vger.linux-kernel,org.kernel.vger.linux-m68k,org.kernel.vger.linux-media,org.kernel.vger.linux-mips,org.kernel.vger.linux-samsung-soc,org.kernel.vger.linux-sound,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
From: Arnd Bergmann <[email protected]> After all other drivers have converted to linux/gpio/consumer.h or linux/gpio/legacy.h, remove the final leftover bits here. Signed-off-by: Arnd Bergmann <[email protected]> --- MAINTAINERS | 1 - drivers/gpio/TODO | 4 +--- drivers/gpio/gpiolib-cdev.c | 2 +- drivers/gpio/gpiolib-legacy.c | 3 +-- drivers/gpio/gpiolib.c | 2 +- include/linux/gpio.h | 22 ---------------------- 6 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 include/linux/gpio.h diff --git a/MAINTAINERS b/MAINTAINERS index 15011f5752a9..7f3f386b1d8c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11175,7 +11175,6 @@ F: Documentation/devicetree/bindings/gpio/ F: Documentation/driver-api/gpio/ F: drivers/gpio/ F: include/dt-bindings/gpio/ -F: include/linux/gpio.h F: include/linux/gpio/ K: (devm_)?gpio_(request|free|direction|get|set) K: GPIOD_FLAGS_BIT_NONEXCLUSIVE diff --git a/drivers/gpio/TODO b/drivers/gpio/TODO index 7ce80fde1f17..894c7e1af252 100644 --- a/drivers/gpio/TODO +++ b/drivers/gpio/TODO @@ -52,9 +52,7 @@ Work items: base can be made dynamic (set to -1) if CONFIG_GPIO_SYSFS is disabled. - When this work is complete (will require some of the items in the - following ongoing work as well) we can delete the old global - numberspace accessors from <linux/gpio.h> and eventually delete - <linux/gpio.h> altogether. + following ongoing work as well) we can delete <linux/gpio/lagacy.h>. ------------------------------------------------------------------------------- diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 82f27db0b230..9b6a28819371 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -11,7 +11,7 @@ #include <linux/device.h> #include <linux/err.h> #include <linux/file.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/hte.h> #include <linux/interrupt.h> diff --git a/drivers/gpio/gpiolib-legacy.c b/drivers/gpio/gpiolib-legacy.c index ef3f2ef30cf2..33e5a45e720b 100644 --- a/drivers/gpio/gpiolib-legacy.c +++ b/drivers/gpio/gpiolib-legacy.c @@ -7,8 +7,7 @@ #include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> - -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include "gpiolib.h" diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index e5fb60111151..1f498d6c8c68 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -29,7 +29,7 @@ #include <linux/string.h> #include <linux/string_choices.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/gpio/machine.h> diff --git a/include/linux/gpio.h b/include/linux/gpio.h deleted file mode 100644 index b0d4942a65de..000000000000 --- a/include/linux/gpio.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * NOTE: This header *must not* be included. - * - * If you're implementing a GPIO driver, only include <linux/gpio/driver.h> - * If you're implementing a GPIO consumer, only include <linux/gpio/consumer.h> - * If you're using the legacy interfaces, include <linux/gpio/legacy.h> - */ - -#ifndef __LINUX_GPIO_H -#define __LINUX_GPIO_H - -#include <linux/types.h> -#ifdef CONFIG_GPIOLIB -#include <linux/gpio/consumer.h> -#endif - -#ifdef CONFIG_GPIOLIB_LEGACY -#include <linux/gpio/legacy.h> -#endif /* CONFIG_GPIOLIB_LEGACY */ - -#endif /* __LINUX_GPIO_H */ -- 2.39.5