* [PATCH] DT: leds: Improve examples by adding some context @ 2016-12-06 8:32 ` Rafał Miłecki 2016-12-06 11:34 ` Jacek Anaszewski 0 siblings, 1 reply; 2+ messages in thread From: Rafał Miłecki @ 2016-12-06 8:32 UTC (permalink / raw) To: Richard Purdie, Jacek Anaszewski, linux-leds Cc: Rob Herring, Mark Rutland, devicetree, linux-kernel, Rafał Miłecki From: Rafał Miłecki <rafal@milecki.pl> During my work on some new LED trigger I tried adding example similar to the existing ones which received following comment from Rob: > It's not really clear in the example this is an LED node as it is > incomplete. Keeping that in mind I suggest adding context for the existing example entries in hope to make documentation more clear. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> --- Should this patch go through linux-leds tree? Richard, Jacek: would you take it? --- Documentation/devicetree/bindings/leds/common.txt | 28 +++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt index 696be57..24b6560 100644 --- a/Documentation/devicetree/bindings/leds/common.txt +++ b/Documentation/devicetree/bindings/leds/common.txt @@ -61,16 +61,24 @@ property can be omitted. Examples: -system-status { - label = "Status"; - linux,default-trigger = "heartbeat"; - ... +gpio-leds { + compatible = "gpio-leds"; + + system-status { + label = "Status"; + linux,default-trigger = "heartbeat"; + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + }; }; -camera-flash { - label = "Flash"; - led-sources = <0>, <1>; - led-max-microamp = <50000>; - flash-max-microamp = <320000>; - flash-max-timeout-us = <500000>; +max77693-led { + compatible = "maxim,max77693-led"; + + camera-flash { + label = "Flash"; + led-sources = <0>, <1>; + led-max-microamp = <50000>; + flash-max-microamp = <320000>; + flash-max-timeout-us = <500000>; + }; }; -- 2.10.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] DT: leds: Improve examples by adding some context 2016-12-06 8:32 ` [PATCH] DT: leds: Improve examples by adding some context Rafał Miłecki @ 2016-12-06 11:34 ` Jacek Anaszewski 0 siblings, 0 replies; 2+ messages in thread From: Jacek Anaszewski @ 2016-12-06 11:34 UTC (permalink / raw) To: Rafał Miłecki, Richard Purdie, linux-leds Cc: Rob Herring, Mark Rutland, devicetree, linux-kernel, Rafał Miłecki Hi Rafał, Thanks for the patch. On 12/06/2016 09:32 AM, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > During my work on some new LED trigger I tried adding example similar to > the existing ones which received following comment from Rob: >> It's not really clear in the example this is an LED node as it is >> incomplete. > > Keeping that in mind I suggest adding context for the existing example > entries in hope to make documentation more clear. > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > --- > Should this patch go through linux-leds tree? > > Richard, Jacek: would you take it? > --- > Documentation/devicetree/bindings/leds/common.txt | 28 +++++++++++++++-------- > 1 file changed, 18 insertions(+), 10 deletions(-) > > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > index 696be57..24b6560 100644 > --- a/Documentation/devicetree/bindings/leds/common.txt > +++ b/Documentation/devicetree/bindings/leds/common.txt > @@ -61,16 +61,24 @@ property can be omitted. > > Examples: > > -system-status { > - label = "Status"; > - linux,default-trigger = "heartbeat"; > - ... > +gpio-leds { > + compatible = "gpio-leds"; > + > + system-status { > + label = "Status"; > + linux,default-trigger = "heartbeat"; > + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; > + }; > }; > > -camera-flash { > - label = "Flash"; > - led-sources = <0>, <1>; > - led-max-microamp = <50000>; > - flash-max-microamp = <320000>; > - flash-max-timeout-us = <500000>; > +max77693-led { > + compatible = "maxim,max77693-led"; > + > + camera-flash { > + label = "Flash"; > + led-sources = <0>, <1>; > + led-max-microamp = <50000>; > + flash-max-microamp = <320000>; > + flash-max-timeout-us = <500000>; > + }; > }; > Although this file documents a sub-node properties it will be indeed useful to have the parent node in the example as well. Applied to the for-4.11 branch of linux-leds.git. -- Best regards, Jacek Anaszewski ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-06 11:36 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20161206083302epcas1p170eb3f7dd0ca9b86d580563605182225@epcas1p1.samsung.com> 2016-12-06 8:32 ` [PATCH] DT: leds: Improve examples by adding some context Rafał Miłecki 2016-12-06 11:34 ` Jacek Anaszewski
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).