Menu

#163 /sys/class/gpio gone away in linux kernel 6.6

none
New
nobody
gpio (1)
Medium
Defect
2024-05-11
2024-04-10
No

A command of this form worked perfectly on Raspberry Pi OS with kernel 6.1.x:

stm32flash -b 9600 -i '21&20,-20,,:-21,20,-20'  /dev/ttyAMA4 -w L051.hex

Now on kernel 6.6.x (default for Raspberry Pi OS), it generates an error something like:
error writing in file "/sys/class/gpio/export"

It seems that GPIO sysfs is going away, and thus the -i option will become unusable. Users may have to resort to using the pinctrl command to put the chips in Boot mode.

Discussion

  • Tormod Volden

    Tormod Volden - 2024-04-10

    We have a merge request for using libgpiod in https://sourceforge.net/p/stm32flash/code/merge-requests/13/

     
  • Guillermo

    Guillermo - 2024-04-29

    GPIO sysfs is still available in current kernels, even though it is deprecated. The default RPi kernel may have disabled it but that does not mean it has gone away.

     
    👍
    1
  • Tormod Volden

    Tormod Volden - 2024-05-11

    FWIW, I have added RPi-specific information about this to the Hints section in the wiki, with a contributed pinctrl example.

     

Anonymous
Anonymous

Add attachments
Cancel