Thread (4 messages) flat view 4 messages, 2 authors, 2016-09-08

Creating sysfs brightness for every led channels

From: Raul Piper <hidden>
Date: 2016-09-05 18:32:20
Also in: linux-leds

Hi,
I am trying to send the brightness value ( for 5 channels) by
 echo "val1val2val3val4val5" > brightness ,
But seems like even if I change the brightness type to enum or int in
my driver ,I will never be able to send the brightness string because
led class defines the brightness value as enum.

extern void led_set_brightness(struct led_classdev *led_cdev,
enum led_brightness brightness);

Only possible way I am finding is to create attributes for each
channel like brightness,default trigger,max_brightness and any user
defined attributes, but i am not getting how to do this.
Can some on please comment or post the link to the example driver.
Do i have to call led_class_register for every channel and I have to
define every channel in the device tree?
Thanks in advance !
Regards,
Rp
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help