Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1536767 > unrolled thread
| Started by | Rafał Miłecki <zajec5@gmail.com> |
|---|---|
| First post | 2016-12-06 09:40 +0100 |
| Last post | 2016-12-06 12:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] DT: leds: Improve examples by adding some context Rafał Miłecki <zajec5@gmail.com> - 2016-12-06 09:40 +0100
Re: [PATCH] DT: leds: Improve examples by adding some context Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-12-06 12:40 +0100
| From | Rafał Miłecki <zajec5@gmail.com> |
|---|---|
| Date | 2016-12-06 09:40 +0100 |
| Subject | [PATCH] DT: leds: Improve examples by adding some context |
| Message-ID | <sLjs5-87p-11@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Jacek Anaszewski <j.anaszewski@samsung.com> |
|---|---|
| Date | 2016-12-06 12:40 +0100 |
| Message-ID | <sLmgh-1pV-15@gated-at.bofh.it> |
| In reply to | #1536767 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web