From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: "N?colas F. R. A. Prado" <nfraprado@protonmail.com>
Cc: Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
Andy Gross <agross@kernel.org>, Rob Herring <robh+dt@kernel.org>,
linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
Brian Masney <masneyb@onstation.org>, Luca Weiss <luca@z3ntu.xyz>,
Russell King <linux@armlinux.org.uk>,
Georgi Djakov <georgi.djakov@linaro.org>,
linux-kernel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com
Subject: Re: [PATCH v2 4/4] ARM: dts: qcom: pm8941: Add nodes for QCOM SPMI Flash LEDs
Date: Wed, 27 Jan 2021 08:32:28 -0600 [thread overview]
Message-ID: <YBF5fPD8Mq0K8XDn@builder.lan> (raw)
In-Reply-To: <20210126140240.1517044-5-nfraprado@protonmail.com>
On Tue 26 Jan 08:06 CST 2021, N?colas F. R. A. Prado wrote:
> Add the necessary devicetree nodes for the Qualcomm SPMI Flash LEDs
> present in PM8941.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com>
> ---
> Changes in v2:
> - Moved from hammerhead dts to pm8941 dtsi, as it was this way downstream
> - Now using values from leds-qcom-spmi-flash.h
>
> arch/arm/boot/dts/qcom-pm8941.dtsi | 38 ++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
> index c1f2012d1c8b..89309d3c777c 100644
> --- a/arch/arm/boot/dts/qcom-pm8941.dtsi
> +++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
> @@ -2,6 +2,8 @@
> #include <dt-bindings/iio/qcom,spmi-vadc.h>
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/spmi/spmi.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/leds/leds-qcom-spmi-flash.h>
>
> &spmi_bus {
>
> @@ -189,5 +191,41 @@ pm8941_5vs2: 5vs2 {
> regulator-initial-mode = <1>;
> };
> };
> +
> + qcom,spmi-flash@d300 {
Please avoid "qcom," in the node names.
> + status = "okay";
The "default" status is "okay", so no need to specify that if you're not
disabling it. That said, there are 8974 devices without flash LED...
> +
> + compatible = "qcom,spmi-flash";
> + reg = <0xd300 0x100>;
> + flash-boost-supply = <&pm8941_5vs1>;
> + torch-boost-supply = <&pm8941_5v>;
> + pm8941_flash0: led0 {
> + led-sources = <0>;
> + function = LED_FUNCTION_FLASH;
> + color = <LED_COLOR_ID_WHITE>;
> + led-max-microamp = <200000>;
> + flash-max-microamp = <1000000>;
> + flash-max-timeout-us = <1280000>;
> + default-state = "off";
> + qcom,clamp-curr = <200000>;
> + qcom,headroom = <QCOM_SPMI_FLASH_HEADROOM_500MV>;
> + qcom,startup-dly = <QCOM_SPMI_FLASH_STARTUP_DLY_128US>;
> + qcom,safety-timer;
...and I would expect that at least some of these properties should be
tweaked/tuned/reviewed for each device.
So it would probably be a good idea to make the spmi-flash status
"disabled" and move some of these properties to the product .dts.
Regards,
Bjorn
> + };
> +
> + pm8941_flash1: led1 {
> + led-sources = <1>;
> + function = LED_FUNCTION_FLASH;
> + color = <LED_COLOR_ID_WHITE>;
> + led-max-microamp = <200000>;
> + flash-max-microamp = <1000000>;
> + flash-max-timeout-us = <1280000>;
> + default-state = "off";
> + qcom,clamp-curr = <200000>;
> + qcom,headroom = <QCOM_SPMI_FLASH_HEADROOM_500MV>;
> + qcom,startup-dly = <QCOM_SPMI_FLASH_STARTUP_DLY_128US>;
> + qcom,safety-timer;
> + };
> + };
> };
> };
> --
> 2.30.0
>
>
next prev parent reply other threads:[~2021-01-27 14:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 14:03 [PATCH v2 0/4] Add support for QCOM SPMI Flash LEDs Nícolas F. R. A. Prado
2021-01-26 14:04 ` [PATCH v2 1/4] dt-bindings: leds: Add binding for qcom-spmi-flash Nícolas F. R. A. Prado
2021-01-27 14:00 ` Rob Herring
2021-01-27 14:28 ` Bjorn Andersson
2021-01-30 20:32 ` Jacek Anaszewski
2021-01-26 14:05 ` [PATCH v2 2/4] leds: Add driver for QCOM SPMI Flash LEDs Nícolas F. R. A. Prado
2021-01-27 4:23 ` Bjorn Andersson
2021-01-30 20:37 ` Jacek Anaszewski
2021-02-19 11:02 ` Pavel Machek
2021-02-21 11:28 ` Jacek Anaszewski
2021-04-25 20:19 ` Pavel Machek
2021-02-19 11:01 ` Pavel Machek
2021-01-26 14:06 ` [PATCH v2 3/4] ARM: qcom_defconfig: Enable " Nícolas F. R. A. Prado
2021-01-27 14:29 ` Bjorn Andersson
2021-01-26 14:06 ` [PATCH v2 4/4] ARM: dts: qcom: pm8941: Add nodes for " Nícolas F. R. A. Prado
2021-01-27 14:32 ` Bjorn Andersson [this message]
2021-01-30 20:31 ` [PATCH v2 0/4] Add support " Jacek Anaszewski
2021-02-19 11:04 ` Pavel Machek
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=YBF5fPD8Mq0K8XDn@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=andrealmeid@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=dmurphy@ti.com \
--cc=georgi.djakov@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lkcamp@lists.libreplanetbr.org \
--cc=luca@z3ntu.xyz \
--cc=masneyb@onstation.org \
--cc=nfraprado@protonmail.com \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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).