[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190828085339.GB2923@amd>
Date: Wed, 28 Aug 2019 10:53:39 +0200
From: Pavel Machek <pavel@....cz>
To: Tony Lindgren <tony@...mide.com>,
kernel list <linux-kernel@...r.kernel.org>, sre@...nel.org,
nekit1000@...il.com, mpartap@....net, merlijn@...zup.org
Cc: Jacek Anaszewski <jacek.anaszewski@...il.com>,
Dan Murphy <dmurphy@...com>, linux-leds@...r.kernel.org
Subject: [FYI] lm3532: right registration to work with LED-backlight
Hi!
Eventually, these will be needed.
Best regards,
Pavel
commit 38d956977a7d6cbdc811676f9b4033da7487e045
Author: Pavel <pavel@....cz>
Date: Wed Aug 7 12:43:52 2019 +0200
d4: lm3532 needs to use right register function for backlight to work.
diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c
index 365a22a5..f98e657 100644
--- a/drivers/leds/leds-lm3532.c
+++ b/drivers/leds/leds-lm3532.c
@@ -629,7 +629,7 @@ static int lm3532_parse_node(struct lm3532_data *priv)
lm3532_init_registers(led);
- ret = devm_led_classdev_register(priv->dev, &led->led_dev);
+ ret = devm_of_led_classdev_register(priv->dev, to_of_node(child), &led->led_dev);
if (ret) {
dev_err(&priv->client->dev, "led register err: %d\n",
ret);
diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts
index 4454449..64abe87 100644
--- a/arch/arm/boot/dts/omap4-droid4-xt894.dts
+++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts
@@ -185,6 +185,14 @@
pwm-names = "enable", "direction";
direction-duty-cycle-ns = <10000000>;
};
+
+ backlight: backlight {
+ compatible = "led-backlight";
+
+ leds = <&backlight_led>;
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <6>;
+ };
};
&dss {
@@ -208,6 +216,8 @@
vddi-supply = <&lcd_regulator>;
reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; /* gpio101 */
+ backlight = <&backlight>;
+
width-mm = <50>;
height-mm = <89>;
@@ -389,12 +427,11 @@
ramp-up-us = <1024>;
ramp-down-us = <8193>;
- led@0 {
+ backlight_led: led@0 {
reg = <0>;
led-sources = <2>;
ti,led-mode = <0>;
label = ":backlight";
- linux,default-trigger = "backlight";
};
led@1 {
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists