From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 671E3C7618B for ; Wed, 24 Jul 2019 08:34:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E35A21951 for ; Wed, 24 Jul 2019 08:34:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZCsBYE2v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E35A21951 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a7SkTKvpEmOOQimYa3SlP1almKhgfrLB1O8ZVneG4/w=; b=ZCsBYE2vsXO5OQWmtGa6e4QNV ev2s8Q47yClbNJ0P8F5WplmKnoZycqb8UlT+kDJFVwkpDOZtl3lyfY0ryWtvdrakrxUgHFFzPsFw2 3xKOgnmgJdSRKG0pdPSIrt4mKmS2H3jOdnfEP5QjDaNfcnOU8IGy3jzSu35SL5fiYvu8wuei74rmU q6KLctdSLYo8UXw+db7YUDv6A/pBAkpfb0Ory92trRFKZVygR8NzZHJJZRUjxFAgNV5rcPdI7oqhf yOhRGvgY2+pvLYYTcpczsKqPYqfIsXjMbIbhZw6278JuOFGR8cu30lRyUFPh273MBUJHlldHPYXCb +MnYM8alg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqCit-0004Ve-KV; Wed, 24 Jul 2019 08:34:07 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqCip-0004So-Qk for linux-arm-kernel@lists.infradead.org; Wed, 24 Jul 2019 08:34:05 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id C6CE28028C; Wed, 24 Jul 2019 10:33:44 +0200 (CEST) Date: Wed, 24 Jul 2019 10:33:55 +0200 From: Pavel Machek To: Jacek Anaszewski Subject: Re: [PATCH] Enable backlight when trigger is activated Message-ID: <20190724083355.GA27716@amd> References: <20190718190849.GA11409@amd> <22d7eca4ad8aa2e73933c4f83c92221ce6e0945a.camel@collabora.com> <20190722075032.GA27524@amd> <6fc6af89-1455-7665-47e7-0568ecd87c9c@gmail.com> MIME-Version: 1.0 In-Reply-To: <6fc6af89-1455-7665-47e7-0568ecd87c9c@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190724_013404_016127_B77B99CB X-CRM114-Status: GOOD ( 17.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, mpartap@gmx.net, b.zolnierkie@samsung.com, tony@atomide.com, merlijn@wizzup.org, kernel list , dri-devel@lists.freedesktop.org, sre@kernel.org, nekit1000@gmail.com, linux-leds@vger.kernel.org, linux-omap@vger.kernel.org, Ezequiel Garcia , linux-arm-kernel Content-Type: multipart/mixed; boundary="===============2058914855478817076==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2058914855478817076== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >>> +++ b/drivers/leds/trigger/ledtrig-backlight.c > >>> @@ -114,6 +114,8 @@ static int bl_trig_activate(struct led_classdev *= led) > >>> n->old_status =3D UNBLANK; > >>> n->notifier.notifier_call =3D fb_notifier_callback; > >>> =20 > >>> + led_set_brightness(led, LED_ON); > >>> + > >> > >> This looks fishy. > >> > >> Maybe you should use a default-state =3D "keep" instead? (and you'll h= ave > >> to support it in the LED driver). > >> > >> That'll give you proper "don't touch the LED if it was turned on" beha= vior, > >> which is what you seem to want. > >=20 > > Actually no, that's not what I want. LED should go on if the display > > is active, as soon as trigger is activated. > >=20 > > Unfortunately, I have see no good way to tell if the display is > > active (and display is usually active when trigger is activated). >=20 > default-state DT property can be also set to "on" > (see Documentation/devicetree/bindings/leds/common.txt). Yes, except that it does not work with all drivers :-(. In particular, it does not work with lm3532. We should really move more of the device tree parsing into core, so that there's one place to fix... Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --5vNYLRcllDrimb99 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl04F/MACgkQMOfwapXb+vISagCfdaWbZQ6RjvGQ3Edw3INdzb04 i5gAoItfTEBcniDsblUC4rEvK/EzZthi =NU1f -----END PGP SIGNATURE----- --5vNYLRcllDrimb99-- --===============2058914855478817076== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============2058914855478817076==--