* [PATCH 2/4] devicetree: Update led binding [not found] <20190701151423.30768-1-jjhiblot@ti.com> @ 2019-07-01 15:14 ` Jean-Jacques Hiblot 2019-07-01 15:20 ` Dan Murphy 2019-07-01 15:14 ` [PATCH 4/4] devicetree: Add led-backlight binding Jean-Jacques Hiblot 1 sibling, 1 reply; 6+ messages in thread From: Jean-Jacques Hiblot @ 2019-07-01 15:14 UTC (permalink / raw) To: jacek.anaszewski, pavel, robh+dt, mark.rutland, lee.jones, daniel.thompson, jingoohan1 Cc: dmurphy, linux-leds, linux-kernel, dri-devel, tomi.valkeinen, Jean-Jacques Hiblot, devicetree Update the led binding to describe the possibility to add a "compatible" option to create a child-device, user of the LED. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Cc: devicetree@vger.kernel.org --- Documentation/devicetree/bindings/leds/common.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt index 70876ac11367..2f7882528d97 100644 --- a/Documentation/devicetree/bindings/leds/common.txt +++ b/Documentation/devicetree/bindings/leds/common.txt @@ -11,6 +11,9 @@ have to be tightly coupled with the LED device binding. They are represented by child nodes of the parent LED device binding. Optional properties for child nodes: +- compatible : driver name for a child-device. This child-device is the user + of the LED. It is created when the LED is registered and + destroyed when the LED is unregistered. - led-sources : List of device current outputs the LED is connected to. The outputs are identified by the numbers that must be defined in the LED device binding documentation. -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/4] devicetree: Update led binding 2019-07-01 15:14 ` [PATCH 2/4] devicetree: Update led binding Jean-Jacques Hiblot @ 2019-07-01 15:20 ` Dan Murphy 0 siblings, 0 replies; 6+ messages in thread From: Dan Murphy @ 2019-07-01 15:20 UTC (permalink / raw) To: Jean-Jacques Hiblot, jacek.anaszewski, pavel, robh+dt, mark.rutland, lee.jones, daniel.thompson, jingoohan1 Cc: linux-leds, linux-kernel, dri-devel, tomi.valkeinen, devicetree JJ On 7/1/19 10:14 AM, Jean-Jacques Hiblot wrote: > Update the led binding to describe the possibility to add a "compatible" > option to create a child-device, user of the LED. > > Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> > Cc: devicetree@vger.kernel.org > --- > Documentation/devicetree/bindings/leds/common.txt | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > index 70876ac11367..2f7882528d97 100644 > --- a/Documentation/devicetree/bindings/leds/common.txt > +++ b/Documentation/devicetree/bindings/leds/common.txt > @@ -11,6 +11,9 @@ have to be tightly coupled with the LED device binding. They are represented > by child nodes of the parent LED device binding. > > Optional properties for child nodes: > +- compatible : driver name for a child-device. This child-device is the user > + of the LED. It is created when the LED is registered and > + destroyed when the LED is unregistered. Can you update the example to show usage? Dan > - led-sources : List of device current outputs the LED is connected to. The > outputs are identified by the numbers that must be defined > in the LED device binding documentation. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4/4] devicetree: Add led-backlight binding [not found] <20190701151423.30768-1-jjhiblot@ti.com> 2019-07-01 15:14 ` [PATCH 2/4] devicetree: Update led binding Jean-Jacques Hiblot @ 2019-07-01 15:14 ` Jean-Jacques Hiblot 2019-07-02 9:58 ` Daniel Thompson 2019-07-05 10:11 ` Pavel Machek 1 sibling, 2 replies; 6+ messages in thread From: Jean-Jacques Hiblot @ 2019-07-01 15:14 UTC (permalink / raw) To: jacek.anaszewski, pavel, robh+dt, mark.rutland, lee.jones, daniel.thompson, jingoohan1 Cc: dmurphy, linux-leds, linux-kernel, dri-devel, tomi.valkeinen, Jean-Jacques Hiblot, devicetree From: Tomi Valkeinen <tomi.valkeinen@ti.com> Add DT binding for led-backlight. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Cc: devicetree@vger.kernel.org --- .../video/backlight/led-backlight.txt | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/backlight/led-backlight.txt diff --git a/Documentation/devicetree/bindings/video/backlight/led-backlight.txt b/Documentation/devicetree/bindings/video/backlight/led-backlight.txt new file mode 100644 index 000000000000..216cd52d624a --- /dev/null +++ b/Documentation/devicetree/bindings/video/backlight/led-backlight.txt @@ -0,0 +1,39 @@ +led-backlight bindings + +The node of the backlight driver IS the node of the LED. + +Required properties: + - compatible: "led-backlight" + - brightness-levels: Array of distinct LED brightness levels. These + are in the range from 0 to 255, passed to the LED class driver. + - default-brightness-level: the default brightness level (index into the + array defined by the "brightness-levels" property) + +Optional properties: + - power-supply: regulator for supply voltage + - enable-gpios: contains a single GPIO specifier for the GPIO which enables + and disables the backlight (see GPIO binding[0]) + +[0]: Documentation/devicetree/bindings/gpio/gpio.txt + +Example: + +led_ctrl { + red_led@1 { + label = "red"; + reg = <1>; + } + + backlight_led@2 { + function = LED_FUNCTION_BACKLIGHT; + reg = <2>; + + compatible = "led-backlight"; + + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + + power-supply = <&vdd_bl_reg>; + enable-gpios = <&gpio 58 0>; + }; +}; -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] devicetree: Add led-backlight binding 2019-07-01 15:14 ` [PATCH 4/4] devicetree: Add led-backlight binding Jean-Jacques Hiblot @ 2019-07-02 9:58 ` Daniel Thompson 2019-07-02 11:11 ` Jean-Jacques Hiblot 2019-07-05 10:11 ` Pavel Machek 1 sibling, 1 reply; 6+ messages in thread From: Daniel Thompson @ 2019-07-02 9:58 UTC (permalink / raw) To: Jean-Jacques Hiblot Cc: mark.rutland, devicetree, jingoohan1, tomi.valkeinen, linux-kernel, dri-devel, robh+dt, jacek.anaszewski, pavel, lee.jones, linux-leds, dmurphy On Mon, Jul 01, 2019 at 05:14:23PM +0200, Jean-Jacques Hiblot wrote: > From: Tomi Valkeinen <tomi.valkeinen@ti.com> > > Add DT binding for led-backlight. I think the patchset is in the wrong order; the DT bindings documentation should appear *before* the binding is implemented (amoung other things this prevent transient checkpatch warnings as the patchset is applied). > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> > Cc: devicetree@vger.kernel.org > --- > .../video/backlight/led-backlight.txt | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) > create mode 100644 Documentation/devicetree/bindings/video/backlight/led-backlight.txt > > diff --git a/Documentation/devicetree/bindings/video/backlight/led-backlight.txt b/Documentation/devicetree/bindings/video/backlight/led-backlight.txt > new file mode 100644 > index 000000000000..216cd52d624a > --- /dev/null > +++ b/Documentation/devicetree/bindings/video/backlight/led-backlight.txt > @@ -0,0 +1,39 @@ > +led-backlight bindings > + > +The node of the backlight driver IS the node of the LED. > + > +Required properties: > + - compatible: "led-backlight" > + - brightness-levels: Array of distinct LED brightness levels. These > + are in the range from 0 to 255, passed to the LED class driver. > + - default-brightness-level: the default brightness level (index into the > + array defined by the "brightness-levels" property) I think brightness-levels and default-brightness-level could be optional properties since a default 1:1 mapping seems reasonable given how constrained the LED brightness values are. Daniel. > + > +Optional properties: > + - power-supply: regulator for supply voltage > + - enable-gpios: contains a single GPIO specifier for the GPIO which enables > + and disables the backlight (see GPIO binding[0]) > + > +[0]: Documentation/devicetree/bindings/gpio/gpio.txt > + > +Example: > + > +led_ctrl { > + red_led@1 { > + label = "red"; > + reg = <1>; > + } > + > + backlight_led@2 { > + function = LED_FUNCTION_BACKLIGHT; > + reg = <2>; > + > + compatible = "led-backlight"; > + > + brightness-levels = <0 4 8 16 32 64 128 255>; > + default-brightness-level = <6>; > + > + power-supply = <&vdd_bl_reg>; > + enable-gpios = <&gpio 58 0>; > + }; > +}; > -- > 2.17.1 > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] devicetree: Add led-backlight binding 2019-07-02 9:58 ` Daniel Thompson @ 2019-07-02 11:11 ` Jean-Jacques Hiblot 0 siblings, 0 replies; 6+ messages in thread From: Jean-Jacques Hiblot @ 2019-07-02 11:11 UTC (permalink / raw) To: Daniel Thompson Cc: jacek.anaszewski, pavel, robh+dt, mark.rutland, lee.jones, jingoohan1, dmurphy, linux-leds, linux-kernel, dri-devel, tomi.valkeinen, devicetree Daniel, On 02/07/2019 11:58, Daniel Thompson wrote: > On Mon, Jul 01, 2019 at 05:14:23PM +0200, Jean-Jacques Hiblot wrote: >> From: Tomi Valkeinen <tomi.valkeinen@ti.com> >> >> Add DT binding for led-backlight. > I think the patchset is in the wrong order; the DT bindings > documentation should appear *before* the binding is > implemented (amoung other things this prevent transient checkpatch > warnings as the patchset is applied). > ok >> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> >> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> >> Cc: devicetree@vger.kernel.org >> --- >> .../video/backlight/led-backlight.txt | 39 +++++++++++++++++++ >> 1 file changed, 39 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/video/backlight/led-backlight.txt >> >> diff --git a/Documentation/devicetree/bindings/video/backlight/led-backlight.txt b/Documentation/devicetree/bindings/video/backlight/led-backlight.txt >> new file mode 100644 >> index 000000000000..216cd52d624a >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/video/backlight/led-backlight.txt >> @@ -0,0 +1,39 @@ >> +led-backlight bindings >> + >> +The node of the backlight driver IS the node of the LED. >> + >> +Required properties: >> + - compatible: "led-backlight" >> + - brightness-levels: Array of distinct LED brightness levels. These >> + are in the range from 0 to 255, passed to the LED class driver. >> + - default-brightness-level: the default brightness level (index into the >> + array defined by the "brightness-levels" property) > I think brightness-levels and default-brightness-level could be > optional properties since a default 1:1 mapping seems reasonable given > how constrained the LED brightness values are. That is probably a good idea. Expect it in v2 Thanks, JJ > > > Daniel. > > >> + >> +Optional properties: >> + - power-supply: regulator for supply voltage >> + - enable-gpios: contains a single GPIO specifier for the GPIO which enables >> + and disables the backlight (see GPIO binding[0]) >> + >> +[0]: Documentation/devicetree/bindings/gpio/gpio.txt >> + >> +Example: >> + >> +led_ctrl { >> + red_led@1 { >> + label = "red"; >> + reg = <1>; >> + } >> + >> + backlight_led@2 { >> + function = LED_FUNCTION_BACKLIGHT; >> + reg = <2>; >> + >> + compatible = "led-backlight"; >> + >> + brightness-levels = <0 4 8 16 32 64 128 255>; >> + default-brightness-level = <6>; >> + >> + power-supply = <&vdd_bl_reg>; >> + enable-gpios = <&gpio 58 0>; >> + }; >> +}; >> -- >> 2.17.1 >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] devicetree: Add led-backlight binding 2019-07-01 15:14 ` [PATCH 4/4] devicetree: Add led-backlight binding Jean-Jacques Hiblot 2019-07-02 9:58 ` Daniel Thompson @ 2019-07-05 10:11 ` Pavel Machek 1 sibling, 0 replies; 6+ messages in thread From: Pavel Machek @ 2019-07-05 10:11 UTC (permalink / raw) To: Jean-Jacques Hiblot Cc: jacek.anaszewski, robh+dt, mark.rutland, lee.jones, daniel.thompson, jingoohan1, dmurphy, linux-leds, linux-kernel, dri-devel, tomi.valkeinen, devicetree Hi! > Add DT binding for led-backlight. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> > Cc: devicetree@vger.kernel.org > --- > +Required properties: > + - compatible: "led-backlight" > + - brightness-levels: Array of distinct LED brightness levels. These > + are in the range from 0 to 255, passed to the LED class driver. These days, we support more (or less) than 256 brightness levels for LED. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-07-05 10:11 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20190701151423.30768-1-jjhiblot@ti.com> 2019-07-01 15:14 ` [PATCH 2/4] devicetree: Update led binding Jean-Jacques Hiblot 2019-07-01 15:20 ` Dan Murphy 2019-07-01 15:14 ` [PATCH 4/4] devicetree: Add led-backlight binding Jean-Jacques Hiblot 2019-07-02 9:58 ` Daniel Thompson 2019-07-02 11:11 ` Jean-Jacques Hiblot 2019-07-05 10:11 ` Pavel Machek
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).