mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
@ 2026-11-23  8:57 Arnd Bergmann
  2026-11-23  8:57 ` [PATCH 1/2] [v8] gpiolib: turn off legacy interface by default Arnd Bergmann
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Arnd Bergmann @ 2026-11-23  8:57 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Arnd Bergmann, Dmitry Torokhov, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, linux-gpio, linux-wireless

From: Arnd Bergmann <arnd@arndb.de>

These two patches are left from my cleanup series, finishing off the
work to turn off CONFIG_GPIOLIB_LEGACY by default, and removing the
include/linux/gpio.h header.

This was planned for 7.3 originally[1], but kept conflicting with
ongoing cleanups for the broken rsk7203 board. I've skipped the
oneline rsk change now, which will be fixed properly by Dmitry's
patch [2].

     Arnd

[1] https://lore.kernel.org/all/20260907090956.2825703-1-arnd@kernel.org/
[2] https://lore.kernel.org/all/20260929-rsk7203-properties-v3-0-02f84aeb8e47@gmail.com/


Arnd Bergmann (2):
  [v8] gpiolib: turn off legacy interface by default
  [v8] gpiolib: remove linux/gpio.h

 MAINTAINERS                                  |  1 -
 arch/mips/txx9/rbtx4927/setup.c              |  2 +-
 drivers/gpio/Kconfig                         |  9 +++++++-
 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, 13 insertions(+), 34 deletions(-)
 delete mode 100644 include/linux/gpio.h

-- 
2.53.0

Cc: Bartosz Golaszewski <brgl@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Kent Gibson <warthog618@gmail.com>
Cc: Linus Walleij <linusw@kernel.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-wireless@vger.kernel.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/2] [v8] gpiolib: turn off legacy interface by default
  2026-11-23  8:57 [PATCH 0/2 v8] gpiolib: finish the legacy cleanup Arnd Bergmann
@ 2026-11-23  8:57 ` Arnd Bergmann
  2026-11-23  8:57 ` [PATCH 2/2] [v8] gpiolib: remove linux/gpio.h Arnd Bergmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Arnd Bergmann @ 2026-11-23  8:57 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Arnd Bergmann, Dmitry Torokhov, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, linux-gpio, linux-wireless,
	Bartosz Golaszewski, Geert Uytterhoeven

From: Arnd Bergmann <arnd@arndb.de>

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 <bartosz.golaszewski@oss.qualcomm.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> # for input
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/Kconfig | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 9db764a3bcfd..56b5553b51de 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -4,7 +4,14 @@
 #
 
 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.
 
 config HAVE_SHARED_GPIOS
 	bool
-- 
2.53.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 2/2] [v8] gpiolib: remove linux/gpio.h
  2026-11-23  8:57 [PATCH 0/2 v8] gpiolib: finish the legacy cleanup Arnd Bergmann
  2026-11-23  8:57 ` [PATCH 1/2] [v8] gpiolib: turn off legacy interface by default Arnd Bergmann
