Hello,
We have developed one custom driver module and its working fine. Now we have blink,ON,OFF led on different conditions in the drivers. We know the conditions. But unable to understand how to drive the LEDS in the driver?
We are able to ON/OFF LED using the /sys/class/ interface.
But how we can do in the drivers with LED API, which directly control the LED.
Also we define the leds in the device tree. How use this in the driver.?
leds {
compatible = "gpio-leds"
led1 {
lable="led_red";
gpios = <&gpio2 4 0>;
}
Not looking to use triggers also.
Can anyone give pointers how to do that ? any referance code .
Thanks,
Surendra