lkml.org 
[lkml]   [2021]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] leds: leds-dual-gpio: Add dual GPIO LEDs driver
Date
> 
> Sorry, leds-regulator has only a binary state LED.
>
> Maybe you could extend leds-regulator to be able to use all regulator states?
>
> Or you can extend leds-gpio driver to support N states via log N gpios,
> instead of adding new driver.

It seems a good idea to extend leds-gpio, so in my case, I should have such dts:

63 leds {
64 compatible = "gpio-leds";
65
66 recording_front {
67 label = "recording_front:red";
68 gpios = <&gpio 130 GPIO_ACTIVE_HIGH>, <&gpio 129 GPIO_ACTIVE_HIGH>;
69 default-state = "off";
70 };
71 };

For my case, two leds is enough, but it sill easy to extend the support number bigger than two. And the length of gpios array is not fixed, so it could compatible with exist "gpio-leds" dts, right?

If this idea work, should I create a new commit or still in this track (V2)?

Best Regards,
Hermes

>
> Marek

\
 
 \ /
  Last update: 2021-03-12 05:51    [W:0.065 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site