diff mbox series

gpio: Update Kconfig text for GPIO_SYSFS

Message ID 20190523065623.5993-1-linus.walleij@linaro.org
State Accepted
Commit db9477f8b549b12943f513c18c7b10acd7d97e6e
Headers show
Series gpio: Update Kconfig text for GPIO_SYSFS | expand

Commit Message

Linus Walleij May 23, 2019, 6:56 a.m. UTC
This feature is deprecated, it is helpful to inform users about
this. I'm resisting the temptation to add "depends on BROKEN"
to this, but saving that for later.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
 drivers/gpio/Kconfig | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

-- 
2.20.1

Comments

Bartosz Golaszewski May 23, 2019, 7:57 a.m. UTC | #1
czw., 23 maj 2019 o 08:56 Linus Walleij <linus.walleij@linaro.org> napisaƂ(a):
>

> This feature is deprecated, it is helpful to inform users about

> this. I'm resisting the temptation to add "depends on BROKEN"

> to this, but saving that for later.

>

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  drivers/gpio/Kconfig | 14 +++++---------

>  1 file changed, 5 insertions(+), 9 deletions(-)

>

> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig

> index 8023d03ec362..a10b821e1d92 100644

> --- a/drivers/gpio/Kconfig

> +++ b/drivers/gpio/Kconfig

> @@ -61,16 +61,12 @@ config GPIO_SYSFS

>         bool "/sys/class/gpio/... (sysfs interface)"

>         depends on SYSFS

>         help

> -         Say Y here to add a sysfs interface for GPIOs.

> +         Say Y here to add the legacy sysfs interface for GPIOs.

>

> -         This is mostly useful to work around omissions in a system's

> -         kernel support.  Those are common in custom and semicustom

> -         hardware assembled using standard kernels with a minimum of

> -         custom patches.  In those cases, userspace code may import

> -         a given GPIO from the kernel, if no kernel driver requested it.

> -

> -         Kernel drivers may also request that a particular GPIO be

> -         exported to userspace; this can be useful when debugging.

> +         This ABI is deprecated. If you want to use GPIO from userspace,

> +         use the character device /dev/gpiochipN with the appropriate

> +         ioctl() operations instead. The character device is always

> +         available.

>

>  config GPIO_GENERIC

>         depends on HAS_IOMEM # Only for IOMEM drivers

> --

> 2.20.1

>


Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>


I strongly believe that in a couple releases we should WARN_ONCE()
when sysfs is used. :)

Bart
diff mbox series

Patch

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 8023d03ec362..a10b821e1d92 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -61,16 +61,12 @@  config GPIO_SYSFS
 	bool "/sys/class/gpio/... (sysfs interface)"
 	depends on SYSFS
 	help
-	  Say Y here to add a sysfs interface for GPIOs.
+	  Say Y here to add the legacy sysfs interface for GPIOs.
 
-	  This is mostly useful to work around omissions in a system's
-	  kernel support.  Those are common in custom and semicustom
-	  hardware assembled using standard kernels with a minimum of
-	  custom patches.  In those cases, userspace code may import
-	  a given GPIO from the kernel, if no kernel driver requested it.
-
-	  Kernel drivers may also request that a particular GPIO be
-	  exported to userspace; this can be useful when debugging.
+	  This ABI is deprecated. If you want to use GPIO from userspace,
+	  use the character device /dev/gpiochipN with the appropriate
+	  ioctl() operations instead. The character device is always
+	  available.
 
 config GPIO_GENERIC
 	depends on HAS_IOMEM # Only for IOMEM drivers