[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230107-sam-video-backlight-drop-fb_blank-v1-9-1bd9bafb351f@ravnborg.org>
Date: Sat, 07 Jan 2023 19:26:23 +0100
From: Sam Ravnborg via B4 Submission Endpoint
<devnull+sam.ravnborg.org@...nel.org>
To: Nicolas Ferre <nicolas.ferre@...rochip.com>,
Helge Deller <deller@....de>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
Antonino Daplas <adaplas@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Robin van der Gracht <robin@...tonic.nl>,
Miguel Ojeda <ojeda@...nel.org>, Lee Jones <lee@...nel.org>,
Daniel Thompson <daniel.thompson@...aro.org>,
Jingoo Han <jingoohan1@...il.com>
Cc: linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org, linux-staging@...ts.linux.dev,
linuxppc-dev@...ts.ozlabs.org, Stephen Kitt <steve@....org>,
Sam Ravnborg <sam@...nborg.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH 09/15] staging: fbtft: fb_ssd1351.c: Introduce backlight_is_blank()
From: Sam Ravnborg <sam@...nborg.org>
Avoiding direct access to backlight_properties.props.
Access to the deprecated props.fb_blank replaced by backlight_is_blank().
Access to props.power is dropped - it was only used for debug.
Signed-off-by: Sam Ravnborg <sam@...nborg.org>
Cc: Stephen Kitt <steve@....org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Daniel Thompson <daniel.thompson@...aro.org>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-fbdev@...r.kernel.org
---
drivers/staging/fbtft/fb_ssd1351.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ssd1351.c b/drivers/staging/fbtft/fb_ssd1351.c
index b8d55aa8c5c7..995fbd2f3dc6 100644
--- a/drivers/staging/fbtft/fb_ssd1351.c
+++ b/drivers/staging/fbtft/fb_ssd1351.c
@@ -190,15 +190,12 @@ static struct fbtft_display display = {
static int update_onboard_backlight(struct backlight_device *bd)
{
struct fbtft_par *par = bl_get_data(bd);
- bool on;
+ bool blank = backlight_is_blank(bd);
- fbtft_par_dbg(DEBUG_BACKLIGHT, par,
- "%s: power=%d, fb_blank=%d\n",
- __func__, bd->props.power, bd->props.fb_blank);
+ fbtft_par_dbg(DEBUG_BACKLIGHT, par, "%s: blank=%d\n", __func__, blank);
- on = !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);
return 0;
}
--
2.34.1
Powered by blists - more mailing lists