summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorYing Liu <victor.liu@nxp.com>2023-07-21 12:29:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-09-19 13:27:59 +0300
commitd7add200199168109a2de4d71878b8a937ff094d (patch)
treee6013b181b7f4ca646c6070d1289e8d566e99773 /drivers/video
parent9de7eb95bbe82ab36213790cf93849f023e0e492 (diff)
downloadlinux-d7add200199168109a2de4d71878b8a937ff094d.tar.xz
backlight: gpio_backlight: Drop output GPIO direction check for initial power state
[ Upstream commit fe1328b5b2a087221e31da77e617f4c2b70f3b7f ] 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> Reviewed-by: Andy Shevchenko <andy@kernel.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20230721093342.1532531-1-victor.liu@nxp.com Signed-off-by: Lee Jones <lee@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/gpio_backlight.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c
index 5c5c99f7979e..30ec5b684533 100644
--- a/drivers/video/backlight/gpio_backlight.c
+++ b/drivers/video/backlight/gpio_backlight.c
@@ -87,8 +87,7 @@ static int gpio_backlight_probe(struct platform_device *pdev)
/* Not booted with device tree or no phandle link to the node */
bl->props.power = def_value ? FB_BLANK_UNBLANK
: FB_BLANK_POWERDOWN;
- else if (gpiod_get_direction(gbl->gpiod) == 0 &&
- gpiod_get_value_cansleep(gbl->gpiod) == 0)
+ else if (gpiod_get_value_cansleep(gbl->gpiod) == 0)
bl->props.power = FB_BLANK_POWERDOWN;
else
bl->props.power = FB_BLANK_UNBLANK;