gpiolib cleanups
Subsystems (29)
cover gpiolib cleanups
From: Arnd Bergmann <[email protected]>
These are some older patches I did last year, rebased to linux-next-20230125.
The main goal is to remove some of the legacy bits of the gpiolib interfaces, where the corner cases are easily avoided or replaced with gpio descriptor based interfaces.
We seem to all be touching the same functions at the moement, let me know if this conflicts with your work.
Arnd
Arnd Bergmann (8):
gpiolib: remove empty asm/gpio.h files
gpiolib: coldfire: remove custom asm/gpio.h
gpiolib: remove asm-generic/gpio.h
gpiolib: remove gpio_set_debounce
gpiolib: remove legacy gpio_export
gpiolib: split linux/gpio/driver.h out of linux/gpio.h
gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h
gpiolib: move of_gpio_flags into gpiolib-of.c
Documentation/admin-guide/gpio/sysfs.rst | 2 +- Documentation/driver-api/gpio/legacy.rst | 23 --- .../zh_CN/driver-api/gpio/legacy.rst | 20 --- Documentation/translations/zh_TW/gpio.txt | 18 --- MAINTAINERS | 1 - arch/arm/Kconfig | 1 - arch/arm/include/asm/gpio.h | 21 --- arch/arm/mach-omap1/irq.c | 1 + arch/arm/mach-omap2/pdata-quirks.c | 9 +- arch/arm/mach-orion5x/board-rd88f5182.c | 1 + arch/arm/mach-s3c/s3c64xx.c | 1 + arch/arm/mach-sa1100/assabet.c | 1 + arch/arm/plat-orion/gpio.c | 1 + arch/m68k/Kconfig.cpu | 1 - arch/m68k/include/asm/gpio.h | 95 ----------- arch/m68k/include/asm/mcfgpio.h | 2 +- arch/powerpc/platforms/44x/Kconfig | 1 + arch/powerpc/platforms/4xx/gpio.c | 2 +- arch/powerpc/platforms/8xx/Kconfig | 1 + arch/powerpc/platforms/8xx/cpm1.c | 2 +- arch/powerpc/platforms/Kconfig | 2 + arch/powerpc/sysdev/cpm_common.c | 2 +- arch/sh/Kconfig | 1 - arch/sh/boards/board-magicpanelr2.c | 1 + arch/sh/boards/mach-ap325rxa/setup.c | 7 +- arch/sh/include/asm/gpio.h | 45 ------ drivers/gpio/Kconfig | 19 ++- drivers/gpio/TODO | 15 +- drivers/gpio/gpio-altera.c | 2 +- drivers/gpio/gpio-davinci.c | 3 +- drivers/gpio/gpio-mm-lantiq.c | 2 +- drivers/gpio/gpio-mpc5200.c | 2 +- drivers/gpio/gpiolib-of.c | 18 +++ drivers/gpio/gpiolib-sysfs.c | 4 +- drivers/input/touchscreen/ads7846.c | 24 +-- drivers/media/pci/sta2x11/sta2x11_vip.c | 10 +- drivers/net/ieee802154/ca8210.c | 3 +- .../broadcom/brcm80211/brcmsmac/led.c | 1 + drivers/pinctrl/core.c | 2 +- drivers/soc/fsl/qe/gpio.c | 2 +- include/asm-generic/gpio.h | 147 ------------------ include/linux/gpio.h | 93 ++++++----- include/linux/gpio/legacy-of-mm-gpiochip.h | 36 +++++ include/linux/mfd/ucb1x00.h | 1 + include/linux/of_gpio.h | 36 ----- 45 files changed, 186 insertions(+), 496 deletions(-) delete mode 100644 arch/arm/include/asm/gpio.h delete mode 100644 arch/m68k/include/asm/gpio.h delete mode 100644 arch/sh/include/asm/gpio.h delete mode 100644 include/asm-generic/gpio.h create mode 100644 include/linux/gpio/legacy-of-mm-gpiochip.h
Signature · 1 line
2.39.0
PATCH 1/8 gpiolib: remove empty asm/gpio.h files
From: Arnd Bergmann <[email protected]>
The arm and sh versions of this file are identical to the generic versions and can just be removed.
The drivers that actually use the sh3 specific version also include cpu/gpio.h directly, with the exception of magicpanelr2, which is easily fixed. This leaves coldfire as the only gpio driver that needs something custom for gpiolib.
--- arch/arm/Kconfig | 1 - arch/arm/include/asm/gpio.h | 21 -------------- arch/sh/Kconfig | 1 - arch/sh/boards/board-magicpanelr2.c | 1 + arch/sh/include/asm/gpio.h | 45 ----------------------------- 5 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 arch/arm/include/asm/gpio.h delete mode 100644 arch/sh/include/asm/gpio.h
arch/arm/Kconfig +0 -1
@@ -24,7 +24,6 @@ config ARM select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_TEARDOWN_DMA_OPS if MMU select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST - select ARCH_HAVE_CUSTOM_GPIO_H select ARCH_HAVE_NMI_SAFE_CMPXCHG if CPU_LDREX select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_KEEP_MEMBLOCK
arch/arm/include/asm/gpio.h deleted +0 -21
@@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ARCH_ARM_GPIO_H -#define _ARCH_ARM_GPIO_H - -#include <asm-generic/gpio.h> - -/* The trivial gpiolib dispatchers */ -#define gpio_get_value __gpio_get_value -#define gpio_set_value __gpio_set_value -#define gpio_cansleep __gpio_cansleep - -/* -* Provide a default gpio_to_irq() which should satisfy every case. -* However, some platforms want to do this differently, so allow them -* to override it. -*/ -#ifndef gpio_to_irq -#define gpio_to_irq __gpio_to_irq -#endif - -#endif /* _ARCH_ARM_GPIO_H */
arch/sh/Kconfig +0 -1
@@ -4,7 +4,6 @@ config SUPERH select ARCH_32BIT_OFF_T select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM && MMU select ARCH_ENABLE_MEMORY_HOTREMOVE if SPARSEMEM && MMU - select ARCH_HAVE_CUSTOM_GPIO_H select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A) select ARCH_HAS_BINFMT_FLAT if !MMU select ARCH_HAS_CURRENT_STACK_POINTER
arch/sh/boards/board-magicpanelr2.c +1 -0
@@ -21,6 +21,7 @@#include <linux/sh_intc.h> #include <mach/magicpanelr2.h> #include <asm/heartbeat.h> +#include <cpu/gpio.h> #include <cpu/sh7720.h> /* Dummy supplies, where voltage doesn't matter */
arch/sh/include/asm/gpio.h deleted +0 -45
45 lines not on this page · raw message
Signature · 1 line
2.39.0
Re: [PATCH 1/8] gpiolib: remove empty asm/gpio.h files
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The arm and sh versions of this file are identical to the generic versions and can just be removed.
The drivers that actually use the sh3 specific version also include
cpu/gpio.hdirectly, with the exception of magicpanelr2, which is easily fixed. This leaves coldfire as the only gpio driver that needs something custom for gpiolib.
Quoted 4 lines
Reviewed-by Geert Uytterhoeven <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>---
Re: [PATCH 1/8] gpiolib: remove empty asm/gpio.h files
In reply to Arnd BergmannQuoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The arm and sh versions of this file are identical to the generic versions and can just be removed.
Quoted 8 lines
The drivers that actually use the sh3 specific version also include
cpu/gpio.hdirectly, with the exception of magicpanelr2, which is easily fixed. This leaves coldfire as the only gpio driver that needs something custom for gpiolib.Reviewed-by Geert Uytterhoeven <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>
Yours,
Linus Walleij
PATCH 2/8 gpiolib: coldfire: remove custom asm/gpio.h
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
Now that coldfire is the only user of a custom asm/gpio.h, it seems better to remove this as well, and have the same interface everywhere.
For the gpio_get_value()/gpio_set_value()/gpio_to_irq(), gpio_cansleep() functions, the custom version is only a micro-optimization to inline the function for constant GPIO numbers. However, in the coldfire defconfigs, I was unable to find a single instance where this micro-optimization was even used, and according to Geert the only user appears to be the QSPI chip that is disabled everywhere.
The custom gpio_request_one() function is even less useful, as it is guarded by an #ifdef that is never true.
--- arch/m68k/Kconfig.cpu | 1 - arch/m68k/include/asm/gpio.h | 95 ------------------------------------ drivers/gpio/Kconfig | 8 --- include/linux/gpio.h | 7 --- 4 files changed, 111 deletions(-) delete mode 100644 arch/m68k/include/asm/gpio.h
arch/m68k/Kconfig.cpu +0 -1
@@ -24,7 +24,6 @@ config M68KCLASSIC config COLDFIRE bool "Coldfire CPU family support" - select ARCH_HAVE_CUSTOM_GPIO_H select CPU_HAS_NO_BITFIELDS select CPU_HAS_NO_CAS select CPU_HAS_NO_MULDIV64
arch/m68k/include/asm/gpio.h deleted +0 -95
95 lines not on this page · raw message
drivers/gpio/Kconfig +0 -8
@@ -3,14 +3,6 @@ # GPIO infrastructure and drivers # -config ARCH_HAVE_CUSTOM_GPIO_H - bool - help - Selecting this config option from the architecture Kconfig allows - the architecture to provide a custom asm/gpio.h implementation - overriding the default implementations. New uses of this are - strongly discouraged. - menuconfig GPIOLIB bool "GPIO Support" help
include/linux/gpio.h +0 -7
@@ -54,11 +54,6 @@ struct gpio { };#ifdef CONFIG_GPIOLIB - -#ifdef CONFIG_ARCH_HAVE_CUSTOM_GPIO_H -#include <asm/gpio.h> -#else -#include <asm-generic/gpio.h> static inline int gpio_get_value (unsigned int gpio)
@@ -81,8 +76,6 @@ static inline int gpio_to_irq(unsigned int gpio)return __gpio_to_irq (gpio); } -#endif /* ! CONFIG_ARCH_HAVE_CUSTOM_GPIO_H */ -/* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */ struct device ;
Signature · 1 line
2.39.0
Re: [PATCH 2/8] gpiolib: coldfire: remove custom asm/gpio.h
Quoted 13 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Now that coldfire is the only user of a custom
asm/gpio.h, it seems better to remove this as well, and have the same interface everywhere.For the gpio_get_value()/gpio_set_value()/gpio_to_irq(),
gpio_cansleep()functions, the custom version is only a micro-optimization to inline the function for constant GPIO numbers. However, in the coldfire defconfigs, I was unable to find a single instance where this micro-optimization was even used, and according to Geert the only user appears to be the QSPI chip that is disabled everywhere.
Quoted 7 lines
The custom
gpio_request_one()function is even less useful, as it is guarded by an #ifdef that is never true.Reviewed-by Geert Uytterhoeven <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>---
Re: [PATCH 2/8] gpiolib: coldfire: remove custom asm/gpio.h
In reply to Arnd BergmannQuoted 12 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Now that coldfire is the only user of a custom
asm/gpio.h, it seems better to remove this as well, and have the same interface everywhere.For the gpio_get_value()/gpio_set_value()/gpio_to_irq(),
gpio_cansleep()functions, the custom version is only a micro-optimization to inline the function for constant GPIO numbers. However, in the coldfire defconfigs, I was unable to find a single instance where this micro-optimization was even used, and according to Geert the only user appears to be the QSPI chip that is disabled everywhere.
Quoted 6 lines
The custom
gpio_request_one()function is even less useful, as it is guarded by an #ifdef that is never true.Reviewed-by Geert Uytterhoeven <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>
Yours,
Linus Walleij
PATCH 3/8 gpiolib: remove asm-generic/gpio.h
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
The asm-generic/gpio.h file is now always included when using gpiolib, so just move its contents into linux/gpio.h with a few minor simplifications.
--- MAINTAINERS | 1 - arch/m68k/include/asm/mcfgpio.h | 2 +- drivers/gpio/gpio-davinci.c | 3 +- drivers/pinctrl/core.c | 2 +- include/asm-generic/gpio.h | 147 -------------------------------- include/linux/gpio.h | 93 ++++++++++++++++++-- 6 files changed, 87 insertions(+), 161 deletions(-) delete mode 100644 include/asm-generic/gpio.h
MAINTAINERS +0 -1
@@ -8729,7 +8729,6 @@ F: Documentation/admin-guide/gpio/ F: Documentation/devicetree/bindings/gpio/ F: Documentation/driver-api/gpio/ F: drivers/gpio/ -F: include/asm-generic/gpio.h F: include/dt-bindings/gpio/ F: include/linux/gpio.h F: include/linux/gpio/
arch/m68k/include/asm/mcfgpio.h +1 -1
@@ -9,7 +9,7 @@#define mcfgpio_h#ifdef CONFIG_GPIOLIB -#include <asm-generic/gpio.h> +#include <linux/gpio.h> #else int __mcfgpio_get_value (unsigned gpio);
drivers/gpio/gpio-davinci.c +1 -2
@@ -7,6 +7,7 @@*/ #include <linux/gpio/driver.h> +#include <linux/gpio.h> #include <linux/errno.h> #include <linux/kernel.h> #include <linux/clk.h>
@@ -24,8 +25,6 @@#include <linux/spinlock.h> #include <linux/pm_runtime.h> -#include <asm-generic/gpio.h> -#define MAX_REGS_BANKS 5#define MAX_INT_PER_BANK 32
drivers/pinctrl/core.c +1 -1
@@ -30,7 +30,7 @@#ifdef CONFIG_GPIOLIB #include "../gpio/gpiolib.h" -#include <asm-generic/gpio.h> +#include <linux/gpio.h> #endif #include "core.h"
include/asm-generic/gpio.h deleted +0 -147
147 lines not on this page · raw message
include/linux/gpio.h +84 -9
110 lines not on this page · raw message
Signature · 1 line
2.39.0
Re: [PATCH 3/8] gpiolib: remove asm-generic/gpio.h
Quoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The
asm-generic/gpio.hfile is now always included when using gpiolib, so just move its contents intolinux/gpio.hwith a few minor simplifications.
Thanks! Very appreciated, my comments below.
...
drivers/gpio/gpio-davinci.c line 12
Quoted 9 lines
drivers/gpio/gpio-davinci.c +1
-0@@ -7,6 +7,7 @@*/ #include <linux/gpio/driver.h> +#include <linux/gpio.h>
I believe the driver does not need this.
I have briefly checked all gpio_ places in it and found nothing that requires this inclusion to be done.
drivers/gpio/gpio-davinci.c line 29
Quoted 11 lines
drivers/gpio/gpio-davinci.c +0
-0#include <linux/errno.h> #include <
linux/kernel.h>
#include <linux/clk.h>drivers/gpio/gpio-davinci.c +0
-2@@ -24,8 +25,6 @@#include <linux/spinlock.h> #include <linux/pm_runtime.h> -#include <asm-generic/gpio.h> -#define MAX_REGS_BANKS 5#define MAX_INT_PER_BANK 32
Thanks for this, that was a PITA!
...
drivers/pinctrl/core.c line 33
Quoted 8 lines
drivers/pinctrl/core.c +1
-1@@ -30,7 +30,7 @@#ifdef CONFIG_GPIOLIB #include "../gpio/gpiolib.h" -#include <asm-generic/gpio.h> +#include <linux/gpio.h>
Can we actually swap them?
#include <linux/gpio.h>
#include "../gpio/gpiolib.h"
But hold on, why do we even need gpio.h here?!
Quoted 3 lines
drivers/pinctrl/core.c +0
-0#endif #include "core.h"
...
include/linux/gpio.h struct gpio { · line 60
Quoted 11 lines
include/linux/gpio.h +3
-1@@ -54,26 +54,101 @@ struct gpio { };#ifdef CONFIG_GPIOLIB -#include <asm-generic/gpio.h> +#include <linux/compiler.h> +#include <linux/gpio/driver.h> +#include <linux/gpio/consumer.h>
#include <linux/gpio/consumer.h>
#include <linux/gpio/driver.h>
...
include/linux/gpio.h struct gpio { · line 63
Quoted 3 lines
include/linux/gpio.h +3
-0+/* +* "valid" GPIO numbers are nonnegative and may be passed to +* setup routines like gpio_request(). only some valid numbers
While at it, '. only' --> '. Only'.
Quoted 5 lines
include/linux/gpio.h +5
-0+* can successfully be requested and used. +* +* Invalid GPIO numbers are useful for indicating no-such-GPIO in +* platform data and other tables. +*/
...
include/linux/gpio.h struct gpio { · line 92
Quoted 2 lines
include/linux/gpio.h +2
-0+extern int gpio_request (unsigned gpio,const char *label); +extern void gpio_free (unsigned gpio);
While at it, s/extern//.
...
include/linux/gpio.h struct gpio { · line 138
Quoted 3 lines
include/linux/gpio.h +3
-0+extern int gpio_request_one (unsigned gpio,unsigned long flags,const char *label); +extern int gpio_request_array (const struct gpio *array,size_t num); +extern void gpio_free_array (const struct gpio *array,size_t num);
Ditto.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Arnd Bergmann
maintainerRe: [PATCH 3/8] gpiolib: remove asm-generic/gpio.h
Quoted 10 lines · Andy Shevchenko
Quoted 6 lines · Arnd Bergmann
drivers/gpio/gpio-davinci.c +0
-0@@ -7,6 +7,7 @@*/ #include <linux/gpio/driver.h>
Quoted 6 lines
drivers/gpio/gpio-davinci.c line 10
Quoted 1 line
drivers/gpio/gpio-davinci.c +1
-0+#include <linux/gpio.h> I believe the driver does not need this.
I have briefly checked all
gpio_places in it and found nothing that requires this inclusion to be done.
ok
Quoted 10 lines
drivers/gpio/gpio-davinci.c line 13
Quoted 4 lines
drivers/gpio/gpio-davinci.c +1
-1#ifdef CONFIG_GPIOLIB #include "../gpio/gpiolib.h" -#include <asm-generic/gpio.h> +#include <linux/gpio.h> Can we actually swap them?
#include <
linux/gpio.h>
#include "../gpio/gpiolib.h"
Quoted 7 lines
But hold on, why do we even need
gpio.hhere?!Quoted 3 lines
#endif
#include "
core.h"...
I probably did all the above in response to build regressions, but I'll try to change them based on your suggestion and see what happens.
Quoted 9 lines
Quoted 8 lines
include/linux/gpio.h +1
-1@@ -54,26 +54,101 @@ struct gpio { };#ifdef CONFIG_GPIOLIB -#include <asm-generic/gpio.h> +#include <linux/compiler.h>
Quoted 6 lines
include/linux/gpio.h struct gpio { · line 59
Quoted 2 lines
include/linux/gpio.h +2
-0+#include <linux/gpio/driver.h> +#include <linux/gpio/consumer.h> #include <
linux/gpio/consumer.h>
#include <linux/gpio/driver.h>
Done
Quoted 5 lines
include/linux/gpio.h struct gpio { · line 63
Quoted 3 lines
include/linux/gpio.h +3
-0+/* +* "valid" GPIO numbers are nonnegative and may be passed to +* setup routines like gpio_request(). only some valid numbers While at it, '. only' --> '. Only'.
Done
Quoted 8 lines
Quoted 5 lines
include/linux/gpio.h +5
-0+* can successfully be requested and used. +* +* Invalid GPIO numbers are useful for indicating no-such-GPIO in +* platform data and other tables. +*/ ...
Quoted 8 lines
include/linux/gpio.h struct gpio { · line 92
Quoted 2 lines
include/linux/gpio.h +2
-0+extern int gpio_request (unsigned gpio,const char *label); +extern void gpio_free (unsigned gpio);While at it, s/extern//.
include/linux/gpio.h struct gpio { · line 138
Quoted 3 lines
include/linux/gpio.h +3
-0+extern int gpio_request_one (unsigned gpio,unsigned long flags,const char *label); +extern int gpio_request_array (const struct gpio *array,size_t num); +extern void gpio_free_array (const struct gpio *array,size_t num);
Done
Thanks for the review,
Arnd
Re: [PATCH 3/8] gpiolib: remove asm-generic/gpio.h
In reply to Arnd BergmannQuoted 7 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The
asm-generic/gpio.hfile is now always included when using gpiolib, so just move its contents intolinux/gpio.hwith a few minor simplifications.Signed-off-by Arnd Bergmann <[email protected]>
After fixing the nits pointed out by Andy:
I'm very happy to see this go, maybe you can send a pull request to Bartosz with these patches and also pull the same to the arch tree if need be?
Yours,
Linus Walleij
Arnd Bergmann
maintainerRe: [PATCH 3/8] gpiolib: remove asm-generic/gpio.h
Quoted 8 lines · Linus Walleij
Quoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The
asm-generic/gpio.hfile is now always included when using gpiolib, so just move its contents intolinux/gpio.hwith a few minor simplifications.
Quoted 8 lines
Quoted 1 line
Signed-off-by Arnd Bergmann <[email protected]>After fixing the nits pointed out by Andy:
Reviewed-by Linus Walleij <[email protected]>I'm very happy to see this go, maybe you can send a pull request to Bartosz with these patches and also pull the same to the arch tree if need be?
I already sent a v2 series that should address all the comments. I don't expect any conflicts against either the soc tree or the asm-generic tree, so Bartosz can just pick it up from there.
If it helps, I'm also happy to send a pull request of course.
Arnd
PATCH 4/8 gpiolib: remove gpio_set_debounce
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
gpio_set_debounce() only has a single user, which is trivially converted to gpiod_set_debounce().
--- Documentation/driver-api/gpio/legacy.rst | 2 -- drivers/input/touchscreen/ads7846.c | 24 +++++++++++++----------- include/linux/gpio.h | 22 ---------------------- 3 files changed, 13 insertions(+), 35 deletions(-)
Documentation/driver-api/gpio/legacy.rst +0 -2
@@ -238,8 +238,6 @@ setup or driver probe/teardown code, so this is an easy constraint.):: ## gpio_free_array() gpio_free() - gpio_set_debounce() - Claiming and Releasing GPIOs
drivers/input/touchscreen/ads7846.c +13 -11
@@ -27,6 +27,7 @@#include <linux/of.h> #include <linux/of_gpio.h> #include <linux/of_device.h> +#include <linux/gpio/consumer.h> #include <linux/gpio.h> #include <linux/spi/spi.h> #include <linux/spi/ads7846.h>
@@ -139,7 +140,7 @@ struct ads7846 {int (*filter)(void *data,int data_idx,int *val);void *filter_data;int (*get_pendown_state)(void ); -int gpio_pendown; +struct gpio_desc *gpio_pendown;void (*wait_for_sync)(void ); };
@@ -222,7 +223,7 @@ static int get_pendown_state(struct ads7846 *ts)if (ts->get_pendown_state)return ts->get_pendown_state (); -return !gpio_get_value (ts->gpio_pendown); +return !gpiod_get_value (ts->gpio_pendown); }static void ads7846_report_pen_up (struct ads7846 *ts)
@@ -1005,7 +1006,6 @@ static int ads7846_setup_pendown(struct spi_device *spi,if (pdata->get_pendown_state) { ts->get_pendown_state = pdata->get_pendown_state; }else if (gpio_is_valid (pdata->gpio_pendown)) { - err =devm_gpio_request_one (&spi->dev, pdata->gpio_pendown,GPIOF_IN ,"ads7846_pendown" );if (err) {
@@ -1015,15 +1015,17 @@ static int ads7846_setup_pendown(struct spi_device *spi,return err; } - ts->gpio_pendown = pdata->gpio_pendown; - -if (pdata->gpio_pendown_debounce) -gpio_set_debounce (pdata->gpio_pendown, - pdata->gpio_pendown_debounce); + ts->gpio_pendown =gpio_to_desc (pdata->gpio_pendown); }else { -dev_err (&spi->dev,"no get_pendown_state nor gpio_pendown?\n" ); -return -EINVAL ; + ts->gpio_pendown =gpiod_get (&spi->dev,"pendown-gpio" ,GPIOD_IN ); +if (IS_ERR (ts->gpio_pendown)) { +dev_err (&spi->dev,"no get_pendown_state nor gpio_pendown?\n" ); +return PTR_ERR (ts->gpio_pendown); + } } +if (pdata->gpio_pendown_debounce) +gpiod_set_debounce (ts->gpio_pendown, + pdata->gpio_pendown_debounce);return 0 ; }
@@ -1192,7 +1194,7 @@ static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev) pdata->wakeup =of_property_read_bool (node,"wakeup-source" ) ||of_property_read_bool (node,"linux,wakeup" ); - pdata->gpio_pendown =of_get_named_gpio (dev->of_node,"pendown-gpio" ,0 ); + pdata->gpio_pendown =-1 ;return pdata; }
include/linux/gpio.h +0 -22
@@ -100,11 +100,6 @@ static inline int gpio_direction_output(unsigned gpio, int value)return gpiod_direction_output_raw (gpio_to_desc (gpio), value); } -static inline int gpio_set_debounce (unsigned gpio,unsigned debounce) -{ -return gpiod_set_debounce (gpio_to_desc (gpio), debounce); -} -static inline int gpio_get_value_cansleep (unsigned gpio) {return gpiod_get_raw_value_cansleep (gpio_to_desc (gpio));
@@ -123,11 +118,6 @@ static inline void gpio_set_value(unsigned gpio, int value)return gpiod_set_raw_value (gpio_to_desc (gpio), value); } -static inline int gpio_cansleep (unsigned gpio) -{ -return gpiod_cansleep (gpio_to_desc (gpio)); -} -static inline int gpio_to_irq (unsigned gpio) {return gpiod_to_irq (gpio_to_desc (gpio));
@@ -215,11 +205,6 @@ static inline int gpio_direction_output(unsigned gpio, int value)return -ENOSYS ; } -static inline int gpio_set_debounce (unsigned gpio,unsigned debounce) -{ -return -ENOSYS ; -} -static inline int gpio_get_value (unsigned gpio) {/* GPIO can never have been requested or set as {in,out}put */
@@ -233,13 +218,6 @@ static inline void gpio_set_value(unsigned gpio, int value)WARN_ON (1 ); } -static inline int gpio_cansleep (unsigned gpio) -{ -/* GPIO can never have been requested or set as {in,out}put */ -WARN_ON (1 ); -return 0 ; -} -static inline int gpio_get_value_cansleep (unsigned gpio) {/* GPIO can never have been requested or set as {in,out}put */
Signature · 1 line
2.39.0
Re: [PATCH 4/8] gpiolib: remove gpio_set_debounce
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
gpio_set_debounce()only has a single user, which is trivially converted togpiod_set_debounce().
Also need to mention the gpio_cansleep() removal.
P.S. Fun fact that I was yesterday thinking about the pretty much the same change, except intrusive conversion of the user.
...
Quoted 1 line
Documentation/driver-api/gpio/legacy.rst | 2 --
Documentation/translations/zh_CN/driver-api/gpio/legacy.rst:222: gpio_set_debounce()Documentation/translations/zh_TW/gpio.txt:229: gpio_set_debounce()
Quoted 2 lines
drivers/input/touchscreen/ads7846.c | 24 +++++++++++++----------- include/linux/gpio.h | 22 ----------------------
...
Quoted 1 line
#include <
linux/of_gpio.h>
Do we need this?
Quoted 4 lines
#include <
linux/of_device.h>
+#include <linux/gpio/consumer.h>#include <
linux/gpio.h>
And this?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Arnd Bergmann
maintainerRe: [PATCH 4/8] gpiolib: remove gpio_set_debounce
Quoted 7 lines · Andy Shevchenko
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
gpio_set_debounce()only has a single user, which is trivially converted togpiod_set_debounce().Also need to mention the
gpio_cansleep()removal.
Indeed, I think that bit got lost in one of the rebases after some of the other functions that I originally removed here are already gone.
I've dropped the gpio_cansleep change for now, we can revisit this later and possibly drop it at the same time as gpio_{get,set}_value_cansleep that are still used in a handful of places that could use gpiod instead.
Quoted 10 lines
P.S. Fun fact that I was yesterday thinking about the pretty much the same change, except intrusive conversion of the user....
Quoted 1 line
Documentation/driver-api/gpio/legacy.rst | 2 --
Documentation/translations/zh_CN/driver-api/gpio/legacy.rst:222:
gpio_set_debounce()Documentation/translations/zh_TW/gpio.txt:229:gpio_set_debounce()
Fixed.
Quoted 8 lines
Quoted 2 lines
drivers/input/touchscreen/ads7846.c | 24 +++++++++++++----------- include/linux/gpio.h | 22 ----------------------...
Quoted 1 line
#include <
linux/of_gpio.h>Do we need this?
Dropped now.
Quoted 6 lines
Quoted 4 lines
#include <
linux/of_device.h>
+#include <linux/gpio/consumer.h>#include <
linux/gpio.h>And this?
I think we still need both linux/gpio/consumer.h and linux/gpio.h since there is still a call to devm_gpio_request_one() and gpio_is_valid().
Arnd
Re: [PATCH 4/8] gpiolib: remove gpio_set_debounce
In reply to Arnd BergmannQuoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
gpio_set_debounce()only has a single user, which is trivially converted togpiod_set_debounce().Signed-off-by Arnd Bergmann <[email protected]>
Thanks for shrinking the legacy API surface.
With the fixes pointed out by Andy:
Yours,
Linus Walleij
PATCH 5/8 gpiolib: remove legacy gpio_export
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
There are only a handful of users of gpio_export() and related functions.
As these are just wrappers around the modern gpiod_export() helper, remove the wrappers and open-code the gpio_to_desc in all callers to shrink the legacy API.
--- Documentation/admin-guide/gpio/sysfs.rst | 2 +- Documentation/driver-api/gpio/legacy.rst | 21 --------------- .../zh_CN/driver-api/gpio/legacy.rst | 20 -------------- Documentation/translations/zh_TW/gpio.txt | 18 ------------- arch/arm/mach-omap2/pdata-quirks.c | 9 ++++--- arch/sh/boards/mach-ap325rxa/setup.c | 7 ++--- drivers/gpio/gpiolib-sysfs.c | 4 +-- drivers/media/pci/sta2x11/sta2x11_vip.c | 10 ++++--- drivers/net/ieee802154/ca8210.c | 3 ++- include/linux/gpio.h | 27 ------------------- 10 files changed, 21 insertions(+), 100 deletions(-)
Documentation/admin-guide/gpio/sysfs.rst +1 -1
@@ -145,7 +145,7 @@ requested using gpio_request():: /* export the GPIO to userspace */ int gpiod_export(struct gpio_desc *desc, bool direction_may_change); - /* reverse gpio_export() */ + /* reverse gpiod_export() */ void gpiod_unexport(struct gpio_desc *desc); /* create a sysfs link to an exported GPIO node */
Documentation/driver-api/gpio/legacy.rst +0 -21
@@ -714,27 +714,6 @@ gpiochip nodes (possibly in conjunction with schematics) to determine the correct GPIO number to use for a given signal. -Exporting from Kernel code --------------------------- -Kernel code can explicitly manage exports of GPIOs which have already been -requested using gpio_request():: - - /* export the GPIO to userspace */ - int gpio_export(unsigned gpio, bool direction_may_change); - - /* reverse gpio_export() */ - void gpio_unexport(); - -After a kernel driver requests a GPIO, it may only be made available in -the sysfs interface by gpio_export(). The driver can control whether the -signal direction may change. This helps drivers prevent userspace code -from accidentally clobbering important system state. - -This explicit exporting can help with debugging (by making some kinds -of experiments easier), or can provide an always-there interface that's -suitable for documenting as part of a board support package. - - API Reference =============
Documentation/translations/zh_CN/driver-api/gpio/legacy.rst +0 -20
@@ -654,26 +654,6 @@ GPIO 控制器的路径类似 /sys/class/gpio/gpiochip42/ (对于从#42 GPIO 确定给定信号所用的 GPIO 编号。 -从内核代码中导出 ----------------- - -内核代码可以明确地管理那些已通过 gpio_request()申请的 GPIO 的导出:: - - /* 导出 GPIO 到用户空间 */ - int gpio_export(unsigned gpio, bool direction_may_change); - - /* gpio_export()的逆操作 */ - void gpio_unexport(); - -在一个内核驱动申请一个 GPIO 之后,它可以通过 gpio_export()使其在 sysfs -接口中可见。该驱动可以控制信号方向是否可修改。这有助于防止用户空间代码无意间 -破坏重要的系统状态。 - -这个明确的导出有助于(通过使某些实验更容易来)调试,也可以提供一个始终存在的接口, -与文档配合作为板级支持包的一部分。 - - -API参考 ======= 本节中列出的函数已被废弃。在新的代码中应该使用基于GPIO描述符的API。
Documentation/translations/zh_TW/gpio.txt +0 -18
@@ -615,21 +615,3 @@ GPIO 控制器的路徑類似 /sys/class/gpio/gpiochip42/ (對於從#42 GPIO 固定的,例如在擴展卡上的 GPIO會根據所使用的主板或所在堆疊架構中其他的板子而 有所不同。在這種情況下,你可能需要使用 gpiochip 節點(儘可能地結合電路圖)來 確定給定信號所用的 GPIO 編號。 - - -從內核代碼中導出 -------------- -內核代碼可以明確地管理那些已通過 gpio_request()申請的 GPIO 的導出: - - /* 導出 GPIO 到用戶空間 */ - int gpio_export(unsigned gpio, bool direction_may_change); - - /* gpio_export()的逆操作 */ - void gpio_unexport(); - -在一個內核驅動申請一個 GPIO 之後,它可以通過 gpio_export()使其在 sysfs -接口中可見。該驅動可以控制信號方向是否可修改。這有助於防止用戶空間代碼無意間 -破壞重要的系統狀態。 - -這個明確的導出有助於(通過使某些實驗更容易來)調試,也可以提供一個始終存在的接口, -與文檔配合作爲板級支持包的一部分。
arch/arm/mach-omap2/pdata-quirks.c +5 -4
@@ -6,6 +6,7 @@*/ #include <linux/clk.h> #include <linux/davinci_emac.h> +#include <linux/gpio/consumer.h> #include <linux/gpio.h> #include <linux/init.h> #include <linux/kernel.h>
@@ -108,7 +109,7 @@ static int omap3_sbc_t3730_twl_callback(struct device *dev,if (res)return res; -gpio_export (gpio,0 ); +gpiod_export (gpio_to_desc (gpio),0 );return 0 ; }
@@ -123,7 +124,7 @@ static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)return ; } -gpio_export (gpio,0 ); +gpiod_export (gpio_to_desc (gpio),0 );udelay (10 );gpio_set_value (gpio,1 );
@@ -200,8 +201,8 @@ static void __init omap3_sbc_t3517_wifi_init(void)return ; } -gpio_export (cm_t3517_wlan_gpios[0 ].gpio,0 ); -gpio_export (cm_t3517_wlan_gpios[1 ].gpio,0 ); +gpiod_export (gpio_to_desc (cm_t3517_wlan_gpios[0 ].gpio),0 ); +gpiod_export (gpio_to_desc (cm_t3517_wlan_gpios[1 ].gpio),0 );msleep (100 );gpio_set_value (cm_t3517_wlan_gpios[1 ].gpio,0 );
arch/sh/boards/mach-ap325rxa/setup.c +4 -3
@@ -18,6 +18,7 @@#include <linux/delay.h> #include <linux/device.h> #include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/machine.h> #include <linux/i2c.h> #include <linux/init.h>
@@ -411,16 +412,16 @@ static int __init ap325rxa_devices_setup(void)/* LD3 and LD4 LEDs */ gpio_request (GPIO_PTX5 ,NULL );/* RUN */ gpio_direction_output (GPIO_PTX5 ,1 ); -gpio_export (GPIO_PTX5 ,0 ); +gpiod_export (gpio_to_desc (GPIO_PTX5 ),0 );gpio_request (GPIO_PTX4 ,NULL );/* INDICATOR */ gpio_direction_output (GPIO_PTX4 ,0 ); -gpio_export (GPIO_PTX4 ,0 ); +gpiod_export (gpio_to_desc (GPIO_PTX4 ),0 );/* SW1 input */ gpio_request (GPIO_PTF7 ,NULL );/* MODE */ gpio_direction_input (GPIO_PTF7 ); -gpio_export (GPIO_PTF7 ,0 ); +gpiod_export (gpio_to_desc (GPIO_PTF7 ),0 );/* LCDC */ gpio_request (GPIO_FN_LCDD15 ,NULL );
drivers/gpio/gpiolib-sysfs.c +2 -2
@@ -491,7 +491,7 @@ static ssize_t unexport_store(struct class *class, goto done; desc =gpio_to_desc (gpio); -/* reject bogus commands (gpio_unexport ignores them) */ +/* reject bogus commands (gpiod_unexport ignores them) */ if (!desc) {pr_warn ("%s: invalid GPIO %ld\n" , __func__, gpio);return -EINVAL ;
@@ -790,7 +790,7 @@ static int __init gpiolib_sysfs_init(void)* early (e.g. before the class_register above was called). * * We run before arch_initcall() so chip->dev nodes can have -* registered, and so arch_initcall() can always gpio_export(). +* registered, and so arch_initcall() can always gpiod_export(). */ spin_lock_irqsave (&gpio_lock, flags);list_for_each_entry (gdev, &gpio_devices, list) {
drivers/media/pci/sta2x11/sta2x11_vip.c +7 -3
@@ -18,6 +18,7 @@#include <linux/pci.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/gpio/consumer.h> #include <linux/gpio.h> #include <linux/i2c.h> #include <linux/delay.h>
@@ -889,6 +890,7 @@ static int sta2x11_vip_init_controls(struct sta2x11_vip *vip)static int vip_gpio_reserve (struct device *dev,int pin,int dir,const char *name) { +struct gpio_desc *desc =gpio_to_desc (pin);int ret = -ENODEV ;if (!gpio_is_valid (pin))
@@ -900,7 +902,7 @@ static int vip_gpio_reserve(struct device *dev, int pin, int dir,return ret; } - ret =gpio_direction_output (pin, dir); + ret =gpiod_direction_output (desc, dir);if (ret) {dev_err (dev,"Failed to set direction for pin %d (%s)\n" , pin, name);
@@ -908,7 +910,7 @@ static int vip_gpio_reserve(struct device *dev, int pin, int dir,return ret; } - ret =gpio_export (pin, false); + ret =gpiod_export (desc, false);if (ret) {dev_err (dev,"Failed to export pin %d (%s)\n" , pin, name);gpio_free (pin);
@@ -928,8 +930,10 @@ static int vip_gpio_reserve(struct device *dev, int pin, int dir,static void vip_gpio_release (struct device *dev,int pin,const char *name) {if (gpio_is_valid (pin)) { +struct gpio_desc *desc =gpio_to_desc (pin); +dev_dbg (dev,"releasing pin %d (%s)\n" , pin, name); -gpio_unexport (pin); +gpiod_unexport (desc);gpio_free (pin); } }
drivers/net/ieee802154/ca8210.c +2 -1
@@ -51,6 +51,7 @@#include <linux/clk-provider.h> #include <linux/debugfs.h> #include <linux/delay.h> +#include <linux/gpio/consumer.h> #include <linux/gpio.h> #include <linux/ieee802154.h> #include <linux/io.h>
@@ -2853,7 +2854,7 @@ static int ca8210_interrupt_init(struct spi_device *spi) );if (ret) {dev_crit (&spi->dev,"request_irq %d failed\n" , pdata->irq_id); -gpio_unexport (pdata->gpio_irq); +gpiod_unexport (gpio_to_desc (pdata->gpio_irq));gpio_free (pdata->gpio_irq); }
include/linux/gpio.h +0 -27
@@ -127,20 +127,6 @@ extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *labeextern int gpio_request_array (const struct gpio *array,size_t num);extern void gpio_free_array (const struct gpio *array,size_t num); -/* -* A sysfs interface can be exported by individual drivers if they want, -* but more typically is configured entirely from userspace. -*/ -static inline int gpio_export (unsigned gpio,bool direction_may_change) -{ -return gpiod_export (gpio_to_desc (gpio), direction_may_change); -} - -static inline void gpio_unexport (unsigned gpio) -{ -gpiod_unexport (gpio_to_desc (gpio)); -} -/* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */ struct device ;
@@ -231,19 +217,6 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)WARN_ON (1 ); } -static inline int gpio_export (unsigned gpio,bool direction_may_change) -{ -/* GPIO can never have been requested or set as {in,out}put */ -WARN_ON (1 ); -return -EINVAL ; -} - -static inline void gpio_unexport (unsigned gpio) -{ -/* GPIO can never have been exported */ -WARN_ON (1 ); -} -static inline int gpio_to_irq (unsigned gpio) {/* GPIO can never have been requested or set as input */
Signature · 1 line
2.39.0
Re: [PATCH 5/8] gpiolib: remove legacy gpio_export
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There are only a handful of users of
gpio_export()and related functions.As these are just wrappers around the modern
gpiod_export()helper, remove the wrappers and open-code thegpio_to_descin all callers to shrink the legacy API.
A couple of comments below, after addressing:
Quoted 78 lines
Signed-off-by Arnd Bergmann <[email protected]>--- Documentation/admin-guide/gpio/sysfs.rst | 2 +- Documentation/driver-api/gpio/legacy.rst | 21 --------------- .../zh_CN/driver-api/gpio/legacy.rst | 20 -------------- Documentation/translations/zh_TW/gpio.txt | 18 ------------- arch/arm/mach-omap2/pdata-quirks.c | 9 ++++--- arch/sh/boards/mach-ap325rxa/setup.c | 7 ++--- drivers/gpio/gpiolib-sysfs.c | 4 +-- drivers/media/pci/sta2x11/sta2x11_vip.c | 10 ++++--- drivers/net/ieee802154/ca8210.c | 3 ++- include/linux/gpio.h | 27 ------------------- 10 files changed, 21 insertions(+), 100 deletions(-)Documentation/admin-guide/gpio/sysfs.rst +1
-1@@ -145,7 +145,7 @@ requested using gpio_request():: /* export the GPIO to userspace */ int gpiod_export(struct gpio_desc *desc, bool direction_may_change); - /* reverse gpio_export() */ + /* reverse gpiod_export() */ void gpiod_unexport(struct gpio_desc *desc); /* create a sysfs link to an exported GPIO node */Documentation/driver-api/gpio/legacy.rst +0
-21@@ -714,27 +714,6 @@ gpiochip nodes (possibly in conjunction with schematics) to determine the correct GPIO number to use for a given signal. -Exporting from Kernel code --------------------------- -Kernel code can explicitly manage exports of GPIOs which have already been -requested using gpio_request():: - - /* export the GPIO to userspace */ - int gpio_export(unsigned gpio, bool direction_may_change); - - /* reverse gpio_export() */ - void gpio_unexport(); - -After a kernel driver requests a GPIO, it may only be made available in -the sysfs interface by gpio_export(). The driver can control whether the -signal direction may change. This helps drivers prevent userspace code -from accidentally clobbering important system state. - -This explicit exporting can help with debugging (by making some kinds -of experiments easier), or can provide an always-there interface that's -suitable for documenting as part of a board support package. - - API Reference =============Documentation/translations/zh_CN/driver-api/gpio/legacy.rst +0
-11@@ -654,26 +654,6 @@ GPIO 控制器的路径类似 /sys/class/gpio/gpiochip42/ (对于从#42 GPIO 确定给定信号所用的 GPIO 编号。 -从内核代码中导出 ----------------- - -内核代码可以明确地管理那些已通过 gpio_request()申请的 GPIO 的导出:: - - /* 导出 GPIO 到用户空间 */ - int gpio_export(unsigned gpio, bool direction_may_change); - - /* gpio_export()的逆操作 */ - void gpio_unexport(); -
Documentation/translations/zh_CN/driver-api/gpio/legacy.rst GPIO 控制器的路径类似 /sys/class/gpio/gpiochip42/ (对于从#42 GPIO · line 677
Quoted 10 lines
Documentation/translations/zh_CN/driver-api/gpio/legacy.rst +0
-9-在一个内核驱动申请一个 GPIO 之后,它可以通过 gpio_export()使其在 sysfs -接口中可见。该驱动可以控制信号方向是否可修改。这有助于防止用户空间代码无意间 -破坏重要的系统状态。 - -这个明确的导出有助于(通过使某些实验更容易来)调试,也可以提供一个始终存在的接口, -与文档配合作为板级支持包的一部分。 - - -API参考
Mistakenly removed?
Quoted 107 lines
Documentation/translations/zh_CN/driver-api/gpio/legacy.rst +0
-0=======本节中列出的函数已被废弃。在新的代码中应该使用基于GPIO描述符的API。
Documentation/translations/zh_TW/gpio.txt +0
-18@@ -615,21 +615,3 @@ GPIO 控制器的路徑類似 /sys/class/gpio/gpiochip42/ (對於從#42 GPIO 固定的,例如在擴展卡上的 GPIO會根據所使用的主板或所在堆疊架構中其他的板子而 有所不同。在這種情況下,你可能需要使用 gpiochip 節點(儘可能地結合電路圖)來 確定給定信號所用的 GPIO 編號。 - - -從內核代碼中導出 -------------- -內核代碼可以明確地管理那些已通過 gpio_request()申請的 GPIO 的導出: - - /* 導出 GPIO 到用戶空間 */ - int gpio_export(unsigned gpio, bool direction_may_change); - - /* gpio_export()的逆操作 */ - void gpio_unexport(); - -在一個內核驅動申請一個 GPIO 之後,它可以通過 gpio_export()使其在 sysfs -接口中可見。該驅動可以控制信號方向是否可修改。這有助於防止用戶空間代碼無意間 -破壞重要的系統狀態。 - -這個明確的導出有助於(通過使某些實驗更容易來)調試,也可以提供一個始終存在的接口, -與文檔配合作爲板級支持包的一部分。arch/arm/mach-omap2/pdata-quirks.c +5
-4@@ -6,6 +6,7 @@*/ #include <linux/clk.h> #include <linux/davinci_emac.h> +#include <linux/gpio/consumer.h> #include <linux/gpio.h> #include <linux/init.h> #include <linux/kernel.h> @@ -108,7 +109,7 @@ static int omap3_sbc_t3730_twl_callback(struct device *dev,if (res)return res; -gpio_export (gpio,0 ); +gpiod_export (gpio_to_desc (gpio),0 );return 0 ; }@@ -123,7 +124,7 @@ static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)return ; } -gpio_export (gpio,0 ); +gpiod_export (gpio_to_desc (gpio),0 );udelay (10 );gpio_set_value (gpio,1 );@@ -200,8 +201,8 @@ static void __init omap3_sbc_t3517_wifi_init(void)return ; } -gpio_export (cm_t3517_wlan_gpios[0 ].gpio,0 ); -gpio_export (cm_t3517_wlan_gpios[1 ].gpio,0 ); +gpiod_export (gpio_to_desc (cm_t3517_wlan_gpios[0 ].gpio),0 ); +gpiod_export (gpio_to_desc (cm_t3517_wlan_gpios[1 ].gpio),0 );msleep (100 );gpio_set_value (cm_t3517_wlan_gpios[1 ].gpio,0 );arch/sh/boards/mach-ap325rxa/setup.c +4
-3@@ -18,6 +18,7 @@#include <linux/delay.h> #include <linux/device.h> #include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/machine.h> #include <linux/i2c.h> #include <linux/init.h> @@ -411,16 +412,16 @@ static int __init ap325rxa_devices_setup(void)/* LD3 and LD4 LEDs */ gpio_request (GPIO_PTX5 ,NULL );/* RUN */ gpio_direction_output (GPIO_PTX5 ,1 ); -gpio_export (GPIO_PTX5 ,0 ); +gpiod_export (gpio_to_desc (GPIO_PTX5 ),0 );gpio_request (GPIO_PTX4 ,NULL );/* INDICATOR */ gpio_direction_output (GPIO_PTX4 ,0 ); -gpio_export (GPIO_PTX4 ,0 ); +gpiod_export (gpio_to_desc (GPIO_PTX4 ),0 );/* SW1 input */ gpio_request (GPIO_PTF7 ,NULL );/* MODE */ gpio_direction_input (GPIO_PTF7 ); -gpio_export (GPIO_PTF7 ,0 ); +gpiod_export (gpio_to_desc (GPIO_PTF7 ),0 );/* LCDC */ gpio_request (GPIO_FN_LCDD15 ,NULL );drivers/gpio/gpiolib-sysfs.c +0
-0
drivers/gpio/gpiolib-sysfs.c static ssize_t unexport_store(struct class *class, · line 494
Quoted 5 lines
drivers/gpio/gpiolib-sysfs.c +1
-1@@ -491,7 +491,7 @@ static ssize_t unexport_store(struct class *class, goto done; desc =gpio_to_desc (gpio); -/* reject bogus commands (gpio_unexport ignores them) */ +/* reject bogus commands (gpiod_unexport ignores them) */
While at it,
/* reject bogus commands (gpiod_unexport() ignores them) */
Quoted 131 lines
drivers/gpio/gpiolib-sysfs.c +1
-1if (!desc) {pr_warn ("%s: invalid GPIO %ld\n" , __func__, gpio);return -EINVAL ;@@ -790,7 +790,7 @@ static int __init gpiolib_sysfs_init(void)* early (e.g. before the class_register above was called). * * We run before arch_initcall() so chip->dev nodes can have -* registered, and so arch_initcall() can always gpio_export(). +* registered, and so arch_initcall() can always gpiod_export(). */ spin_lock_irqsave (&gpio_lock, flags);list_for_each_entry (gdev, &gpio_devices, list) {drivers/media/pci/sta2x11/sta2x11_vip.c +7
-3@@ -18,6 +18,7 @@#include <linux/pci.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/gpio/consumer.h> #include <linux/gpio.h> #include <linux/i2c.h> #include <linux/delay.h> @@ -889,6 +890,7 @@ static int sta2x11_vip_init_controls(struct sta2x11_vip *vip)static int vip_gpio_reserve (struct device *dev,int pin,int dir,const char *name) { +struct gpio_desc *desc =gpio_to_desc (pin);int ret = -ENODEV ;if (!gpio_is_valid (pin))@@ -900,7 +902,7 @@ static int vip_gpio_reserve(struct device *dev, int pin, int dir,return ret; } - ret =gpio_direction_output (pin, dir); + ret =gpiod_direction_output (desc, dir);if (ret) {dev_err (dev,"Failed to set direction for pin %d (%s)\n" , pin, name);@@ -908,7 +910,7 @@ static int vip_gpio_reserve(struct device *dev, int pin, int dir,return ret; } - ret =gpio_export (pin, false); + ret =gpiod_export (desc, false);if (ret) {dev_err (dev,"Failed to export pin %d (%s)\n" , pin, name);gpio_free (pin);@@ -928,8 +930,10 @@ static int vip_gpio_reserve(struct device *dev, int pin, int dir,static void vip_gpio_release (struct device *dev,int pin,const char *name) {if (gpio_is_valid (pin)) { +struct gpio_desc *desc =gpio_to_desc (pin); +dev_dbg (dev,"releasing pin %d (%s)\n" , pin, name); -gpio_unexport (pin); +gpiod_unexport (desc);gpio_free (pin); } }drivers/net/ieee802154/ca8210.c +2
-1@@ -51,6 +51,7 @@#include <linux/clk-provider.h> #include <linux/debugfs.h> #include <linux/delay.h> +#include <linux/gpio/consumer.h> #include <linux/gpio.h> #include <linux/ieee802154.h> #include <linux/io.h> @@ -2853,7 +2854,7 @@ static int ca8210_interrupt_init(struct spi_device *spi) );if (ret) {dev_crit (&spi->dev,"request_irq %d failed\n" , pdata->irq_id); -gpio_unexport (pdata->gpio_irq); +gpiod_unexport (gpio_to_desc (pdata->gpio_irq));gpio_free (pdata->gpio_irq); }include/linux/gpio.h +0
-27@@ -127,20 +127,6 @@ extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *labeextern int gpio_request_array (const struct gpio *array,size_t num);extern void gpio_free_array (const struct gpio *array,size_t num); -/* -* A sysfs interface can be exported by individual drivers if they want, -* but more typically is configured entirely from userspace. -*/ -static inline int gpio_export (unsigned gpio,bool direction_may_change) -{ -return gpiod_export (gpio_to_desc (gpio), direction_may_change); -} - -static inline void gpio_unexport (unsigned gpio) -{ -gpiod_unexport (gpio_to_desc (gpio)); -} -/* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */ struct device ;@@ -231,19 +217,6 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)WARN_ON (1 ); } -static inline int gpio_export (unsigned gpio,bool direction_may_change) -{ -/* GPIO can never have been requested or set as {in,out}put */ -WARN_ON (1 ); -return -EINVAL ; -} - -static inline void gpio_unexport (unsigned gpio) -{ -/* GPIO can never have been exported */ -WARN_ON (1 ); -} -static inline int gpio_to_irq (unsigned gpio) {/* GPIO can never have been requested or set as input */ Signature · 1 line
2.39.0
Signature · 2 lines
With Best Regards, Andy Shevchenko
Arnd Bergmann
maintainerRe: [PATCH 5/8] gpiolib: remove legacy gpio_export
Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There are only a handful of users of
gpio_export()and related functions.
Quoted 8 lines
Quoted 3 lines
As these are just wrappers around the modern
gpiod_export()helper, remove the wrappers and open-code thegpio_to_descin all callers to shrink the legacy API.A couple of comments below, after addressing:
Reviewed-by Andy Shevchenko <[email protected]>
Thanks!
Quoted 4 lines
Quoted 2 lines
-API参考
Mistakenly removed?
Fixed now.
Quoted 8 lines
drivers/gpio/gpiolib-sysfs.c static ssize_t unexport_store(struct class *class, · line 494
Quoted 4 lines
drivers/gpio/gpiolib-sysfs.c +1
-1desc =gpio_to_desc (gpio); -/* reject bogus commands (gpio_unexport ignores them) */ +/* reject bogus commands (gpiod_unexport ignores them) */ While at it,
/* reject bogus commands (gpiod_unexport() ignores them) */
Done,
Arnd
Re: [PATCH 5/8] gpiolib: remove legacy gpio_export
In reply to Arnd BergmannQuoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There are only a handful of users of
gpio_export()and related functions.As these are just wrappers around the modern
gpiod_export()helper, remove the wrappers and open-code thegpio_to_descin all callers to shrink the legacy API.Signed-off-by Arnd Bergmann <[email protected]>
Yours,
Linus Walleij
PATCH 6/8 gpiolib: split linux/gpio/driver.h out of linux/gpio.h
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
Almost all gpio drivers include linux/gpio/driver.h, and other files should not rely on includes from this header.
Remove the indirect include from here and include the correct headers directly from where they are used.
--- arch/arm/mach-omap1/irq.c | 1 + arch/arm/mach-orion5x/board-rd88f5182.c | 1 + arch/arm/mach-s3c/s3c64xx.c | 1 + arch/arm/mach-sa1100/assabet.c | 1 + arch/arm/plat-orion/gpio.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c | 1 + include/linux/gpio.h | 2 -- include/linux/mfd/ucb1x00.h | 1 + 8 files changed, 7 insertions(+), 2 deletions(-)
arch/arm/mach-omap1/irq.c +1 -0
@@ -41,6 +41,7 @@#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/irqdomain.h> #include <asm/irq.h> #include <asm/exception.h>
arch/arm/mach-orion5x/board-rd88f5182.c +1 -0
@@ -9,6 +9,7 @@#include <linux/gpio.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/pci.h> #include <linux/irq.h>
arch/arm/mach-s3c/s3c64xx.c +1 -0
@@ -24,6 +24,7 @@#include <linux/platform_device.h> #include <linux/reboot.h> #include <linux/io.h> +#include <linux/of.h> #include <linux/clk/samsung.h> #include <linux/dma-mapping.h> #include <linux/irq.h>
arch/arm/mach-sa1100/assabet.c +1 -0
@@ -12,6 +12,7 @@#include <linux/errno.h> #include <linux/gpio/gpio-reg.h> #include <linux/gpio/machine.h> +#include <linux/gpio/driver.h> #include <linux/gpio_keys.h> #include <linux/ioport.h> #include <linux/platform_data/sa11x0-serial.h>
arch/arm/plat-orion/gpio.c +1 -0
@@ -19,6 +19,7 @@#include <linux/bitops.h> #include <linux/io.h> #include <linux/gpio.h> +#include <linux/gpio/driver.h> #include <linux/leds.h> #include <linux/of.h> #include <linux/of_irq.h>
drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c +1 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0 #include <net/mac80211.h> #include <linux/bcma/bcma_driver_chipcommon.h> +#include <linux/gpio.h> #include <linux/gpio/driver.h> #include <linux/gpio/machine.h> #include <linux/gpio/consumer.h>
include/linux/gpio.h +0 -2
@@ -54,8 +54,6 @@ struct gpio { };#ifdef CONFIG_GPIOLIB -#include <linux/compiler.h> -#include <linux/gpio/driver.h> #include <linux/gpio/consumer.h> /*
include/linux/mfd/ucb1x00.h +1 -0
@@ -9,6 +9,7 @@#include <linux/device.h> #include <linux/mfd/mcp.h> +#include <linux/gpio/driver.h> #include <linux/gpio.h> #include <linux/mutex.h>
Signature · 1 line
2.39.0
Re: [PATCH 6/8] gpiolib: split linux/gpio/driver.h out of linux/gpio.h
Quoted 7 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Almost all gpio drivers include
linux/gpio/driver.h, and other files should not rely on includes from this header.Remove the indirect include from here and include the correct headers directly from where they are used.
Some minor nit-picks below, otherwise
Quoted 41 lines
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm/mach-omap1/irq.c | 1 + arch/arm/mach-orion5x/board-rd88f5182.c | 1 + arch/arm/mach-s3c/s3c64xx.c | 1 + arch/arm/mach-sa1100/assabet.c | 1 + arch/arm/plat-orion/gpio.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c | 1 + include/linux/gpio.h | 2 -- include/linux/mfd/ucb1x00.h | 1 + 8 files changed, 7 insertions(+), 2 deletions(-)arch/arm/mach-omap1/irq.c +1
-0@@ -41,6 +41,7 @@#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/irqdomain.h> #include <asm/irq.h> #include <asm/exception.h> arch/arm/mach-orion5x/board-rd88f5182.c +1
-0@@ -9,6 +9,7 @@#include <linux/gpio.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/pci.h> #include <linux/irq.h> arch/arm/mach-s3c/s3c64xx.c +0
-0
arch/arm/mach-s3c/s3c64xx.c line 28
Quoted 5 lines
arch/arm/mach-s3c/s3c64xx.c +1
-0@@ -24,6 +24,7 @@#include <linux/platform_device.h> #include <linux/reboot.h> #include <linux/io.h> +#include <linux/of.h>
Taking the limited context into account, I think this makes more sense to be placed before platform_device.h as to keep longer _sorted_ chain.
arch/arm/mach-sa1100/assabet.c line 15
Quoted 12 lines
arch/arm/mach-s3c/s3c64xx.c +0
-0#include <linux/clk/samsung.h> #include <linux/dma-mapping.h> #include <
linux/irq.h>arch/arm/mach-sa1100/assabet.c +1
-0@@ -12,6 +12,7 @@#include <linux/errno.h> #include <linux/gpio/gpio-reg.h> #include <linux/gpio/machine.h> +#include <linux/gpio/driver.h>
Similar. Keep it more sorted.
Quoted 45 lines
arch/arm/mach-sa1100/assabet.c +0
-0#include <linux/gpio_keys.h> #include <linux/ioport.h> #include <linux/platform_data/sa11x0-serial.h> arch/arm/plat-orion/gpio.c +1
-0@@ -19,6 +19,7 @@#include <linux/bitops.h> #include <linux/io.h> #include <linux/gpio.h> +#include <linux/gpio/driver.h> #include <linux/leds.h> #include <linux/of.h> #include <linux/of_irq.h> drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c +1
-0@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0 #include <net/mac80211.h> #include <linux/bcma/bcma_driver_chipcommon.h> +#include <linux/gpio.h> #include <linux/gpio/driver.h> #include <linux/gpio/machine.h> #include <linux/gpio/consumer.h> include/linux/gpio.h +0
-2@@ -54,8 +54,6 @@ struct gpio { };#ifdef CONFIG_GPIOLIB -#include <linux/compiler.h> -#include <linux/gpio/driver.h> #include <linux/gpio/consumer.h> /* include/linux/mfd/ucb1x00.h +0
-0
include/linux/mfd/ucb1x00.h line 14
Quoted 6 lines
include/linux/mfd/ucb1x00.h +1
-0@@ -9,6 +9,7 @@#include <linux/device.h> #include <linux/mfd/mcp.h> +#include <linux/gpio/driver.h> #include <linux/gpio.h>
Here is the opposite ordering to the above similar cases. Swap?
Quoted 5 lines
include/linux/mfd/ucb1x00.h +0
-0#include <linux/mutex.h> Signature · 2 lines
-- 2.39.0
Signature · 2 lines
With Best Regards, Andy Shevchenko
Arnd Bergmann
maintainerRe: [PATCH 6/8] gpiolib: split linux/gpio/driver.h out of linux/gpio.h
Quoted 21 lines · Andy Shevchenko
Quoted 7 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Almost all gpio drivers include
linux/gpio/driver.h, and other files should not rely on includes from this header.Remove the indirect include from here and include the correct headers directly from where they are used.
Some minor nit-picks below, otherwise
Reviewed-by Andy Shevchenko <[email protected]>Quoted 1 line
+#include <
linux/of.h>Taking the limited context into account, I think this makes more sense to be placed before
platform_device.has to keep longer _sorted_ chain.Quoted 3 lines
#include <
linux/gpio/gpio-reg.h>
#include <linux/gpio/machine.h>
+#include <linux/gpio/driver.h>
Quoted 7 lines
Similar. Keep it more sorted.
Quoted 2 lines
+#include <
linux/gpio/driver.h>
#include <linux/gpio.h>Here is the opposite ordering to the above similar cases. Swap?
Changed all as suggested, thanks!
Arnd
Re: [PATCH 6/8] gpiolib: split linux/gpio/driver.h out of linux/gpio.h
In reply to Arnd BergmannQuoted 9 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Almost all gpio drivers include
linux/gpio/driver.h, and other files should not rely on includes from this header.Remove the indirect include from here and include the correct headers directly from where they are used.
Signed-off-by Arnd Bergmann <[email protected]>
Makes the kernel look better after than before so:
I was going to send this to Bartosz but don't want us falling over each other, however consider the approach I use to get rid of <linux/gpio/driver.h> here:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/log/?h=gpiochip-no-driver-h
(My patch set was at least approved by the build bots.)
Comparing the approaches it seems you need these two, feel free to cherry-pick to avoid build errors from the bots:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/commit/?h=gpiochip-no-driver-h&id=89f4f9cc70c686303679e57bdc3ac86507979fe3
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/commit/?h=gpiochip-no-driver-h&id=73ca8058a7b2075c993040bdc92b6a82f57d4316
Yours,
Linus Walleij
PATCH 7/8 gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
This is a rarely used feature that has nothing to do with the client-side of_gpio.h.
Split it out with a separate header file and Kconfig option so it can be removed on its own timeline aside from removing the of_gpio consumer interfaces.
--- arch/powerpc/platforms/44x/Kconfig | 1 + arch/powerpc/platforms/4xx/gpio.c | 2 +- arch/powerpc/platforms/8xx/Kconfig | 1 + arch/powerpc/platforms/8xx/cpm1.c | 2 +- arch/powerpc/platforms/Kconfig | 2 ++ arch/powerpc/sysdev/cpm_common.c | 2 +- drivers/gpio/Kconfig | 11 +++++++ drivers/gpio/TODO | 15 ++++++--- drivers/gpio/gpio-altera.c | 2 +- drivers/gpio/gpio-mm-lantiq.c | 2 +- drivers/gpio/gpio-mpc5200.c | 2 +- drivers/gpio/gpiolib-of.c | 3 ++ drivers/soc/fsl/qe/gpio.c | 2 +- include/linux/gpio/legacy-of-mm-gpiochip.h | 36 ++++++++++++++++++++++ include/linux/of_gpio.h | 21 ------------- 15 files changed, 71 insertions(+), 33 deletions(-) create mode 100644 include/linux/gpio/legacy-of-mm-gpiochip.h
arch/powerpc/platforms/44x/Kconfig +1 -0
@@ -230,6 +230,7 @@ config PPC4xx_GPIO bool "PPC4xx GPIO support" depends on 44x select GPIOLIB + select OF_GPIO_MM_GPIOCHIP help Enable gpiolib support for ppc440 based boards
arch/powerpc/platforms/4xx/gpio.c +1 -1
@@ -14,7 +14,7 @@#include <linux/spinlock.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_gpio.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h> #include <linux/gpio/driver.h> #include <linux/types.h> #include <linux/slab.h>
arch/powerpc/platforms/8xx/Kconfig +1 -0
@@ -101,6 +101,7 @@ comment "Generic MPC8xx Options" config 8xx_GPIO bool "GPIO API Support" select GPIOLIB + select OF_GPIO_MM_GPIOCHIP help Saying Y here will cause the ports on an MPC8xx processor to be used with the GPIO API. If you say N here, the kernel needs less memory.
arch/powerpc/platforms/8xx/cpm1.c +1 -1
@@ -44,7 +44,7 @@#include <asm/fs_pd.h> #ifdef CONFIG_8xx_GPIO -#include <linux/of_gpio.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h> #endif #define CPM_MAP_SIZE (0x4000)
arch/powerpc/platforms/Kconfig +2 -0
@@ -244,6 +244,7 @@ config QE_GPIO bool "QE GPIO support" depends on QUICC_ENGINE select GPIOLIB + select OF_GPIO_MM_GPIOCHIP help Say Y here if you're going to use hardware that connects to the QE GPIOs.
@@ -254,6 +255,7 @@ config CPM2 select CPM select HAVE_PCI select GPIOLIB + select OF_GPIO_MM_GPIOCHIP help The CPM2 (Communications Processor Module) is a coprocessor on embedded CPUs made by Freescale. Selecting this option means that
arch/powerpc/sysdev/cpm_common.c +1 -1
@@ -31,7 +31,7 @@#include <mm/mmu_decl.h> #if defined(CONFIG_CPM2 ) || defined(CONFIG_8xx_GPIO) -#include <linux/of_gpio.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h> #endif static int __init cpm_init (void )
drivers/gpio/Kconfig +11 -0
@@ -39,6 +39,14 @@ config GPIOLIB_IRQCHIP select IRQ_DOMAIN bool +config OF_GPIO_MM_GPIOCHIP + bool + help + This adds support for the legacy 'struct of_mm_gpio_chip' interface + from PowerPC. Existing drivers using this interface need to select + this symbol, but new drivers should use the generic gpio-mmio + infrastructure instead. + config DEBUG_GPIO bool "Debug GPIO calls" depends on DEBUG_KERNEL
@@ -131,6 +139,7 @@ config GPIO_ALTERA tristate "Altera GPIO" depends on OF_GPIO select GPIOLIB_IRQCHIP + select OF_GPIO_MM_GPIOCHIP help Say Y or M here to build support for the Altera PIO device.
@@ -403,6 +412,7 @@ config GPIO_MENZ127 config GPIO_MM_LANTIQ bool "Lantiq Memory mapped GPIOs" depends on LANTIQ && SOC_XWAY + select OF_GPIO_MM_GPIOCHIP help This enables support for memory mapped GPIOs on the External Bus Unit (EBU) found on Lantiq SoCs. The GPIOs are output only as they are
@@ -411,6 +421,7 @@ config GPIO_MM_LANTIQ config GPIO_MPC5200 def_bool y depends on PPC_MPC52xx + select OF_GPIO_MM_GPIOCHIP config GPIO_MPC8XXX bool "MPC512x/MPC8xxx/QorIQ GPIO support"
drivers/gpio/TODO +10 -5
@@ -59,11 +59,6 @@ the device tree back-end. It is legacy and should not be used in new code. Work items: -- Get rid of struct of_mm_gpio_chip altogether: use the generic MMIO - GPIO for all current users (see below). Delete struct of_mm_gpio_chip, - to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_remove() - from the kernel. - - Change all consumer drivers that #include <linux/of_gpio.h> to #include <linux/gpio/consumer.h> and stop doing custom parsing of the GPIO lines from the device tree. This can be tricky and often ivolves
@@ -81,6 +76,16 @@ Work items: uses <linux/gpio/consumer.h> or <linux/gpio/driver.h> instead. +Get rid of <linux/gpio/legacy-of-mm-gpiochip.h> + +Work items: + +- Get rid of struct of_mm_gpio_chip altogether: use the generic MMIO + GPIO for all current users (see below). Delete struct of_mm_gpio_chip, + to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_remove(), + CONFIG_OF_GPIO_MM_GPIOCHIP from the kernel. + + Get rid of <linux/gpio.h> This legacy header is a one stop shop for anything GPIO is closely tied
drivers/gpio/gpio-altera.c +1 -1
@@ -7,7 +7,7 @@#include <linux/io.h> #include <linux/module.h> #include <linux/gpio/driver.h> -#include <linux/of_gpio.h> /* For of_mm_gpio_chip */ +#include <linux/gpio/legacy-of-mm-gpiochip.h> #include <linux/platform_device.h> #define ALTERA_GPIO_MAX_NGPIO 32
drivers/gpio/gpio-mm-lantiq.c +1 -1
@@ -10,8 +10,8 @@#include <linux/platform_device.h> #include <linux/mutex.h> #include <linux/gpio/driver.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h.h> #include <linux/of.h> -#include <linux/of_gpio.h> #include <linux/io.h> #include <linux/slab.h>
drivers/gpio/gpio-mpc5200.c +1 -1
@@ -8,7 +8,7 @@#include <linux/of.h> #include <linux/kernel.h> #include <linux/slab.h> -#include <linux/of_gpio.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h> #include <linux/io.h> #include <linux/of_platform.h> #include <linux/module.h>
drivers/gpio/gpiolib-of.c +3 -0
@@ -877,6 +877,8 @@ static int of_gpio_simple_xlate(struct gpio_chip *gc,return gpiospec->args[0 ]; } +#if IS_ENABLED (CONFIG_OF_GPIO_MM_GPIOCHIP ) +#include <linux/gpio/legacy-of-mm-gpiochip.h> /** * of_mm_gpiochip_add_data - Add memory mapped GPIO chip (bank) * @np: device node of the GPIO chip
@@ -949,6 +951,7 @@ void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc) kfree(gc->label); }EXPORT_SYMBOL_GPL (of_mm_gpiochip_remove); +#endif #ifdef CONFIG_PINCTRL static int of_gpiochip_add_pin_range (struct gpio_chip *chip)
drivers/soc/fsl/qe/gpio.c +1 -1
@@ -13,7 +13,7 @@#include <linux/err.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_gpio.h> /* for of_mm_gpio_chip */ +#include <linux/gpio/legacy-of-mm-gpiochip.h> #include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/slab.h>
include/linux/gpio/legacy-of-mm-gpiochip.h new file +36 -0
@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* OF helpers for the old of_mm_gpio_chip, used on ppc32 and nios2, +* do not use in new code. +* +* Copyright (c) 2007-2008 MontaVista Software, Inc. +* +* Author: Anton Vorontsov <[email protected]> +*/ + +#ifndef __LINUX_GPIO_LEGACY_OF_MM_GPIO_CHIP_H +#define __LINUX_GPIO_LEGACY_OF_MM_GPIO_CHIP_H + +#include <linux/gpio/driver.h> +#include <linux/of.h> + +/* +* OF GPIO chip for memory mapped banks +*/ +struct of_mm_gpio_chip { +struct gpio_chip gc; +void (*save_regs)(struct of_mm_gpio_chip *mm_gc); +void __iomem *regs; +}; + +static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip (struct gpio_chip *gc) +{ + return container_of(gc, struct of_mm_gpio_chip, gc); +} + +extern int of_mm_gpiochip_add_data (struct device_node *np, +struct of_mm_gpio_chip *mm_gc, +void *data); +extern void of_mm_gpiochip_remove (struct of_mm_gpio_chip *mm_gc); + +#endif /* __LINUX_GPIO_LEGACY_OF_MM_GPIO_CHIP_H */
include/linux/of_gpio.h +0 -21
@@ -34,30 +34,9 @@ enum of_gpio_flags {#ifdef CONFIG_OF_GPIO -#include <linux/container_of.h> - -/* -* OF GPIO chip for memory mapped banks -*/ -struct of_mm_gpio_chip { -struct gpio_chip gc; -void (*save_regs)(struct of_mm_gpio_chip *mm_gc); -void __iomem *regs; -}; - -static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip (struct gpio_chip *gc) -{ - return container_of(gc, struct of_mm_gpio_chip, gc); -} -extern int of_get_named_gpio (const struct device_node *np,const char *list_name,int index); -extern int of_mm_gpiochip_add_data (struct device_node *np, -struct of_mm_gpio_chip *mm_gc, -void *data); -extern void of_mm_gpiochip_remove (struct of_mm_gpio_chip *mm_gc); -#else /* CONFIG_OF_GPIO */ #include <linux/errno.h>
Signature · 1 line
2.39.0
Re: [PATCH 7/8] gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
This is a rarely used feature that has nothing to do with the client-side
of_gpio.h.Split it out with a separate header file and
Kconfigoption so it can be removed on its own timeline aside from removing theof_gpioconsumer interfaces.
One nit-pick below, otherwise
Quoted 108 lines
Signed-off-by Arnd Bergmann <[email protected]>--- arch/powerpc/platforms/44x/Kconfig | 1 + arch/powerpc/platforms/4xx/gpio.c | 2 +- arch/powerpc/platforms/8xx/Kconfig | 1 + arch/powerpc/platforms/8xx/cpm1.c | 2 +- arch/powerpc/platforms/Kconfig | 2 ++ arch/powerpc/sysdev/cpm_common.c | 2 +- drivers/gpio/Kconfig | 11 +++++++ drivers/gpio/TODO | 15 ++++++--- drivers/gpio/gpio-altera.c | 2 +- drivers/gpio/gpio-mm-lantiq.c | 2 +- drivers/gpio/gpio-mpc5200.c | 2 +- drivers/gpio/gpiolib-of.c | 3 ++ drivers/soc/fsl/qe/gpio.c | 2 +- include/linux/gpio/legacy-of-mm-gpiochip.h | 36 ++++++++++++++++++++++ include/linux/of_gpio.h | 21 ------------- 15 files changed, 71 insertions(+), 33 deletions(-) create mode 100644 include/linux/gpio/legacy-of-mm-gpiochip.harch/powerpc/platforms/44x/Kconfig +1
-0@@ -230,6 +230,7 @@ config PPC4xx_GPIO bool "PPC4xx GPIO support" depends on 44x select GPIOLIB + select OF_GPIO_MM_GPIOCHIP help Enable gpiolib support for ppc440 based boardsarch/powerpc/platforms/4xx/gpio.c +1
-1@@ -14,7 +14,7 @@#include <linux/spinlock.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_gpio.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h> #include <linux/gpio/driver.h> #include <linux/types.h> #include <linux/slab.h> arch/powerpc/platforms/8xx/Kconfig +1
-0@@ -101,6 +101,7 @@ comment "Generic MPC8xx Options" config 8xx_GPIO bool "GPIO API Support" select GPIOLIB + select OF_GPIO_MM_GPIOCHIP help Saying Y here will cause the ports on an MPC8xx processor to be used with the GPIO API. If you say N here, the kernel needs less memory.arch/powerpc/platforms/8xx/cpm1.c +1
-1@@ -44,7 +44,7 @@#include <asm/fs_pd.h> #ifdef CONFIG_8xx_GPIO -#include <linux/of_gpio.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h> #endif #define CPM_MAP_SIZE (0x4000)arch/powerpc/platforms/Kconfig +2
-0@@ -244,6 +244,7 @@ config QE_GPIO bool "QE GPIO support" depends on QUICC_ENGINE select GPIOLIB + select OF_GPIO_MM_GPIOCHIP help Say Y here if you're going to use hardware that connects to the QE GPIOs.@@ -254,6 +255,7 @@ config CPM2 select CPM select HAVE_PCI select GPIOLIB + select OF_GPIO_MM_GPIOCHIP help The CPM2 (Communications Processor Module) is a coprocessor on embedded CPUs made by Freescale. Selecting this option means thatarch/powerpc/sysdev/cpm_common.c +1
-1@@ -31,7 +31,7 @@#include <mm/mmu_decl.h> #if defined(CONFIG_CPM2 ) || defined(CONFIG_8xx_GPIO) -#include <linux/of_gpio.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h> #endif static int __init cpm_init (void )drivers/gpio/Kconfig +0
-0
drivers/gpio/Kconfig config GPIOLIB_IRQCHIP · line 47
Quoted 9 lines
drivers/gpio/Kconfig +6
-0@@ -39,6 +39,14 @@ config GPIOLIB_IRQCHIP select IRQ_DOMAIN bool +config OF_GPIO_MM_GPIOCHIP + bool + help + This adds support for the legacy 'struct of_mm_gpio_chip' interface + from PowerPC. Existing drivers using this interface need to select + this symbol, but new drivers should use the generic gpio-mmio
gpio-regmap
I would even not mention gpio-mmio.
Quoted 216 lines
drivers/gpio/Kconfig +5
-0+ infrastructure instead. + config DEBUG_GPIO bool "Debug GPIO calls" depends on DEBUG_KERNEL@@ -131,6 +139,7 @@ config GPIO_ALTERA tristate "Altera GPIO" depends on OF_GPIO select GPIOLIB_IRQCHIP + select OF_GPIO_MM_GPIOCHIP help Say Y or M here to build support for the Altera PIO device.@@ -403,6 +412,7 @@ config GPIO_MENZ127 config GPIO_MM_LANTIQ bool "Lantiq Memory mapped GPIOs" depends on LANTIQ && SOC_XWAY + select OF_GPIO_MM_GPIOCHIP help This enables support for memory mapped GPIOs on the External Bus Unit (EBU) found on Lantiq SoCs. The GPIOs are output only as they are@@ -411,6 +421,7 @@ config GPIO_MM_LANTIQ config GPIO_MPC5200 def_bool y depends on PPC_MPC52xx + select OF_GPIO_MM_GPIOCHIP config GPIO_MPC8XXX bool "MPC512x/MPC8xxx/QorIQ GPIO support"drivers/gpio/TODO +10
-5@@ -59,11 +59,6 @@ the device tree back-end. It is legacy and should not be used in new code. Work items: -- Get rid of struct of_mm_gpio_chip altogether: use the generic MMIO - GPIO for all current users (see below). Delete struct of_mm_gpio_chip, - to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_remove() - from the kernel. - - Change all consumer drivers that #include <linux/of_gpio.h> to #include <linux/gpio/consumer.h> and stop doing custom parsing of the GPIO lines from the device tree. This can be tricky and often ivolves@@ -81,6 +76,16 @@ Work items: uses <linux/gpio/consumer.h> or <linux/gpio/driver.h> instead. +Get rid of <linux/gpio/legacy-of-mm-gpiochip.h> + +Work items: + +- Get rid of struct of_mm_gpio_chip altogether: use the generic MMIO + GPIO for all current users (see below). Delete struct of_mm_gpio_chip, + to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_remove(), + CONFIG_OF_GPIO_MM_GPIOCHIP from the kernel. + + Get rid of <linux/gpio.h> This legacy header is a one stop shop for anything GPIO is closely tieddrivers/gpio/gpio-altera.c +1
-1@@ -7,7 +7,7 @@#include <linux/io.h> #include <linux/module.h> #include <linux/gpio/driver.h> -#include <linux/of_gpio.h> /* For of_mm_gpio_chip */ +#include <linux/gpio/legacy-of-mm-gpiochip.h> #include <linux/platform_device.h> #define ALTERA_GPIO_MAX_NGPIO 32drivers/gpio/gpio-mm-lantiq.c +1
-1@@ -10,8 +10,8 @@#include <linux/platform_device.h> #include <linux/mutex.h> #include <linux/gpio/driver.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h.h> #include <linux/of.h> -#include <linux/of_gpio.h> #include <linux/io.h> #include <linux/slab.h> drivers/gpio/gpio-mpc5200.c +1
-1@@ -8,7 +8,7 @@#include <linux/of.h> #include <linux/kernel.h> #include <linux/slab.h> -#include <linux/of_gpio.h> +#include <linux/gpio/legacy-of-mm-gpiochip.h> #include <linux/io.h> #include <linux/of_platform.h> #include <linux/module.h> drivers/gpio/gpiolib-of.c +3
-0@@ -877,6 +877,8 @@ static int of_gpio_simple_xlate(struct gpio_chip *gc,return gpiospec->args[0 ]; } +#if IS_ENABLED (CONFIG_OF_GPIO_MM_GPIOCHIP ) +#include <linux/gpio/legacy-of-mm-gpiochip.h> /** * of_mm_gpiochip_add_data - Add memory mapped GPIO chip (bank) * @np: device node of the GPIO chip @@ -949,6 +951,7 @@ void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc) kfree(gc->label); }EXPORT_SYMBOL_GPL (of_mm_gpiochip_remove); +#endif #ifdef CONFIG_PINCTRL static int of_gpiochip_add_pin_range (struct gpio_chip *chip)drivers/soc/fsl/qe/gpio.c +1
-1@@ -13,7 +13,7 @@#include <linux/err.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_gpio.h> /* for of_mm_gpio_chip */ +#include <linux/gpio/legacy-of-mm-gpiochip.h> #include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/slab.h> include/linux/gpio/legacy-of-mm-gpiochip.h new file +36
-0@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* OF helpers for the old of_mm_gpio_chip, used on ppc32 and nios2, +* do not use in new code. +* +* Copyright (c) 2007-2008 MontaVista Software, Inc. +* +* Author: Anton Vorontsov <[email protected]> +*/ + +#ifndef __LINUX_GPIO_LEGACY_OF_MM_GPIO_CHIP_H +#define __LINUX_GPIO_LEGACY_OF_MM_GPIO_CHIP_H + +#include <linux/gpio/driver.h> +#include <linux/of.h> + +/* +* OF GPIO chip for memory mapped banks +*/ +struct of_mm_gpio_chip { +struct gpio_chip gc; +void (*save_regs)(struct of_mm_gpio_chip *mm_gc); +void __iomem *regs; +}; + +static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip (struct gpio_chip *gc) +{ + return container_of(gc, struct of_mm_gpio_chip, gc); +} + +extern int of_mm_gpiochip_add_data (struct device_node *np, +struct of_mm_gpio_chip *mm_gc, +void *data); +extern void of_mm_gpiochip_remove (struct of_mm_gpio_chip *mm_gc); + +#endif /* __LINUX_GPIO_LEGACY_OF_MM_GPIO_CHIP_H */ include/linux/of_gpio.h +0
-21@@ -34,30 +34,9 @@ enum of_gpio_flags {#ifdef CONFIG_OF_GPIO -#include <linux/container_of.h> - -/* -* OF GPIO chip for memory mapped banks -*/ -struct of_mm_gpio_chip { -struct gpio_chip gc; -void (*save_regs)(struct of_mm_gpio_chip *mm_gc); -void __iomem *regs; -}; - -static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip (struct gpio_chip *gc) -{ - return container_of(gc, struct of_mm_gpio_chip, gc); -} -extern int of_get_named_gpio (const struct device_node *np,const char *list_name,int index); -extern int of_mm_gpiochip_add_data (struct device_node *np, -struct of_mm_gpio_chip *mm_gc, -void *data); -extern void of_mm_gpiochip_remove (struct of_mm_gpio_chip *mm_gc); -#else /* CONFIG_OF_GPIO */ #include <linux/errno.h> Signature · 1 line
2.39.0
Signature · 2 lines
With Best Regards, Andy Shevchenko
Arnd Bergmann
maintainerRe: [PATCH 7/8] gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h
Quoted 24 lines · Andy Shevchenko
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
This is a rarely used feature that has nothing to do with the client-side
of_gpio.h.Split it out with a separate header file and
Kconfigoption so it can be removed on its own timeline aside from removing theof_gpioconsumer interfaces.One nit-pick below, otherwise
Reviewed-by Andy Shevchenko <[email protected]>drivers/gpio/Kconfig config GPIOLIB_IRQCHIP · line 47
Quoted 7 lines
drivers/gpio/Kconfig +6
-0+config OF_GPIO_MM_GPIOCHIP + bool + help + This adds support for the legacy 'struct of_mm_gpio_chip' interface + from PowerPC. Existing drivers using this interface need to select + this symbol, but new drivers should use the generic gpio-mmiogpio-regmap
Quoted 1 line
I would even not mention gpio-mmio.
Makes sense, thanks!
Arnd
Re: [PATCH 7/8] gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h
In reply to Arnd BergmannQuoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
This is a rarely used feature that has nothing to do with the client-side
of_gpio.h.Split it out with a separate header file and
Kconfigoption so it can be removed on its own timeline aside from removing theof_gpioconsumer interfaces.Signed-off-by Arnd Bergmann <[email protected]>
Thanks for isolating this problem, and kudos for even updating the TODO :D
Yours,
Linus Walleij
PATCH 8/8 gpiolib: move of_gpio_flags into gpiolib-of.c
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
There is no need for this in the header any more, it's just an implementation detail now.
--- drivers/gpio/gpiolib-of.c | 15 +++++++++++++++ include/linux/of_gpio.h | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-)
drivers/gpio/gpiolib-of.c +15 -0
@@ -23,6 +23,21 @@#include "gpiolib.h" #include "gpiolib-of.h" +/* +* This is Linux-specific flags. By default controllers' and Linux' mapping +* match, but GPIO controllers are free to translate their own flags to +* Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended. +*/ +enum of_gpio_flags { +OF_GPIO_ACTIVE_LOW =0x1 , +OF_GPIO_SINGLE_ENDED =0x2 , +OF_GPIO_OPEN_DRAIN =0x4 , +OF_GPIO_TRANSITORY =0x8 , +OF_GPIO_PULL_UP =0x10 , +OF_GPIO_PULL_DOWN =0x20 , +OF_GPIO_PULL_DISABLE =0x40 , +}; +/** * of_gpio_named_count() - Count GPIOs for a device * @np: device node to count GPIOs for
include/linux/of_gpio.h +0 -15
@@ -17,21 +17,6 @@struct device_node ; -/* -* This is Linux-specific flags. By default controllers' and Linux' mapping -* match, but GPIO controllers are free to translate their own flags to -* Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended. -*/ -enum of_gpio_flags { -OF_GPIO_ACTIVE_LOW =0x1 , -OF_GPIO_SINGLE_ENDED =0x2 , -OF_GPIO_OPEN_DRAIN =0x4 , -OF_GPIO_TRANSITORY =0x8 , -OF_GPIO_PULL_UP =0x10 , -OF_GPIO_PULL_DOWN =0x20 , -OF_GPIO_PULL_DISABLE =0x40 , -}; -#ifdef CONFIG_OF_GPIO extern int of_get_named_gpio(const struct device_node *np,
Signature · 1 line
2.39.0
Re: [PATCH 8/8] gpiolib: move of_gpio_flags into gpiolib-of.c
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is no need for this in the header any more, it's just an implementation detail now.
I have published
https://lore.kernel.org/r/[email protected]
Can it be used?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Arnd Bergmann
maintainerRe: [PATCH 8/8] gpiolib: move of_gpio_flags into gpiolib-of.c
Quoted 9 lines · Andy Shevchenko
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is no need for this in the header any more, it's just an implementation detail now.
I have published
https://lore.kernel.org/r/[email protected]
Can it be used?
Sure, I added a Reviewed-by: on that now. Your patch will conflict with my patch 7/8, but we can work that out.
Arnd
Re: [PATCH 8/8] gpiolib: move of_gpio_flags into gpiolib-of.c
Quoted 7 lines · Arnd Bergmann
Quoted 6 lines · Andy Shevchenko
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is no need for this in the header any more, it's just an implementation detail now.
Quoted 6 lines
Quoted 3 lines
I have published
https://lore.kernel.org/r/[email protected]
Can it be used?Sure, I added a Reviewed-by: on that now. Your patch will conflict with my patch 7/8, but we can work that out.
Either Bart takes it independently or you may attach it into your series. Bart?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 8/8] gpiolib: move of_gpio_flags into gpiolib-of.c
Quoted 13 lines · Andy Shevchenko
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · Andy Shevchenko
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is no need for this in the header any more, it's just an implementation detail now.
I have published
https://lore.kernel.org/r/[email protected]
Can it be used?
Quoted 6 lines
Quoted 2 lines
Sure, I added a Reviewed-by: on that now. Your patch will conflict with my patch 7/8, but we can work that out.
Either Bart takes it independently or you may attach it into your series. Bart?
I applied it to my for-next branch, is that fine?
Bart
Arnd Bergmann
maintainerRe: [PATCH 8/8] gpiolib: move of_gpio_flags into gpiolib-of.c
Quoted 15 lines · Bartosz Golaszewski
Quoted 13 lines · Andy Shevchenko
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · Andy Shevchenko
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is no need for this in the header any more, it's just an implementation detail now.
I have published
https://lore.kernel.org/r/[email protected]
Can it be used?
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Sure, I added a Reviewed-by: on that now. Your patch will conflict with my patch 7/8, but we can work that out.
Either Bart takes it independently or you may attach it into your series. Bart?
I applied it to my for-next branch, is that fine?
That's fine, I'll make sure to rebase patch 7 on top of that before I resend it. The two are functionally independent but touch adjacent lines.
Arnd
Re: [PATCH 8/8] gpiolib: move of_gpio_flags into gpiolib-of.c
In reply to Bartosz GolaszewskiQuoted 5 lines · Bartosz Golaszewski
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Arnd Bergmann
Quoted 1 line · Andy Shevchenko
On Thu, Jan 26, 2023 at 02:28:01PM +0100, Arnd Bergmann wrote:
...
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
There is no need for this in the header any more, it's just an implementation detail now.
I have published
https://lore.kernel.org/r/[email protected]
Can it be used?
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Sure, I added a Reviewed-by: on that now. Your patch will conflict with my patch 7/8, but we can work that out.
Either Bart takes it independently or you may attach it into your series. Bart?
I applied it to my for-next branch, is that fine?
Good for me, thanks!
Arnd?
Signature · 2 lines
With Best Regards, Andy Shevchenko