Public bug reported:

The current versions of gpiod, libgpiod-dev and libgpiod2 (1.6.2-1) use
version 1 of the GPIO character device API. However, they cannot work
because the interface is disabled in the default kernel (tested with
5.13.19). After rebuilding the kernel with the option
CONFIG_GPIO_CDEV_V1=y, the gpiod tools work as expected.


What I expect to happen:

$ gpiodetect 
gpiochip0 [0-003c] (8 lines)
$ gpioinfo
gpiochip0 - 8 lines:
        line   0:      unnamed       unused  output  active-high 
        line   1:      unnamed       unused  output  active-high 
        line   2:      unnamed       unused  output  active-high 
        line   3:      unnamed       unused  output  active-high 
        line   4:      unnamed       unused  output  active-high 
        line   5:      unnamed       unused  output  active-high 
        line   6:      unnamed       unused   input  active-high 
        line   7:      unnamed       unused   input  active-high
$ gpioget gpiochip0 0
1

What actually happens:

$ gpiodetect
gpiochip0 [0-003c] (8 lines)
$ gpioinfo
gpioinfo: error creating line iterator: Invalid argument
$ gpioget gpiochip0 0
gpioget: error reading GPIO values: Invalid argument


$ cat /proc/version_signature 
Ubuntu 5.13.0-22.22-lowlatency 5.13.19

$ apt-cache policy libgpiod2
libgpiod2:
  Installed: 1.6.2-1
  Candidate: 1.6.2-1
  Version table:
 *** 1.6.2-1 500
        500 http://de.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
        100 /var/lib/dpkg/status

I am testing with the onboard PCA9554A on a Fujitsu D3641-S motherboard.

$ lspci | grep -i smb
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
$ lspci -s 1f.4 -vvv
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
        DeviceName: Onboard - Other
        Subsystem: Fujitsu Technology Solutions Cannon Lake PCH SMBus Controller
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at 6013106000 (64-bit, non-prefetchable) [size=256]
        Region 4: I/O ports at efa0 [size=32]
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801

** 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/1953613

Title:
  GPIO character device API not enabled in kernel

Status in linux package in Ubuntu:
  New

Bug description:
  The current versions of gpiod, libgpiod-dev and libgpiod2 (1.6.2-1)
  use version 1 of the GPIO character device API. However, they cannot
  work because the interface is disabled in the default kernel (tested
  with 5.13.19). After rebuilding the kernel with the option
  CONFIG_GPIO_CDEV_V1=y, the gpiod tools work as expected.

  
  What I expect to happen:

  $ gpiodetect 
  gpiochip0 [0-003c] (8 lines)
  $ gpioinfo
  gpiochip0 - 8 lines:
        line   0:      unnamed       unused  output  active-high 
        line   1:      unnamed       unused  output  active-high 
        line   2:      unnamed       unused  output  active-high 
        line   3:      unnamed       unused  output  active-high 
        line   4:      unnamed       unused  output  active-high 
        line   5:      unnamed       unused  output  active-high 
        line   6:      unnamed       unused   input  active-high 
        line   7:      unnamed       unused   input  active-high
  $ gpioget gpiochip0 0
  1

  What actually happens:

  $ gpiodetect
  gpiochip0 [0-003c] (8 lines)
  $ gpioinfo
  gpioinfo: error creating line iterator: Invalid argument
  $ gpioget gpiochip0 0
  gpioget: error reading GPIO values: Invalid argument

  
  $ cat /proc/version_signature 
  Ubuntu 5.13.0-22.22-lowlatency 5.13.19

  $ apt-cache policy libgpiod2
  libgpiod2:
    Installed: 1.6.2-1
    Candidate: 1.6.2-1
    Version table:
   *** 1.6.2-1 500
          500 http://de.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
          100 /var/lib/dpkg/status

  I am testing with the onboard PCA9554A on a Fujitsu D3641-S
  motherboard.

  $ lspci | grep -i smb
  00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
  $ lspci -s 1f.4 -vvv
  00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
        DeviceName: Onboard - Other
        Subsystem: Fujitsu Technology Solutions Cannon Lake PCH SMBus Controller
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at 6013106000 (64-bit, non-prefetchable) [size=256]
        Region 4: I/O ports at efa0 [size=32]
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1953613/+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