@ 2026-11-23  8:57 ` Arnd Bergmann
  2026-11-23 14:59 ` [PATCH 0/2 v8] gpiolib: finish the legacy cleanup Bartosz Golaszewski
  2026-11-24 13:59 ` (subset) " Bartosz Golaszewski
  3 siblings, 0 replies; 13+ messages in thread
From: Arnd Bergmann @ 2026-11-23  8:57 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Arnd Bergmann, Dmitry Torokhov, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, linux-gpio, linux-wireless,
	Bartosz Golaszewski

From: Arnd Bergmann <arnd@arndb.de>

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 <bartosz.golaszewski@oss.qualcomm.com>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 MAINTAINERS                                  |  1 -
 arch/mips/txx9/rbtx4927/setup.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 --------------------
 9 files changed, 5 insertions(+), 33 deletions(-)
 delete mode 100644 include/linux/gpio.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 829c795c13b3..7efa1e6446a7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11589,7 +11589,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/setup.c
index 223889c03186..fdbe2bd87979 100644
--- a/arch/mips/txx9/rbtx4927/setup.c
+++ b/arch/mips/txx9/rbtx4927/setup.c
@@ -48,7 +48,7 @@
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/machine.h>
 #include <linux/leds.h>
 #include <asm/io.h>
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.
 
 - 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/legacy.h>.
 
 -------------------------------------------------------------------------------
 
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index d877f2de506c..795f7df5b540 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 c2b04605b203..a841208dc19a 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 c09342fc52cb..c16d69761e04 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -30,7 +30,7 @@
 #include <linux/string_choices.h>
 #include <linux/workqueue.h>
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/driver.h>
 #include <linux/gpio/machine.h>
 
diff --git a/drivers/net/wireless/morsemicro/mm81x/hw.c b/drivers/net/wireless/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 <linux/stringify.h>
 #include <linux/types.h>
 #include <linux/unaligned.h>
-#include <linux/gpio.h>
 #include "hif.h"
 #include "mac.h"
 #include "bus.h"
diff --git a/drivers/net/wireless/morsemicro/mm81x/yaps.c b/drivers/net/wireless/morsemicro/mm81x/yaps.c
index 2d1728c1a6de..a843c1c16216 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 <linux/gpio.h>
 #include <linux/random.h>
 #include <linux/timer.h>
 #include <linux/bitops.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.53.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-23  8:57 [PATCH 0/2 v8] gpiolib: finish the legacy cleanup Arnd Bergmann
  2026-11-23  8:57 ` [PATCH 1/2] [v8] gpiolib: turn off legacy interface by default Arnd Bergmann
  2026-11-23  8:57 ` [PATCH 2/2] [v8] gpiolib: remove linux/gpio.h Arnd Bergmann
@ 2026-11-23 14:59 ` Bartosz Golaszewski
  2026-11-23 15:08   ` Bartosz Golaszewski
  2026-11-24 13:59 ` (subset) " Bartosz Golaszewski
  3 siblings, 1 reply; 13+ messages in thread
From: Bartosz Golaszewski @ 2026-11-23 14:59 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linus Walleij, Arnd Bergmann, Dmitry Torokhov, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, linux-gpio, linux-wireless

On Mon, Nov 23, 2026 at 09:57:21AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> These two patches are left from my cleanup series, finishing off the
> work to turn off CONFIG_GPIOLIB_LEGACY by default, and removing the
> include/linux/gpio.h header.
> 
> This was planned for 7.3 originally[1], but kept conflicting with
> ongoing cleanups for the broken rsk7203 board. I've skipped the
> oneline rsk change now, which will be fixed properly by Dmitry's
> patch [2].

What is the base commit? It doesn't apply on top of linux-next.

Bart

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-23 14:59 ` [PATCH 0/2 v8] gpiolib: finish the legacy cleanup Bartosz Golaszewski
@ 2026-11-23 15:08   ` Bartosz Golaszewski
  2026-11-23 15:24     ` Arnd Bergmann
  0 siblings, 1 reply; 13+ messages in thread
From: Bartosz Golaszewski @ 2026-11-23 15:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linus Walleij, Arnd Bergmann, Dmitry Torokhov, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, linux-gpio, linux-wireless

On Mon, Nov 23, 2026 at 03:59:24PM +0100, Bartosz Golaszewski wrote:
> On Mon, Nov 23, 2026 at 09:57:21AM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > These two patches are left from my cleanup series, finishing off the
> > work to turn off CONFIG_GPIOLIB_LEGACY by default, and removing the
> > include/linux/gpio.h header.
> > 
> > This was planned for 7.3 originally[1], but kept conflicting with
> > ongoing cleanups for the broken rsk7203 board. I've skipped the
> > oneline rsk change now, which will be fixed properly by Dmitry's
> > patch [2].
> 
> What is the base commit? It doesn't apply on top of linux-next.
>

Scratch that, PEBKAC.

Sashiko is right:

  CC      arch/sh/boards/mach-rsk/devices-rsk7203.o
arch/sh/boards/mach-rsk/devices-rsk7203.c: In function ‘rsk7203_devices_setup’:
arch/sh/boards/mach-rsk/devices-rsk7203.c:127:9: error: implicit declaration of function ‘gpio_request’; did you mean ‘symbol_request’? [-Wimplicit-function-declaration]
  127 |         gpio_request(GPIO_FN_TXD0, NULL);
      |         ^~~~~~~~~~~~
      |         symbol_request
make[5]: *** [scripts/Makefile.build:321: arch/sh/boards/mach-rsk/devices-rsk7203.o] Error 1
make[4]: *** [scripts/Makefile.build:606: arch/sh/boards/mach-rsk] Error 2
make[3]: *** [scripts/Makefile.build:606: arch/sh/boards] Error 2
make[2]: *** [scripts/Makefile.build:606: arch/sh] Error 2
make[1]: *** [/home/brgl/workspace/linux/Makefile:2257: .] Error 2

Bart

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-23 15:08   ` Bartosz Golaszewski
@ 2026-11-23 15:24     ` Arnd Bergmann
  2026-11-23 15:41       ` Bartosz Golaszewski
  0 siblings, 1 reply; 13+ messages in thread
