Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5302744rwl; Sun, 8 Jan 2023 12:25:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXuA9Swujug6PYGoBbpmIOJROAcUSepNY7sNbcZfviw097UKp2ekdBDhZq6ExYt8iy02S4aF X-Received: by 2002:a17:906:9c85:b0:7c1:27a:80ed with SMTP id fj5-20020a1709069c8500b007c1027a80edmr53941435ejc.0.1673209501410; Sun, 08 Jan 2023 12:25:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673209501; cv=none; d=google.com; s=arc-20160816; b=HtvBEpuFusTtyVDnQ7fCt6N+B1yyoVPMIdDOadRn7M5e+nyftDrg0+3yj42Drnh7JX oij8cKvoLjXHjiz6saqUJ5mRm+QhTi8ob5ZBRrDURjjS0lkJfgqZLldfihmINXQuQlR5 mhCAiBNhbcHZnUyuJB/he/oGTjz1mTzlFyK9tUVcPoC8C3C9aU1X5w6f4EeY25nuqxlk zPOdfOU4rAAADuhkxt4wCi2yKQKh9pkqe7114fBtGfMsn8KrXjr3RgiilEE0/XnpphOa tvBmaedBuZ/EtKcChgSdPsHd8bY+IzqDiqiBUwrOzvS/IDRTsovEvoYnrkDES4ZclHY+ m0SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :subject:cc:to:from:date; bh=Y+atiNVW/OhlY9Eemvwfg5DJ1sMUA3TWK2Zi06vAuQ4=; b=fkqn2lMCgpKaphbwXFGkiNoNALj91FKZOxzVhcRvG9VhKR9+F5WzWpAMuv1xWzbXxz JHDXO/bZKu4S2c3f7Nu047U3IEuAE3+4KLucDvwHrICMuAIh5W6qK5Tl94FmT/tk0prP BOHWaa/rResTiG467WJfay7fRCj54SLIIDvoYm34eDOwEEDswkZqktwSXwt9Hq1n9yES 1Ms5N/UHvMUZTFFDbZPQXhFsAjjen94Lr5IpuBtri4QZUGJ1W7DejMZraj4hFPI+2voD 9NDZsPwOGRbx23w0vIlc3mQ1264zoXfg4bhcruuBVykBrtcMBb4FpVWZNHDlH90wOPDD MowQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v18-20020a1709064e9200b0084c47845c30si5190363eju.779.2023.01.08.12.24.48; Sun, 08 Jan 2023 12:25:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233694AbjAHUEl (ORCPT + 53 others); Sun, 8 Jan 2023 15:04:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232002AbjAHUEb (ORCPT ); Sun, 8 Jan 2023 15:04:31 -0500 X-Greylist: delayed 167111 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 08 Jan 2023 12:04:29 PST Received: from 13.mo584.mail-out.ovh.net (13.mo584.mail-out.ovh.net [178.33.251.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 459C0B84A for ; Sun, 8 Jan 2023 12:04:28 -0800 (PST) Received: from director9.ghost.mail-out.ovh.net (unknown [10.108.20.212]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id B6A4024327 for ; Sun, 8 Jan 2023 19:28:30 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-jkvnz (unknown [10.110.115.217]) by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 5F9761FF09; Sun, 8 Jan 2023 19:28:25 +0000 (UTC) Received: from sk2.org ([37.59.142.109]) by ghost-submission-6684bf9d7b-jkvnz with ESMTPSA id EegsFFkZu2NcfgEALOiSWw (envelope-from ); Sun, 08 Jan 2023 19:28:25 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-109S00347102589-c051-4779-a238-3104c8c3a5ba, 5128B599F7D401446F64D4771BE19AB2B9CD7A8B) smtp.auth=steve@sk2.org X-OVh-ClientIp: 82.65.25.201 Date: Sun, 8 Jan 2023 20:28:17 +0100 From: Stephen Kitt To: Sam Ravnborg via B4 Submission Endpoint Cc: , Nicolas Ferre , Helge Deller , Alexandre Belloni , Claudiu Beznea , Antonino Daplas , Benjamin Herrenschmidt , Paul Mackerras , Greg Kroah-Hartman , Robin van der Gracht , Miguel Ojeda , Lee Jones , Daniel Thompson , Jingoo Han , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-staging@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, Andy Shevchenko Subject: Re: [PATCH 09/15] staging: fbtft: fb_ssd1351.c: Introduce backlight_is_blank() Message-ID: <20230108202817.7890f85c@heffalump.sk2.org> In-Reply-To: <20230107-sam-video-backlight-drop-fb_blank-v1-9-1bd9bafb351f@ravnborg.org> References: <20230107-sam-video-backlight-drop-fb_blank-v1-0-1bd9bafb351f@ravnborg.org> <20230107-sam-video-backlight-drop-fb_blank-v1-9-1bd9bafb351f@ravnborg.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/7r7u4ublxCZJ9BAQVs4mie8"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Ovh-Tracer-Id: 1827898502950454918 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrkeeggdduvdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkjghfofggtgesghdtreerredtvdenucfhrhhomhepufhtvghphhgvnhcumfhithhtuceoshhtvghvvgesshhkvddrohhrgheqnecuggftrfgrthhtvghrnhepfeffgefhgfeuueeffeejieefieefgfefffethfdtudegvdejueelhffhfeegjeeinecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeoshhtvghvvgesshhkvddrohhrgheqpdhnsggprhgtphhtthhopedupdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdfovfetjfhoshhtpehmohehkeegpdhmohguvgepshhmthhpohhuth X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/7r7u4ublxCZJ9BAQVs4mie8 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 07 Jan 2023 19:26:23 +0100, Sam Ravnborg via B4 Submission Endpoint wrote: > From: Sam Ravnborg >=20 > Avoiding direct access to backlight_properties.props. >=20 > Access to the deprecated props.fb_blank replaced by backlight_is_blank(). > Access to props.power is dropped - it was only used for debug. >=20 > Signed-off-by: Sam Ravnborg > Cc: Stephen Kitt > Cc: Greg Kroah-Hartman > Cc: Daniel Thompson > Cc: Andy Shevchenko > Cc: linux-fbdev@vger.kernel.org > --- > drivers/staging/fbtft/fb_ssd1351.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/staging/fbtft/fb_ssd1351.c > b/drivers/staging/fbtft/fb_ssd1351.c index b8d55aa8c5c7..995fbd2f3dc6 100= 644 > --- a/drivers/staging/fbtft/fb_ssd1351.c > +++ b/drivers/staging/fbtft/fb_ssd1351.c > @@ -190,15 +190,12 @@ static struct fbtft_display display =3D { > static int update_onboard_backlight(struct backlight_device *bd) > { > struct fbtft_par *par =3D bl_get_data(bd); > - bool on; > + bool blank =3D backlight_is_blank(bd); > =20 > - fbtft_par_dbg(DEBUG_BACKLIGHT, par, > - "%s: power=3D%d, fb_blank=3D%d\n", > - __func__, bd->props.power, bd->props.fb_blank); > + fbtft_par_dbg(DEBUG_BACKLIGHT, par, "%s: blank=3D%d\n", __func__, > blank);=20 > - on =3D !backlight_is_blank(bd); > /* Onboard backlight connected to GPIO0 on SSD1351, GPIO1 unused */ > - write_reg(par, 0xB5, on ? 0x03 : 0x02); > + write_reg(par, 0xB5, !blank ? 0x03 : 0x02); > =20 > return 0; > } >=20 > --=20 > 2.34.1 For debugging purposes here, would there be any point in logging props.stat= e? As in fbtft_par_dbg(DEBUG_BACKLIGHT, par, - "%s: power=3D%d, fb_blank=3D%d\n", - __func__, bd->props.power, bd->props.fb_blank); + "%s: power=3D%d, state=3D%u\n", + __func__, bd->props.power, bd->props.state); In any case, Reviewed-by: Stephen Kitt Regards, Stephen --Sig_/7r7u4ublxCZJ9BAQVs4mie8 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAmO7GVIACgkQgNMC9Yht g5x37A/7B3puI8clzUcFlUoGWvM7pLm9F6edVmfW2Ck32NHOFEQ+oECUWSeX2T5+ Ol8So/dDrSXGuqFUKEAjbn++F54QGE2LveKquiPDIOxwQMiZQdj8WvqLHWe3qzv2 e1Am1nIijJ6mEph2pnKUhoriwloWC1EsY+au3CjU9iWdVa57tyeRUL4hScUpelyr 6ysQxU3G0Rd5xkVe3V1RCHwxu7x6IK7lcQbk+9HpN1N3yDSTPZjHJAuIsVZYjlly TBc0BMhZGwK4XHcRi03Sm6rby7tNS+uZilljBtMjOKfDZx1M53iReLmQFMwk4pTb e0mC/zdp6MaGDdYI5FavZkHC8OOmKvfZnOKGZnuxdE5XERx9j7FoSPrm1/PrkAop 1X+Ku2r+JKw96kq+pRg2I2zbtODbjrRdK6GmrDUZznfG5aMcZeZqDXnBMOBeolZz rjGVMeDzt2xJGCFIUFyiWnqwRoFoPkXs5cEklkYfszxnLnuWA20EhaWTpL1+w89k d0LymgENWcL7IzaazX/FOaX950T5K0iIGd7EnKR3R7eLYq/4W3fa2v/wNR2NehQs nP39LfiNX7brah5GIfGlQanv9YxJ7XaqUEVyKkC9Y37SpTfzbzuVY0ndx+z1Y3zD sDB0Ut1gNyL4DjtVgMu8Q9miiMuDKyL41MaxMEZpcKYIfQIEhVU= =y2dJ -----END PGP SIGNATURE----- --Sig_/7r7u4ublxCZJ9BAQVs4mie8--