Hi,
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,
root@OpenWrt:/sys/bus/platform/drivers# ls
alarmtimer leds-gpio
root@OpenWrt:/sys/bus/platform/devices# ls
alarmtimer leds-gpio rt3xxx-ehci rt3xxx-ohci
root@OpenWrt:/sys/bus/platform/devices# cd leds-gpio
root@OpenWrt:/sys/devices/platform/leds-gpio# ls
driver modalias uevent
driver_override subsystem
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!