From nobody Fri Sep 25 23:53:13 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53A294483A5; Mon, 7 Sep 2026 09:10:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788772221; cv=none; b=QglbBfU7TbXm5JHNifzyzNqMIWbt8AcytgFh2Z2VKE5Hcalcm94TtbSrBuJdfe6s6vuJKANtT7csYsB3rIYGbc7YB6wXFqvIf3NfqiBwNgqyEVCGPk6lJJGXl9VxGbTc9SJNqb2ocj1VtSfM7an8yaPR5nzLEhictUf4CQgEZVk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788772221; c=relaxed/simple; bh=YejfvrcVApfTPko6Ew4mm+xI4YgC6S4azs74d0WnpOs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AMT0CLmHknKWcqub+mM5BJ9mND+P/RqKccMIOyyVsIObf0yLOZR7A5b0yh4xCujRcDS3jE+/EfgYF8UD2wfhjrO3FBeRR54DvBXnRNxD1d12m7ZRKD+NDTbNjoeJ0UCT8j34R6Y7injZH+sGApis2Nljx9Dnfrv7hc0k+0t3XuI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DBvLVtam; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DBvLVtam" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E2AB1F00A3D; Mon, 7 Sep 2026 09:10:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788772220; bh=1emP0cFw/KcTNGkjkupGjM+UOv9S2UiuNhamk0iP0Xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DBvLVtam79FKC40PUlFhIj0d2jIstyCQdVs+uX2OGe7eca5n18E128oESbt0vspL7 YUs7/DQX11ST3+ewjkdh/s/oIajMan5hLslm8af74ohm3xlBLcCaGWlK9hy08mReVb qbXFpJzeyrOQBuoXq1ZZah6IvdUfK7AdvxkpYdcnqlzjpg6bBJzIrjBPS1XXIpnvUe 46w7nhHzckGAt3giPRwMxxW+NdFQgMkxgVHlqPiSFTkuzzTn0hCj2MdG4S7jmk6fIo g00qh4mavu9vOcMwxBCsV61PnNmQ6O7jeFNx2DRjtP+Z4HfYKt1Xo4NYMTRk6AQXht x0z5uB4cYoJ3g== From: Arnd Bergmann To: Linus Walleij , Bartosz Golaszewski Cc: Arnd Bergmann , Thomas Bogendoerfer , John Paul Adrian Glaubitz , Kent Gibson , Johannes Berg , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-sh@vger.kernel.org, linux-gpio@vger.kernel.org, linux-wireless@vger.kernel.org, Bartosz Golaszewski , Dmitry Torokhov Subject: [PATCH 1/2 v7] gpiolib: turn off legacy interface by default Date: Mon, 7 Sep 2026 11:09:55 +0200 Message-ID: <20260907090956.2825703-2-arnd@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260907090956.2825703-1-arnd@kernel.org> References: <20260907090956.2825703-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann All users of the legacy interface now select CONFIG_GPIOLIB_LEGACY, so it can be turned off by default and only get built on platforms that still have one unconverted driver. Allow turning it on manually for compile testing, in order to keep the build coverage of the legacy drivers in allmodconfig and randconfig. Acked-by: Bartosz Golaszewski Acked-by: Dmitry Torokhov # for input Signed-off-by: Arnd Bergmann Reviewed-by: Geert Uytterhoeven Reviewed-by: Linus Walleij --- drivers/gpio/Kconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index a48586bb8edb..2b1f6f4c7446 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -4,7 +4,14 @@ # =20 config GPIOLIB_LEGACY - def_bool y + bool "Legacy GPIO interfaces" if COMPILE_TEST + help + There are a few legacy platforms that use the traditional GPIO + number based interfaces instead of GPIO descriptors. + Say Y here to enable build testing drivers that are specific + to those platforms. + + If unsure, say N. =20 config HAVE_SHARED_GPIOS bool --=20 2.53.0 From nobody Fri Sep 25 23:53:13 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4D5C449B2B; Mon, 7 Sep 2026 09:10:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788772225; cv=none; b=AGX5qMPG3lHQD944JKeaogEYCgInzKrcIC7sZ1K8jLuAYsehG1XFWhliU2S1Sc0BLfzkGSgAtx9l8pNG/ji/8Ns01C41Fvzw8u9NtkERnNxUqKbueyHNK7AYGabZLdYUpZ0EjpBmSClaGIRaXGoLy/VwUfbp/hBkNmw3mhUmLhI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788772225; c=relaxed/simple; bh=roVB1YyvOHDzourAJL+8yzY10KYNevFGzbF5hvxfCTs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XQXRssDEPgqywF95X0Kdvw/otuAxaFTePI4cxyzT9YDyFhuonyxIYNR13bV5hhQQtRjtRbqXeqX4hMS1INyFwLSBuVWJQ9PLaoNaNReqcEZ9fasoQcuo00+GDfV7ELkyfl6kHTEBYkTOZkT+D5+lgWzDo8Qglc0nC7avIKWJ0Yw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ck6fDWhm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ck6fDWhm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABD071F00A3A; Mon, 7 Sep 2026 09:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788772223; bh=0PTXH8W20ZyoeViUs3nxicCtaP/fM9lwo8ORJUMduDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ck6fDWhmbLP1YgsRsRuTXHe/4iAJ/igArbL6LZOygJxCWOmoM8zca1XGojZXMTg7w pAH0yLC3VYhWaILiQemRDd5ZZKrWRDBpTv6/po5aZ+W3lLonSZ3BjQJpgUWW4oX9E7 7xlQg/X9YCou573+ejK8NgDQtggDVbsXBdDgiOwHAgTir+oYxG2W6bDnBlnhr3ecGD EK6N+o/5dRbqYY4dMiDNFXKl7vgFWWcuquI6dqggPqOmNffEFxgUKsDGfpSaPSmTii HB2OtAIziidum01Xmu3pz8+8WqxT26L9Z9/nrzq17aLSmiky6RHF/LZn7vxtx83P01 BQZBSHmFVpJzw== From: Arnd Bergmann To: Linus Walleij , Bartosz Golaszewski Cc: Arnd Bergmann , Thomas Bogendoerfer , John Paul Adrian Glaubitz , Kent Gibson , Johannes Berg , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-sh@vger.kernel.org, linux-gpio@vger.kernel.org, linux-wireless@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 2/2 v7] gpiolib: remove linux/gpio.h Date: Mon, 7 Sep 2026 11:09:56 +0200 Message-ID: <20260907090956.2825703-3-arnd@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260907090956.2825703-1-arnd@kernel.org> References: <20260907090956.2825703-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann After all other drivers have converted to linux/gpio/consumer.h or linux/gpio/legacy.h, remove the final leftover bits here. Acked-by: Bartosz Golaszewski Signed-off-by: Arnd Bergmann Acked-by: Thomas Bogendoerfer Reviewed-by: Geert Uytterhoeven Reviewed-by: Linus Walleij --- MAINTAINERS | 1 - arch/mips/txx9/rbtx4927/setup.c | 2 +- arch/sh/boards/mach-rsk/devices-rsk7203.c | 2 +- drivers/gpio/TODO | 4 +--- drivers/gpio/gpiolib-cdev.c | 2 +- drivers/gpio/gpiolib-legacy.c | 3 +-- drivers/gpio/gpiolib.c | 2 +- drivers/net/wireless/morsemicro/mm81x/hw.c | 1 - drivers/net/wireless/morsemicro/mm81x/yaps.c | 1 - include/linux/gpio.h | 22 -------------------- 10 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 include/linux/gpio.h diff --git a/MAINTAINERS b/MAINTAINERS index 3a19da74d00c..ee06d678cd59 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11255,7 +11255,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/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setu= p.c index 223889c03186..fdbe2bd87979 100644 --- a/arch/mips/txx9/rbtx4927/setup.c +++ b/arch/mips/txx9/rbtx4927/setup.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/sh/boards/mach-rsk/devices-rsk7203.c b/arch/sh/boards/mac= h-rsk/devices-rsk7203.c index e6b05d4588b7..eb56b57812bd 100644 --- a/arch/sh/boards/mach-rsk/devices-rsk7203.c +++ b/arch/sh/boards/mach-rsk/devices-rsk7203.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/gpio/TODO b/drivers/gpio/TODO index 7ce80fde1f17..4fce4a7e4704 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. =20 - 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 and eventually delete - altogether. + following ongoing work as well) we can delete . =20 --------------------------------------------------------------------------= ----- =20 diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 9f3b628d5793..1c2c94387b77 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include 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 @@ =20 #include #include - -#include +#include =20 #include "gpiolib.h" =20 diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index ef8ccaf17c9c..c9c517488e0a 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -29,7 +29,7 @@ #include #include =20 -#include +#include #include #include =20 diff --git a/drivers/net/wireless/morsemicro/mm81x/hw.c b/drivers/net/wirel= ess/morsemicro/mm81x/hw.c index 9293f4094db1..e48eaf151faa 100644 --- a/drivers/net/wireless/morsemicro/mm81x/hw.c +++ b/drivers/net/wireless/morsemicro/mm81x/hw.c @@ -7,7 +7,6 @@ #include #include #include -#include #include "hif.h" #include "mac.h" #include "bus.h" diff --git a/drivers/net/wireless/morsemicro/mm81x/yaps.c b/drivers/net/wir= eless/morsemicro/mm81x/yaps.c index e98a2a58726f..252116425bc3 100644 --- a/drivers/net/wireless/morsemicro/mm81x/yaps.c +++ b/drivers/net/wireless/morsemicro/mm81x/yaps.c @@ -2,7 +2,6 @@ /* * Copyright (c) 2017-2026 Morse Micro */ -#include #include #include #include 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 - * If you're implementing a GPIO consumer, only include - * If you're using the legacy interfaces, include - */ - -#ifndef __LINUX_GPIO_H -#define __LINUX_GPIO_H - -#include -#ifdef CONFIG_GPIOLIB -#include -#endif - -#ifdef CONFIG_GPIOLIB_LEGACY -#include -#endif /* CONFIG_GPIOLIB_LEGACY */ - -#endif /* __LINUX_GPIO_H */ --=20 2.53.0