[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190718190849.GA11409@amd>
Date: Thu, 18 Jul 2019 21:08:49 +0200
From: Pavel Machek <pavel@....cz>
To: kernel list <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
linux-omap@...r.kernel.org, tony@...mide.com, sre@...nel.org,
nekit1000@...il.com, mpartap@....net, merlijn@...zup.org,
jacek.anaszewski@...il.com, linux-leds@...r.kernel.org,
b.zolnierkie@...sung.com, dri-devel@...ts.freedesktop.org,
linux-fbdev@...r.kernel.org
Subject: [PATCH] Enable backlight when trigger is activated
Configuring backlight trigger from dts results in backlight off during
boot. Machine looks dead upon boot, which is not good.
Fix that by enabling LED on trigger activation.
Signed-off-by: Pavel Machek <pavel@....cz>
diff --git a/drivers/leds/trigger/ledtrig-backlight.c b/drivers/leds/trigger/ledtrig-backlight.c
index 487577d..6e6bc78 100644
--- a/drivers/leds/trigger/ledtrig-backlight.c
+++ b/drivers/leds/trigger/ledtrig-backlight.c
@@ -114,6 +114,8 @@ static int bl_trig_activate(struct led_classdev *led)
n->old_status = UNBLANK;
n->notifier.notifier_call = fb_notifier_callback;
+ led_set_brightness(led, LED_ON);
+
ret = fb_register_client(&n->notifier);
if (ret)
dev_err(led->dev, "unable to register backlight trigger\n");
@@ -126,6 +128,7 @@ static void bl_trig_deactivate(struct led_classdev *led)
struct bl_trig_notifier *n = led_get_trigger_data(led);
fb_unregister_client(&n->notifier);
+ led_set_brightness(led, LED_OFF);
kfree(n);
}
--
(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