From: Arnd Bergmann @ 2026-11-23 15:24 UTC (permalink / raw)
  To: Bartosz Golaszewski, Arnd Bergmann
  Cc: Linus Walleij, Dmitry Torokhov, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, open list:GPIO SUBSYSTEM,
	linux-wireless

On Mon, Nov 23, 2026, at 16:08, Bartosz Golaszewski wrote:
> On Mon, Nov 23, 2026 at 03:59:24PM +0100, Bartosz Golaszewski wrote:
>> On Mon, Nov 23, 2026 at 09:57:21AM +0100, Arnd Bergmann wrote:
>> > 
>> > This was planned for 7.3 originally[1], but kept conflicting with
>> > ongoing cleanups for the broken rsk7203 board. I've skipped the
>> > oneline rsk change now, which will be fixed properly by Dmitry's
>> > patch [2].
>> 
> Sashiko is right:
>
>   CC      arch/sh/boards/mach-rsk/devices-rsk7203.o
> arch/sh/boards/mach-rsk/devices-rsk7203.c: In function 
> ‘rsk7203_devices_setup’:
> arch/sh/boards/mach-rsk/devices-rsk7203.c:127:9: error: implicit 
> declaration of function ‘gpio_request’; did you mean ‘symbol_request’? 
> [-Wimplicit-function-declaration]
>   127 |         gpio_request(GPIO_FN_TXD0, NULL);
>       |         ^~~~~~~~~~~~
>       |         symbol_request

Yes, this just seemed the easiest way out to avoid clashing with Dmitry's
patches again. If you want the version that doesn't break the build,
you can still apply v7 [1], but that likely means his series has go
through another revision to undo my change and remove the linux/gpio/legacy.h
inclusion.

     Arnd

