how to manipulate the LEDs on the BBB via GPIO?

i'm sure i'm overlooking something simple but can one manipulate the
LEDs on the BBB using straight GPIO? first, i can verify the LEDs

# cat /sys/kernel/debug/gpio
GPIOs 0-31, gpio:

GPIOs 32-63, gpio:
gpio-52 (eMMC_RSTn ) out lo
gpio-53 (beaglebone:green:usr) out lo
gpio-54 (beaglebone:green:usr) out lo
gpio-55 (beaglebone:green:usr) out hi
gpio-56 (beaglebone:green:usr) out lo
gpio-59 (McASP Clock Enable P) out hi

GPIOs 64-95, gpio:

GPIOs 96-127, gpio:

It never worked like that.

ok, then i'm misremembering. so i'm assuming going through
/sys/class/leds/ is the proper userspace access. thanks.



as long as the specific gpio (54 in your example) is declared as “in use” but the “GPIO LED” driver, you will not be able to access it via to the gpio sysfs entry, only via the leds sysfs entry. if you remove the “gpio leds” driver definition for the specific GPIO, it will be can exported and accessed via the gpio sysfs entries instead. one or the other - not both…


i twigged to that fairly quickly once i finally woke up ... i'd
mentally combined a number of different tutorials and blog posts about
playing with LEDs and had amalgamated the LED class with the GPIO
class. i'm ok now.