devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] leds: pm8058: add device tree bindings
@ 2016-06-29 14:21 Linus Walleij
  2016-06-29 18:38 ` Stephen Boyd
  2016-06-30  8:24 ` Jacek Anaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2016-06-29 14:21 UTC (permalink / raw)
  To: Jacek Anaszewski, Richard Purdie
  Cc: linux-leds, Linus Walleij, devicetree, linux-arm-msm, Andy Gross,
	Stephen Boyd, Bjorn Andersson

This adds the device tree bindings for the PM8058 LEDs.

Cc: devicetree@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 .../devicetree/bindings/leds/leds-pm8058.txt       | 67 ++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-pm8058.txt

diff --git a/Documentation/devicetree/bindings/leds/leds-pm8058.txt b/Documentation/devicetree/bindings/leds/leds-pm8058.txt
new file mode 100644
index 000000000000..5d4e6369b9f6
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-pm8058.txt
@@ -0,0 +1,67 @@
+Qualcomm PM8058 LED driver
+
+The Qualcomm PM8058 is a multi-functional device which contain
+a LED driver block for up to six LEDs: three normal LEDs, two
+"flash" LEDs and one "keypad backlight" LED. The names are
+quoted because sometimes these LED drivers are used for wildly
+different things than flash or keypad backlight: their names
+are more of a suggestion than a hard-wired usecase.
+
+Hardware-wise the different LEDs support slightly different
+output currents. The "flash" LEDs do not need to charge nor
+do they support external triggers. They are just powerful LED
+drivers.
+
+The LEDs appear as children to the PM8058 device, with the
+proper compatible string. For the PM8058 bindings see:
+mfd/qcom-pm8xxx.txt.
+
+Each LED is represented as a sub-node of the syscon device. Each
+node's name represents the name of the corresponding LED.
+
+LED sub-node properties:
+
+Required properties:
+- compatible: on of
+  "qcom,pm8058-led" (for the normal LEDs at 0x131, 0x132 and 0x133)
+  "qcom,pm8058-keypad-led" (for the "keypad" LED at 0x48)
+  "qcom,pm8058-flash-led" (for the "flash" LEDs at 0x49 and 0xFB)
+
+Optional properties:
+- label: descriptive name for the LED see common.txt
+- default-state: The initial state of the LED see common.txt
+- linux,default-trigger: Linux trigger, see common.txt
+
+Example:
+
+qcom,ssbi@500000 {
+	pmicintc: pmic@0 {
+		compatible = "qcom,pm8058";
+		led@48 {
+			compatible = "qcom,pm8058-keypad-led";
+			reg = <0x48>;
+			label = "keypad";
+			default-state = "off";
+		};
+		led@131 {
+			compatible = "qcom,pm8058-led";
+			reg = <0x131>;
+			label = "pm8058:red";
+			default-state = "off";
+		};
+		led@132 {
+			compatible = "qcom,pm8058-led";
+			reg = <0x132>;
+			label = "pm8058:yellow";
+			default-state = "off";
+			linux,default-trigger = "mmc0";
+		};
+		led@133 {
+			compatible = "qcom,pm8058-led";
+			reg = <0x133>;
+			label = "pm8058:green";
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+};
-- 
2.4.11

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/3] leds: pm8058: add device tree bindings
  2016-06-29 14:21 [PATCH 1/3] leds: pm8058: add device tree bindings Linus Walleij
@ 2016-06-29 18:38 ` Stephen Boyd
  2016-06-30  8:24 ` Jacek Anaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2016-06-29 18:38 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Jacek Anaszewski, Richard Purdie, linux-leds, devicetree,
	linux-arm-msm, Andy Gross, Bjorn Andersson

On 06/29, Linus Walleij wrote:
> diff --git a/Documentation/devicetree/bindings/leds/leds-pm8058.txt b/Documentation/devicetree/bindings/leds/leds-pm8058.txt
> new file mode 100644
> index 000000000000..5d4e6369b9f6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-pm8058.txt
> @@ -0,0 +1,67 @@
> +Qualcomm PM8058 LED driver
> +
> +The Qualcomm PM8058 is a multi-functional device which contain

s/contain/contains/

> +a LED driver block for up to six LEDs: three normal LEDs, two

s/a/an/

> +"flash" LEDs and one "keypad backlight" LED. The names are
> +quoted because sometimes these LED drivers are used for wildly
> +different things than flash or keypad backlight: their names
> +are more of a suggestion than a hard-wired usecase.
> +
> +Hardware-wise the different LEDs support slightly different
> +output currents. The "flash" LEDs do not need to charge nor
> +do they support external triggers. They are just powerful LED
> +drivers.
> +
> +The LEDs appear as children to the PM8058 device, with the
> +proper compatible string. For the PM8058 bindings see:
> +mfd/qcom-pm8xxx.txt.
> +
> +Each LED is represented as a sub-node of the syscon device. Each
> +node's name represents the name of the corresponding LED.
> +
> +LED sub-node properties:
> +
> +Required properties:
> +- compatible: on of

s/on/one/

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/3] leds: pm8058: add device tree bindings
  2016-06-29 14:21 [PATCH 1/3] leds: pm8058: add device tree bindings Linus Walleij
  2016-06-29 18:38 ` Stephen Boyd
@ 2016-06-30  8:24 ` Jacek Anaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Jacek Anaszewski @ 2016-06-30  8:24 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Richard Purdie, linux-leds, devicetree, linux-arm-msm, Andy Gross,
	Stephen Boyd, Bjorn Andersson