[1] https://lore.kernel.org/all/20260907090956.2825703-1-arnd@kernel.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-23 15:24     ` Arnd Bergmann
@ 2026-11-23 15:41       ` Bartosz Golaszewski
  2026-11-24  1:10         ` Dmitry Torokhov
  2026-11-24 13:49         ` Arnd Bergmann
  0 siblings, 2 replies; 13+ messages in thread
From: Bartosz Golaszewski @ 2026-11-23 15:41 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Linus Walleij, Dmitry Torokhov, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, open list:GPIO SUBSYSTEM,
	linux-wireless

On Mon, Nov 23, 2026 at 04:24:49PM +0100, Arnd Bergmann wrote:
> On Mon, Nov 23, 2026, at 16:08, Bartosz Golaszewski wrote:
> > On Mon, Nov 23, 2026 at 03:59:24PM +0100, Bartosz Golaszewski wrote:
> >> On Mon, Nov 23, 2026 at 09:57:21AM +0100, Arnd Bergmann wrote:
> >> > 
> >> > This was planned for 7.3 originally[1], but kept conflicting with
> >> > ongoing cleanups for the broken rsk7203 board. I've skipped the
> >> > oneline rsk change now, which will be fixed properly by Dmitry's
> >> > patch [2].
> >> 
> > Sashiko is right:
> >
> >   CC      arch/sh/boards/mach-rsk/devices-rsk7203.o
> > arch/sh/boards/mach-rsk/devices-rsk7203.c: In function 
> > ‘rsk7203_devices_setup’:
> > arch/sh/boards/mach-rsk/devices-rsk7203.c:127:9: error: implicit 
> > declaration of function ‘gpio_request’; did you mean ‘symbol_request’? 
> > [-Wimplicit-function-declaration]
> >   127 |         gpio_request(GPIO_FN_TXD0, NULL);
> >       |         ^~~~~~~~~~~~
> >       |         symbol_request
> 
> Yes, this just seemed the easiest way out to avoid clashing with Dmitry's
> patches again. If you want the version that doesn't break the build,
> you can still apply v7 [1], but that likely means his series has go
> through another revision to undo my change and remove the linux/gpio/legacy.h
> inclusion.
>

Can I apply v7 and provide it to the SH maintainers on an immutable
branch?

Bart

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-23 15:41       ` Bartosz Golaszewski
@ 2026-11-24  1:10         ` Dmitry Torokhov
  2026-11-24 10:53           ` Arnd Bergmann
  2026-11-24 13:49         ` Arnd Bergmann
  1 sibling, 1 reply; 13+ messages in thread
From: Dmitry Torokhov @ 2026-11-24  1:10 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Arnd Bergmann, Arnd Bergmann, Linus Walleij, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, open list:GPIO SUBSYSTEM,
	linux-wireless

Hi Bartosz,

On Mon, Nov 23, 2026 at 04:41:32PM +0100, Bartosz Golaszewski wrote:
> Can I apply v7 and provide it to the SH maintainers on an immutable
> branch?

BTW, I have the soc_button_array rework (converting it to software nodes
and dropping "select GPIOLIB_LEGACY") on an immutable branch based on
v7.4-rc2:

	git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git ib/7.4-rc2-soc-button-array

I recommend pulling it into the gpio tree before applying Arnd's work so
that x86 builds with INPUT_SOC_BUTTON_ARRAY enabled no longer pull in
CONFIG_GPIOLIB_LEGACY either.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-24  1:10         ` Dmitry Torokhov
@ 2026-11-24 10:53           ` Arnd Bergmann
  2026-11-24 12:44             ` Bartosz Golaszewski
  0 siblings, 1 reply; 13+ messages in thread
From: Arnd Bergmann @ 2026-11-24 10:53 UTC (permalink / raw)
  To: Dmitry Torokhov, Bartosz Golaszewski
  Cc: Arnd Bergmann, Linus Walleij, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, open list:GPIO SUBSYSTEM,
	linux-wireless

On Tue, Nov 24, 2026, at 02:10, Dmitry Torokhov wrote:
> Hi Bartosz,
>
> On Mon, Nov 23, 2026 at 04:41:32PM +0100, Bartosz Golaszewski wrote:
>> Can I apply v7 and provide it to the SH maintainers on an immutable
>> branch?
>
> BTW, I have the soc_button_array rework (converting it to software nodes
> and dropping "select GPIOLIB_LEGACY") on an immutable branch based on
> v7.4-rc2:
>
> 	git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git 
> ib/7.4-rc2-soc-button-array

Nice to see that this is ready.

> I recommend pulling it into the gpio tree before applying Arnd's work so
> that x86 builds with INPUT_SOC_BUTTON_ARRAY enabled no longer pull in
> CONFIG_GPIOLIB_LEGACY either.

