All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Kepplinger <martin.kepplinger@puri.sm>
To: festevam@gmail.com, shawnguo@kernel.org
Cc: martin.kepplinger@puri.sm, devicetree@vger.kernel.org,
	kernel@pengutronix.de, kernel@puri.sm, krzk@kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com,
	linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	robh@kernel.org, "Guido Günther" <agx@sigxcpu.org>
Subject: [PATCH v1 2/5] arm64: dts: imx8mq-librem5: add RGB pwmleds
Date: Wed, 31 Aug 2022 10:02:58 +0200	[thread overview]
Message-ID: <20220831080301.1092737-3-martin.kepplinger@puri.sm> (raw)
In-Reply-To: <20220831080301.1092737-1-martin.kepplinger@puri.sm>

From: Guido Günther <agx@sigxcpu.org>

Describe the RGB notification leds on the Librem 5 phone.
Use the common defines so we're sure to adhere to the common patterns,
use predefined led colors and functions so we're being warned in case
of deprecations.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 .../boot/dts/freescale/imx8mq-librem5.dtsi    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 0626e4194d958..bbf49e419b498 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -7,6 +7,7 @@
 
 #include "dt-bindings/input/input.h"
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
 #include "dt-bindings/pwm/pwm.h"
 #include "dt-bindings/usb/pd.h"
 #include "imx8mq.dtsi"
@@ -54,6 +55,31 @@ key-vol-up {
 		};
 	};
 
+	pwmleds {
+		compatible = "pwm-leds";
+
+		blue {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
+			max-brightness = <248>;
+			pwms = <&pwm2 0 50000 0>;
+		};
+
+		green {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
+			max-brightness = <248>;
+			pwms = <&pwm4 0 50000 0>;
+		};
+
+		red {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
+			max-brightness = <248>;
+			pwms = <&pwm3 0 50000 0>;
+		};
+	};
+
 	reg_aud_1v8: regulator-audio-1v8 {
 		compatible = "regulator-fixed";
 		pinctrl-names = "default";
-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Martin Kepplinger <martin.kepplinger@puri.sm>
To: festevam@gmail.com, shawnguo@kernel.org
Cc: martin.kepplinger@puri.sm, devicetree@vger.kernel.org,
	kernel@pengutronix.de, kernel@puri.sm, krzk@kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com,
	linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	robh@kernel.org, "Guido Günther" <agx@sigxcpu.org>
Subject: [PATCH v1 2/5] arm64: dts: imx8mq-librem5: add RGB pwmleds
Date: Wed, 31 Aug 2022 10:02:58 +0200	[thread overview]
Message-ID: <20220831080301.1092737-3-martin.kepplinger@puri.sm> (raw)
In-Reply-To: <20220831080301.1092737-1-martin.kepplinger@puri.sm>

From: Guido Günther <agx@sigxcpu.org>

Describe the RGB notification leds on the Librem 5 phone.
Use the common defines so we're sure to adhere to the common patterns,
use predefined led colors and functions so we're being warned in case
of deprecations.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 .../boot/dts/freescale/imx8mq-librem5.dtsi    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 0626e4194d958..bbf49e419b498 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -7,6 +7,7 @@
 
 #include "dt-bindings/input/input.h"
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
 #include "dt-bindings/pwm/pwm.h"
 #include "dt-bindings/usb/pd.h"
 #include "imx8mq.dtsi"
@@ -54,6 +55,31 @@ key-vol-up {
 		};
 	};
 
+	pwmleds {
+		compatible = "pwm-leds";
+
+		blue {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
+			max-brightness = <248>;
+			pwms = <&pwm2 0 50000 0>;
+		};
+
+		green {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
+			max-brightness = <248>;
+			pwms = <&pwm4 0 50000 0>;
+		};
+
+		red {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
+			max-brightness = <248>;
+			pwms = <&pwm3 0 50000 0>;
+		};
+	};
+
 	reg_aud_1v8: regulator-audio-1v8 {
 		compatible = "regulator-fixed";
 		pinctrl-names = "default";
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-08-31  8:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31  8:02 [PATCH v1 0/5] arm64: dts: imx8mq-librem5: phone DT updates Martin Kepplinger
2022-08-31  8:02 ` Martin Kepplinger
2022-08-31  8:02 ` [PATCH v1 1/5] arm64: dts: imx8mq-librem5: describe the voice coil motor for focus control Martin Kepplinger
2022-08-31  8:02   ` Martin Kepplinger
2022-08-31  8:02 ` Martin Kepplinger [this message]
2022-08-31  8:02   ` [PATCH v1 2/5] arm64: dts: imx8mq-librem5: add RGB pwmleds Martin Kepplinger
2022-08-31  8:08   ` Krzysztof Kozlowski
2022-08-31  8:08     ` Krzysztof Kozlowski
2022-08-31  8:02 ` [PATCH v1 3/5] arm64: dts: imx8mq-librem5: Add bq25895 as max17055's power supply Martin Kepplinger
2022-08-31  8:02   ` Martin Kepplinger
2022-08-31  8:03 ` [PATCH v1 4/5] arm64: dts: imx8mq-librem5: add USB type-c properties for role switching Martin Kepplinger
2022-08-31  8:03   ` Martin Kepplinger
2022-08-31  8:03 ` [PATCH v1 5/5] arm64: dts: imx8mq-librem5: add usb-role-switch property to dwc3 Martin Kepplinger
2022-08-31  8:03   ` Martin Kepplinger

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=20220831080301.1092737-3-martin.kepplinger@puri.sm \
    --to=martin.kepplinger@puri.sm \
    --cc=agx@sigxcpu.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kernel@puri.sm \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.