I’ve been using the sysfs GPIO interface (i.e., writing/reading to files under /sys/class/gpio directory), but the documentation below says I should probably just be using the leds-gpio and gpio_keys kernel drivers for LEDs and buttons.
There’s a linux/leds.h and linux/gpio_keys.h in the kernel source code, but are these useable in normal user code? If so, how? (They aren’t copied to any of the standard include directories). Or are they just meant for use in making drivers. Can I make a driver and add it to the kernel without having to reflash my board? In case it’s not obvious, I have no experience messing with kernels.