Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6746299ybi; Mon, 22 Jul 2019 00:52:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJzp+61eqbEQ5enCp1tK9Uz+hZv7b4XkqVPknF3BFl/tx3HFKL85voguwX1XaFwgznCOb9 X-Received: by 2002:a63:c0d:: with SMTP id b13mr70024427pgl.420.1563781964098; Mon, 22 Jul 2019 00:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563781964; cv=none; d=google.com; s=arc-20160816; b=wnHGc2kF6nwiwSllSKlU/opIUZrdYCteabj3OamMHzHZ4p44xuI8Jqb7Pn7VKp6F+Z YRcAk6wZ5zEa84H3sm/4jbFiPT1iftCgbjIVTJZEETNhzs/AJDIDFtj6WmbOISeOVqWm /15WW2U0NEllHAWr+AdBjW4W7D9oPxNNpxh6jm3+hxN1qj+jUI1J3mMP1UYadFYtG6bs L3ZbtTyowQs+hzoIESbftJbUYL2IRa1h1OTqQOFxYP/84nZwn2dh7o04UYH04OV101uk +lbudiPgyyNP4hKOnGvVxr4LezAOUEbMajeskb5nGXExucw1rkoKXrtHQElvnc7G1Yoe Ws8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4S94l+4QO2Bft7LJ9cUjYqb5/+N9OxltMqmWVqgA2y4=; b=kiGV8j15d1OJnwwRu/tgw5gY7x8V+6ceT9DRya8gludXTxbfbWkOFwbGb19wpSC4Pm bGfNJY+M+tyNsKT062vPqzWVLliHt2jZtqpxifJlJQNz+HDGe6UQPpzso8W1iDP1BHO+ 598HKT0Jh614GtqJFtpAhnUTfIxjPXbcOIeWFuJYV+7U+r+iheVZzm+q3CugQs5FZRGh KFIlFT2Z5zIBrYS7t92fNDm0u/rgvstAJV9upL2y5rwcLTsP/1BZMy8rQ+ohceEiEykJ 2iZwLMsWUg8K31Bbd0SPgfbmqYmVmr2QZukdE1TWFDNkPbbsn3l2e4iQ+NMg+xq6Bv9a dBGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si9785961pll.257.2019.07.22.00.52.28; Mon, 22 Jul 2019 00:52:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727574AbfGVHuh (ORCPT + 99 others); Mon, 22 Jul 2019 03:50:37 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:36781 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbfGVHug (ORCPT ); Mon, 22 Jul 2019 03:50:36 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 803AE80317; Mon, 22 Jul 2019 09:50:21 +0200 (CEST) Date: Mon, 22 Jul 2019 09:50:32 +0200 From: Pavel Machek To: Ezequiel Garcia Cc: kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org, jacek.anaszewski@gmail.com, linux-leds@vger.kernel.org, b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH] Enable backlight when trigger is activated Message-ID: <20190722075032.GA27524@amd> References: <20190718190849.GA11409@amd> <22d7eca4ad8aa2e73933c4f83c92221ce6e0945a.camel@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline In-Reply-To: <22d7eca4ad8aa2e73933c4f83c92221ce6e0945a.camel@collabora.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > Configuring backlight trigger from dts results in backlight off during > > boot. Machine looks dead upon boot, which is not good. > >=20 > > Fix that by enabling LED on trigger activation. > > +++ b/drivers/leds/trigger/ledtrig-backlight.c > > @@ -114,6 +114,8 @@ static int bl_trig_activate(struct led_classdev *le= d) > > n->old_status =3D UNBLANK; > > n->notifier.notifier_call =3D fb_notifier_callback; > > =20 > > + led_set_brightness(led, LED_ON); > > + >=20 > This looks fishy. >=20 > Maybe you should use a default-state =3D "keep" instead? (and you'll have > to support it in the LED driver). >=20 > That'll give you proper "don't touch the LED if it was turned on" behavio= r, > which is what you seem to want. Actually no, that's not what I want. LED should go on if the display is active, as soon as trigger is activated. Unfortunately, I have see no good way to tell if the display is active (and display is usually active when trigger is activated). Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --ZPt4rx8FFjLCG7dd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl01asgACgkQMOfwapXb+vK9lgCbBcUNDD1pNFmswZowkerycBcz v80AoK7Dv7JR0+GNLhozQBGFuNFWTOIt =oVmU -----END PGP SIGNATURE----- --ZPt4rx8FFjLCG7dd--