Public bug reported:

Ubuntu kernels are built with CONFIG_GPIO_SYSFS=y after
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1342153

debian.master/config/config.common.ubuntu: CONFIG_GPIO_SYSFS=y

However, this interface got deprecated for removal:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a0910d72afc69b25703f7be9bf7d13f18937a478
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fe95046e960b4b76e73dc1486955d93f47276134
"This marks the (optional) sysfs GPIO ABI as obsolete and schedules it for 
removal in 2020."

https://www.kernel.org/doc/Documentation/gpio/sysfs.txt
"THIS ABI IS DEPRECATED, THE ABI DOCUMENTATION HAS BEEN MOVED TO 
Documentation/ABI/obsolete/sysfs-gpio AND NEW USERSPACE CONSUMERS
ARE SUPPOSED TO USE THE CHARACTER DEVICE ABI. THIS OLD SYSFS ABI WILL
NOT BE DEVELOPED (NO NEW FEATURES), IT WILL JUST BE MAINTAINED."

libgpiod and the use of a character file-based interface is a
replacement to the sysfs interface:

https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/


Those two interfaces cannot be used interchangeably and working via libgpiod is 
not possible when the sysfs interface is used:

sudo gpioget gpiochip0 12
gpioget: error reading GPIO values: Device or resource busy

sudo gpioinfo  | grep 12
        line  12:     "GPIO12"      "sysfs"   input  active-high [used]


It would be good to switch to a newer interface since the old one does not get 
new features and there is no way to switch to libgpiod besides recompiling the 
kernel with "CONFIG_GPIO_SYSFS=n"

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1918583

Title:
  Switch to libgpiod and disable CONFIG_GPIO_SYSFS

Status in linux package in Ubuntu:
  New

Bug description:
  Ubuntu kernels are built with CONFIG_GPIO_SYSFS=y after
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1342153

  debian.master/config/config.common.ubuntu: CONFIG_GPIO_SYSFS=y

  However, this interface got deprecated for removal:

  
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a0910d72afc69b25703f7be9bf7d13f18937a478
  
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fe95046e960b4b76e73dc1486955d93f47276134
  "This marks the (optional) sysfs GPIO ABI as obsolete and schedules it for 
removal in 2020."

  https://www.kernel.org/doc/Documentation/gpio/sysfs.txt
  "THIS ABI IS DEPRECATED, THE ABI DOCUMENTATION HAS BEEN MOVED TO 
Documentation/ABI/obsolete/sysfs-gpio AND NEW USERSPACE CONSUMERS
  ARE SUPPOSED TO USE THE CHARACTER DEVICE ABI. THIS OLD SYSFS ABI WILL
  NOT BE DEVELOPED (NO NEW FEATURES), IT WILL JUST BE MAINTAINED."

  libgpiod and the use of a character file-based interface is a
  replacement to the sysfs interface:

  https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/

  
  Those two interfaces cannot be used interchangeably and working via libgpiod 
is not possible when the sysfs interface is used:

  sudo gpioget gpiochip0 12
  gpioget: error reading GPIO values: Device or resource busy

  sudo gpioinfo  | grep 12
        line  12:     "GPIO12"      "sysfs"   input  active-high [used]

  
  It would be good to switch to a newer interface since the old one does not 
get new features and there is no way to switch to libgpiod besides recompiling 
the kernel with "CONFIG_GPIO_SYSFS=n"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1918583/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to