linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Creating sysfs brightness for every led channels
@ 2016-09-05 18:32 Raul Piper
  2016-09-07 20:27 ` Jacek Anaszewski
  0 siblings, 1 reply; 4+ messages in thread
From: Raul Piper @ 2016-09-05 18:32 UTC (permalink / raw)
  To: linux-leds, kernelnewbies

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

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Creating sysfs brightness for every led channels
@ 2016-09-05 18:27 Raul Piper
  0 siblings, 0 replies; 4+ messages in thread
From: Raul Piper @ 2016-09-05 18:27 UTC (permalink / raw)
  To: linux-leds, kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 796 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1152 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-08 19:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05 18:32 Creating sysfs brightness for every led channels Raul Piper
2016-09-07 20:27 ` Jacek Anaszewski
     [not found]   ` <CAEwN+MBdfu+n60U6J-prhCzETV=NJDC3Zfs3dGJTL9HFhj_2Kw@mail.gmail.com>
2016-09-08 19:17     ` Jacek Anaszewski
  -- strict thread matches above, loose matches on Subject: below --
2016-09-05 18:27 Raul Piper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).