I am working on exposing the GPIO/LEDs to sysfs interface for a new Mediatek device (i.e.; control via /sys/class/leds/). Though all the supporting driver modules are compiled (including led-class.c), there are no entries registered at /sys/class/leds/. Is there any specific driver module needed to be patched for leds to expose the control to sysfs?
Check your dts file.
Thanks for the reply. But there is no dts file for this device, and it follows the approach of using "platform_device_register" API. Now that I have both the driver and device registered as shown below,
alarmtimer leds-gpio rt3xxx-ehci rt3xxx-ohci
root@OpenWrt:/sys/bus/platform/devices# cd leds-gpio
driver modalias uevent
Now, Im not sure on how to allocate the resources (i.e; number of leds tied to gpio) so that it falls under /sys/class/leds. Can you please help me out here!