[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220615115006.45672-17-max.oss.09@gmail.com>
Date: Wed, 15 Jun 2022 13:50:04 +0200
From: Max Krummenacher <max.oss.09@...il.com>
To: max.krummenacher@...adex.com
Cc: Fabio Estevam <festevam@...il.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
NXP Linux Team <linux-imx@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Rob Herring <robh+dt@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 16/18] ARM: dts: imx6q-apalis: backlight pwm: Simplify inverted backlight
From: Max Krummenacher <max.krummenacher@...adex.com>
Set #pwm-cells to the default 3 to gain access to the parameter
which allows inverting the PWM signal. This is useful to specify
a backlight which has its highest brightness at 0.
With the change to use the PWM with inverted polarity the PWM signal
is inverted to how it was before this patch.
This changes the meaning of the values in the brightness-levels
property. I.e. the duty-cycle changes from x/255 to (255-x)/255.
Keeping the brightness-levels will then have a big brightness
jump from 0 to 127 duty cycle, the other 6 steps will then be
barely noticeable.
Change the brightness-levels to provide the same brightness-levels
as before.
Signed-off-by: Max Krummenacher <max.krummenacher@...adex.com>
---
(no changes since v1)
arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
index 4ff46ffd2300..c134e71f2a09 100644
--- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
@@ -6,6 +6,7 @@
*/
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pwm/pwm.h>
/ {
model = "Toradex Apalis iMX6Q/D Module";
@@ -19,13 +20,13 @@
backlight: backlight {
compatible = "pwm-backlight";
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <6>;
+ enable-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_bl_on>;
- brightness-levels = <0 127 191 223 239 247 251 255>;
- default-brightness-level = <1>;
- enable-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
power-supply = <®_module_3v3>;
- pwms = <&pwm4 0 5000000>;
+ pwms = <&pwm4 0 5000000 PWM_POLARITY_INVERTED>;
status = "disabled";
};
@@ -776,7 +777,6 @@
};
&pwm4 {
- #pwm-cells = <2>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm4>;
status = "disabled";
--
2.20.1
Powered by blists - more mailing lists