I don't think the order matters, my patch 1/2 just won't have an
effect on configurations that enable INPUT_SOC_BUTTON_ARRAY until your
patch is merged.

     Arnd

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-24 10:53           ` Arnd Bergmann
@ 2026-11-24 12:44             ` Bartosz Golaszewski
  2026-11-24 13:41               ` Arnd Bergmann
  0 siblings, 1 reply; 13+ messages in thread
From: Bartosz Golaszewski @ 2026-11-24 12:44 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Dmitry Torokhov, Arnd Bergmann, Linus Walleij, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, open list:GPIO SUBSYSTEM,
	linux-wireless

On Tue, Nov 24, 2026 at 11:53:40AM +0100, Arnd Bergmann wrote:
> On Tue, Nov 24, 2026, at 02:10, Dmitry Torokhov wrote:
> > Hi Bartosz,
> >
> > On Mon, Nov 23, 2026 at 04:41:32PM +0100, Bartosz Golaszewski wrote:
> >> Can I apply v7 and provide it to the SH maintainers on an immutable
> >> branch?
> >
> > BTW, I have the soc_button_array rework (converting it to software nodes
> > and dropping "select GPIOLIB_LEGACY") on an immutable branch based on
> > v7.4-rc2:
> >
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git 
> > ib/7.4-rc2-soc-button-array
> 
> Nice to see that this is ready.
> 
> > I recommend pulling it into the gpio tree before applying Arnd's work so
> > that x86 builds with INPUT_SOC_BUTTON_ARRAY enabled no longer pull in
> > CONFIG_GPIOLIB_LEGACY either.
> 
> I don't think the order matters, my patch 1/2 just won't have an
> effect on configurations that enable INPUT_SOC_BUTTON_ARRAY until your
> patch is merged.
>

I'm not following something, the conflict is with the SH tree, isn't it?

Bart

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-24 12:44             ` Bartosz Golaszewski
@ 2026-11-24 13:41               ` Arnd Bergmann
  0 siblings, 0 replies; 13+ messages in thread
From: Arnd Bergmann @ 2026-11-24 13:41 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Dmitry Torokhov, Arnd Bergmann, Linus Walleij, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, open list:GPIO SUBSYSTEM,
	linux-wireless

On Tue, Nov 24, 2026, at 13:44, Bartosz Golaszewski wrote:
> On Tue, Nov 24, 2026 at 11:53:40AM +0100, Arnd Bergmann wrote:
>> On Tue, Nov 24, 2026, at 02:10, Dmitry Torokhov wrote:
>> > Hi Bartosz,
>> >
>> > On Mon, Nov 23, 2026 at 04:41:32PM +0100, Bartosz Golaszewski wrote:
>> >> Can I apply v7 and provide it to the SH maintainers on an immutable
>> >> branch?
>> >
>> > BTW, I have the soc_button_array rework (converting it to software nodes
>> > and dropping "select GPIOLIB_LEGACY") on an immutable branch based on
>> > v7.4-rc2:
>> >
>> > 	git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git 
>> > ib/7.4-rc2-soc-button-array
>> 
>> Nice to see that this is ready.
>> 
>> > I recommend pulling it into the gpio tree before applying Arnd's work so
>> > that x86 builds with INPUT_SOC_BUTTON_ARRAY enabled no longer pull in
>> > CONFIG_GPIOLIB_LEGACY either.
>> 
>> I don't think the order matters, my patch 1/2 just won't have an
>> effect on configurations that enable INPUT_SOC_BUTTON_ARRAY until your
>> patch is merged.
>>
>
> I'm not following something, the conflict is with the SH tree, isn't it?

I think we were talking about two different issues:

a) the sh/rsk7203 conflict is about the header inclusion: to make it
   build with my patch 2/2, I need to change linux/gpio.h to
   linux/gpio/legacy.h, while Dmitry series tries to change it
   to linux/gpio/consumer.h instead of either. It's not a hard
   problem tbh, just a bit annoying.

b) The INPUT_SOC_BUTTON_ARRAY change has nothing to do with my
   patch 2/2, only with 1/2, as it addresses one of the remaining
   users of the legacy interface. I hadn't realized that Dmitry's
   comment was a reply to your question about a).

        Arnd

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-23 15:41       ` Bartosz Golaszewski
  2026-11-24  1:10         ` Dmitry Torokhov
@ 2026-11-24 13:49         ` Arnd Bergmann
  1 sibling, 0 replies; 13+ messages in thread
From: Arnd Bergmann @ 2026-11-24 13:49 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Arnd Bergmann, Linus Walleij, Dmitry Torokhov, Johannes Berg,
	John Paul Adrian Glaubitz, Kent Gibson, Thomas Bogendoerfer,
	linux-kernel, linux-mips, linux-sh, open list:GPIO SUBSYSTEM,
	linux-wireless