Hi Linus,

Thanks for the patch.

On 06/29/2016 04:21 PM, Linus Walleij wrote:
> This adds the device tree bindings for the PM8058 LEDs.
>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: Andy Gross <andy.gross@linaro.org>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>   .../devicetree/bindings/leds/leds-pm8058.txt       | 67 ++++++++++++++++++++++
>   1 file changed, 67 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/leds/leds-pm8058.txt
>
> diff --git a/Documentation/devicetree/bindings/leds/leds-pm8058.txt b/Documentation/devicetree/bindings/leds/leds-pm8058.txt
> new file mode 100644
> index 000000000000..5d4e6369b9f6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-pm8058.txt
> @@ -0,0 +1,67 @@
> +Qualcomm PM8058 LED driver
> +
> +The Qualcomm PM8058 is a multi-functional device which contain
> +a LED driver block for up to six LEDs: three normal LEDs, two
> +"flash" LEDs and one "keypad backlight" LED. The names are
> +quoted because sometimes these LED drivers are used for wildly
> +different things than flash or keypad backlight: their names
> +are more of a suggestion than a hard-wired usecase.
> +
> +Hardware-wise the different LEDs support slightly different
> +output currents. The "flash" LEDs do not need to charge nor
> +do they support external triggers. They are just powerful LED
> +drivers.
> +
> +The LEDs appear as children to the PM8058 device, with the
> +proper compatible string. For the PM8058 bindings see:
> +mfd/qcom-pm8xxx.txt.
> +
> +Each LED is represented as a sub-node of the syscon device. Each
> +node's name represents the name of the corresponding LED.
> +
> +LED sub-node properties:
> +
> +Required properties:
> +- compatible: on of
> +  "qcom,pm8058-led" (for the normal LEDs at 0x131, 0x132 and 0x133)
> +  "qcom,pm8058-keypad-led" (for the "keypad" LED at 0x48)
> +  "qcom,pm8058-flash-led" (for the "flash" LEDs at 0x49 and 0xFB)
> +
> +Optional properties:
> +- label: descriptive name for the LED see common.txt

Please use just "see Documentation/devicetree/bindings/leds/common.txt"
as a description of this property.

> +- default-state: The initial state of the LED see common.txt

Please use just "Documentation/devicetree/bindings/leds/leds-gpio.txt"
as a description of this property.

> +- linux,default-trigger: Linux trigger, see common.txt

Please use just "see Documentation/devicetree/bindings/leds/common.txt"
as a description of this property.

> +
> +Example:
> +
> +qcom,ssbi@500000 {
> +	pmicintc: pmic@0 {
> +		compatible = "qcom,pm8058";
> +		led@48 {
> +			compatible = "qcom,pm8058-keypad-led";
> +			reg = <0x48>;
> +			label = "keypad";
> +			default-state = "off";
> +		};
> +		led@131 {
> +			compatible = "qcom,pm8058-led";
> +			reg = <0x131>;
> +			label = "pm8058:red";
> +			default-state = "off";
> +		};
> +		led@132 {
> +			compatible = "qcom,pm8058-led";
> +			reg = <0x132>;
> +			label = "pm8058:yellow";
> +			default-state = "off";
> +			linux,default-trigger = "mmc0";
> +		};
> +		led@133 {
> +			compatible = "qcom,pm8058-led";
> +			reg = <0x133>;
> +			label = "pm8058:green";
> +			default-state = "on";
> +			linux,default-trigger = "heartbeat";
> +		};
> +	};
> +};
>


-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-30  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-29 14:21 [PATCH 1/3] leds: pm8058: add device tree bindings Linus Walleij
2016-06-29 18:38 ` Stephen Boyd
2016-06-30  8:24 ` 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).