From: Pavel Machek <pavel@ucw.cz>
To: Tony Lindgren <tony@atomide.com>,
kernel list <linux-kernel@vger.kernel.org>,
sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net,
merlijn@wizzup.org
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Dan Murphy <dmurphy@ti.com>,
linux-leds@vger.kernel.org
Subject: [FYI] lm3532: right registration to work with LED-backlight
Date: Wed, 28 Aug 2019 10:53:39 +0200 [thread overview]
Message-ID: <20190828085339.GB2923@amd> (raw)
In-Reply-To: <20190827215205.59677-1-tony@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 1960 bytes --]
Hi!
Eventually, these will be needed.
Best regards,
Pavel
commit 38d956977a7d6cbdc811676f9b4033da7487e045
Author: Pavel <pavel@ucw.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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2019-08-28 8:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 21:52 [PATCH] leds: lm3532: Avoid potentially unpaired regulator calls Tony Lindgren
2019-08-28 8:42 ` Pavel Machek
2019-08-28 8:53 ` Pavel Machek [this message]
2019-08-28 20:32 ` [FYI] lm3532: right registration to work with LED-backlight Jacek Anaszewski
2019-09-08 8:03 ` Pavel Machek
2019-09-08 16:17 ` Jacek Anaszewski
2019-09-17 12:40 ` [PATCH] " Pavel Machek
2019-09-17 15:10 ` kbuild test robot
2019-09-17 12:42 ` [FYI] " Pavel Machek
2019-09-17 17:23 ` Jacek Anaszewski
2019-08-28 20:09 ` [PATCH] leds: lm3532: Avoid potentially unpaired regulator calls Jacek Anaszewski
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=20190828085339.GB2923@amd \
--to=pavel@ucw.cz \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=merlijn@wizzup.org \
--cc=mpartap@gmx.net \
--cc=nekit1000@gmail.com \
--cc=sre@kernel.org \
--cc=tony@atomide.com \
/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).