devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Richard Purdie <rpurdie@rpsys.net>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, Andy Gross <andy.gross@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [PATCH 1/3 v2] leds: pm8058: add device tree bindings
Date: Thu, 07 Jul 2016 17:08:32 +0200	[thread overview]
Message-ID: <577E7070.80403@samsung.com> (raw)
In-Reply-To: <1467841320-11251-1-git-send-email-linus.walleij@linaro.org>

Hi Linus,

On 07/06/2016 11:42 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>
> ---
> ChangeLog v1->v2:
> - Fix some spelling mistakes
> - Reference common bindings directly without any local descriptions
> ---
>   .../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..ee070e23fe61
> --- /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 contains
> +an 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: one 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: see Documentation/devicetree/bindings/leds/common.txt
> +- default-state: see Documentation/devicetree/bindings/leds/common.txt
> +- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt
> +
> +Example:
> +
> +qcom,ssbi@500000 {
> +	pmicintc: pmic@0 {
> +		compatible = "qcom,pm8058";
> +		led@48 {
> +			compatible = "qcom,pm8058-keypad-led";
> +			reg = <0x48>;
> +			label = "keypad";

Why not "pm8058::keypad"?

Naming scheme is "devicename:colour:function".

See Documentation/leds/leds-class.txt.

> +			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

      reply	other threads:[~2016-07-07 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 21:42 [PATCH 1/3 v2] leds: pm8058: add device tree bindings Linus Walleij
2016-07-07 15:08 ` Jacek Anaszewski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577E7070.80403@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).