[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM7PR04MB7046CF1E1561A37C7A5AC89B983FA@AM7PR04MB7046.eurprd04.prod.outlook.com>
Date: Fri, 21 Jul 2023 05:16:57 +0000
From: Ying Liu <victor.liu@....com>
To: Daniel Thompson <daniel.thompson@...aro.org>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"lee@...nel.org" <lee@...nel.org>,
"jingoohan1@...il.com" <jingoohan1@...il.com>,
"deller@....de" <deller@....de>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Andy Shevchenko <andy@...nel.org>
Subject: RE: [PATCH] backlight: gpio_backlight: Drop output gpio direction
check for initial power state
Hi Daniel,
On Thursday, July 20, 2023 7:28 PM Daniel Thompson <daniel.thompson@...aro.org> wrote:
>
> On Thu, Jul 20, 2023 at 06:06:27AM +0000, Ying Liu wrote:
> > Bootloader may leave gpio direction as input and gpio value as logical low.
> > It hints that initial backlight power state should be
> FB_BLANK_POWERDOWN
> > since the gpio value is literally logical low.
>
> To be honest this probably "hints" that the bootloader simply didn't
> consider the backlight at all :-) . I'd rather the patch description
> focus on what circumstances lead to the current code making a bad
> decision. More like:
>
> If the GPIO pin is in the input state but the backlight is currently
> off due to default pull downs then ...
How about this patch description?
---------------------------------8<-------------------------------------------
Without this patch, if gpio pin is in input state but backlight is currently
off due to default pull downs, then initial power state is set to
FB_BLANK_UNBLANK in DT boot mode with phandle link and the backlight is
effectively turned on in gpio_backlight_probe(), which is undesirable
according to patch description of commit ec665b756e6f ("backlight:
gpio-backlight: Correct initial power state handling").
Quote:
---
If in DT boot we have phandle link then leave the GPIO in a state which the
bootloader left it and let the user of the backlight to configure it further.
---
So, let's drop output gpio direction check and only check gpio value to set
the initial power state.
---------------------------------8<-------------------------------------------
Regards,
Liu Ying
Powered by blists - more mailing lists