On Mon, Nov 23, 2026, at 16:41, Bartosz Golaszewski wrote:
> On Mon, Nov 23, 2026 at 04:24:49PM +0100, Arnd Bergmann wrote:
>> On Mon, Nov 23, 2026, at 16:08, Bartosz Golaszewski wrote:
>> > On Mon, Nov 23, 2026 at 03:59:24PM +0100, Bartosz Golaszewski wrote:
>> >> On Mon, Nov 23, 2026 at 09:57:21AM +0100, Arnd Bergmann wrote:
>> >> > 
>> >> > This was planned for 7.3 originally[1], but kept conflicting with
>> >> > ongoing cleanups for the broken rsk7203 board. I've skipped the
>> >> > oneline rsk change now, which will be fixed properly by Dmitry's
>> >> > patch [2].
>> >> 
>> > Sashiko is right:
>> >
>> >   CC      arch/sh/boards/mach-rsk/devices-rsk7203.o
>> > arch/sh/boards/mach-rsk/devices-rsk7203.c: In function 
>> > ‘rsk7203_devices_setup’:
>> > arch/sh/boards/mach-rsk/devices-rsk7203.c:127:9: error: implicit 
>> > declaration of function ‘gpio_request’; did you mean ‘symbol_request’? 
>> > [-Wimplicit-function-declaration]
>> >   127 |         gpio_request(GPIO_FN_TXD0, NULL);
>> >       |         ^~~~~~~~~~~~
>> >       |         symbol_request
>> 
>> Yes, this just seemed the easiest way out to avoid clashing with Dmitry's
>> patches again. If you want the version that doesn't break the build,
>> you can still apply v7 [1], but that likely means his series has go
>> through another revision to undo my change and remove the linux/gpio/legacy.h
>> inclusion.
>
> Can I apply v7 and provide it to the SH maintainers on an immutable
> branch?

I think that would add even more complication. I'd suggest you take
just the first patch now to get that out of the way, and I'll once
more split up the remaining patch 2 in the hope of shrinking it
to the point of losing the dependencies for 7.6.

     Arnd

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: (subset) [PATCH 0/2 v8] gpiolib: finish the legacy cleanup
  2026-11-23  8:57 [PATCH 0/2 v8] gpiolib: finish the legacy cleanup Arnd Bergmann
                   ` (2 preceding siblings ...)
  2026-11-23 14:59 ` [PATCH 0/2 v8] gpiolib: finish the legacy cleanup Bartosz Golaszewski
@ 2026-11-24 13:59 ` Bartosz Golaszewski
  3 siblings, 0 replies; 13+ messages in thread
From: Bartosz Golaszewski @ 2026-11-24 13:59 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Arnd Bergmann
  Cc: Bartosz Golaszewski, Arnd Bergmann, Dmitry Torokhov,
	Johannes Berg, John Paul Adrian Glaubitz, Kent Gibson,
	Thomas Bogendoerfer, linux-kernel, linux-mips, linux-sh,
	linux-gpio, linux-wireless


On Mon, 23 Nov 2026 09:57:21 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> These two patches are left from my cleanup series, finishing off the
> work to turn off CONFIG_GPIOLIB_LEGACY by default, and removing the
> include/linux/gpio.h header.
> 
> This was planned for 7.3 originally[1], but kept conflicting with
> ongoing cleanups for the broken rsk7203 board. I've skipped the
> oneline rsk change now, which will be fixed properly by Dmitry's
> patch [2].
> 
> [...]

Applied, thanks!

[1/2] gpiolib: turn off legacy interface by default
      https://git.kernel.org/brgl/c/b52fb554b36ba37f86a591d0d27dc45fc5628920

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-11-24 13:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  8:57 [PATCH 0/2 v8] gpiolib: finish the legacy cleanup Arnd Bergmann
2026-11-23  8:57 ` [PATCH 1/2] [v8] gpiolib: turn off legacy interface by default Arnd Bergmann
2026-11-23  8:57 ` [PATCH 2/2] [v8] gpiolib: remove linux/gpio.h Arnd Bergmann
2026-11-23 14:59 ` [PATCH 0/2 v8] gpiolib: finish the legacy cleanup Bartosz Golaszewski
2026-11-23 15:08   ` Bartosz Golaszewski
2026-11-23 15:24     ` Arnd Bergmann
2026-11-23 15:41       ` Bartosz Golaszewski
2026-11-24  1:10         ` Dmitry Torokhov
2026-11-24 10:53           ` Arnd Bergmann
2026-11-24 12:44             ` Bartosz Golaszewski
2026-11-24 13:41               ` Arnd Bergmann
2026-11-24 13:49         ` Arnd Bergmann
2026-11-24 13:59 ` (subset) " Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®