Re: [PATCH v4] backlight: gpio_backlight: Drop output GPIO direction check for initial power state

From
Linus Walleij <hidden>
Date
2023-07-24 17:50:34
Also in
dri-devel, lkml
Reply to
Ying Liu, 2023-07-21
On Fri, Jul 21, 2023 at 11:29 AM Ying Liu [off-list ref] wrote:
If GPIO pin is in input state but backlight is currently off due to
default pull downs,
Oh what an interesting corner case!
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:
---8<---
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.
---8<---

So, let's drop output GPIO direction check and only check GPIO value to set
the initial power state.

Fixes: 706dc68102bc ("backlight: gpio: Explicitly set the direction of the GPIO")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
The solutions seems fine.
Acked-by: Linus Walleij <redacted>

Yours,
Linus Walleij
Thread (5 messages) 5 messages, 5 authors, last reply 2023-07-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help