mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
20ea6adbf1
Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones <mj8263788@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
68 lines
2.1 KiB
Diff
68 lines
2.1 KiB
Diff
From 0c891e692cd3f1927d1f565650b90fe4890c1fd4 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Thu, 15 Apr 2021 17:30:35 +0100
|
|
Subject: [PATCH] drm/panel: jdi-lt070me05000: Use
|
|
gpiod_set_value_cansleep
|
|
|
|
There is no reason why the control GPIOs for the panel can not
|
|
be connected to I2C or similar GPIO interfaces that may need to
|
|
sleep, therefore switch from gpiod_set_value to
|
|
gpiod_set_value_cansleep calls to configure them.
|
|
Without that you get complaints from gpiolib every time the state
|
|
is changed.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 18 +++++++++---------
|
|
1 file changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
|
|
+++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
|
|
@@ -205,11 +205,11 @@ static int jdi_panel_unprepare(struct dr
|
|
if (ret < 0)
|
|
dev_err(dev, "regulator disable failed, %d\n", ret);
|
|
|
|
- gpiod_set_value(jdi->enable_gpio, 0);
|
|
+ gpiod_set_value_cansleep(jdi->enable_gpio, 0);
|
|
|
|
- gpiod_set_value(jdi->reset_gpio, 1);
|
|
+ gpiod_set_value_cansleep(jdi->reset_gpio, 1);
|
|
|
|
- gpiod_set_value(jdi->dcdc_en_gpio, 0);
|
|
+ gpiod_set_value_cansleep(jdi->dcdc_en_gpio, 0);
|
|
|
|
jdi->prepared = false;
|
|
|
|
@@ -233,13 +233,13 @@ static int jdi_panel_prepare(struct drm_
|
|
|
|
msleep(20);
|
|
|
|
- gpiod_set_value(jdi->dcdc_en_gpio, 1);
|
|
+ gpiod_set_value_cansleep(jdi->dcdc_en_gpio, 1);
|
|
usleep_range(10, 20);
|
|
|
|
- gpiod_set_value(jdi->reset_gpio, 0);
|
|
+ gpiod_set_value_cansleep(jdi->reset_gpio, 0);
|
|
usleep_range(10, 20);
|
|
|
|
- gpiod_set_value(jdi->enable_gpio, 1);
|
|
+ gpiod_set_value_cansleep(jdi->enable_gpio, 1);
|
|
usleep_range(10, 20);
|
|
|
|
ret = jdi_panel_init(jdi);
|
|
@@ -263,11 +263,11 @@ poweroff:
|
|
if (ret < 0)
|
|
dev_err(dev, "regulator disable failed, %d\n", ret);
|
|
|
|
- gpiod_set_value(jdi->enable_gpio, 0);
|
|
+ gpiod_set_value_cansleep(jdi->enable_gpio, 0);
|
|
|
|
- gpiod_set_value(jdi->reset_gpio, 1);
|
|
+ gpiod_set_value_cansleep(jdi->reset_gpio, 1);
|
|
|
|
- gpiod_set_value(jdi->dcdc_en_gpio, 0);
|
|
+ gpiod_set_value_cansleep(jdi->dcdc_en_gpio, 0);
|
|
|
|
return ret;
|
|
}
|