Re: Creating sysfs brightness for every led channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Raul,

On 09/05/2016 08:32 PM, Raul Piper wrote:
Hi,
I am trying to send the brightness value ( for 5 channels) by
 echo "val1val2val3val4val5" > brightness ,

How did you infer this format?

Please get acquainted with Documentation/leds/leds-class.txt
and Documentation/ABI/testing/sysfs-class-led.

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.

One LED class device can control one channel.


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?

Just grep through drivers/leds and Documentation/devicetree/bindings/leds/.

--
Best regards,
Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux