1 From 02e0cfa1a5d43db75f95db29af672947eed587ed Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 15 Apr 2021 17:30:35 +0100
4 Subject: [PATCH] drm/panel: jdi-lt070me05000: Use
5 gpiod_set_value_cansleep
7 There is no reason why the control GPIOs for the panel can not
8 be connected to I2C or similar GPIO interfaces that may need to
9 sleep, therefore switch from gpiod_set_value to
10 gpiod_set_value_cansleep calls to configure them.
11 Without that you get complaints from gpiolib every time the state
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
16 drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 18 +++++++++---------
17 1 file changed, 9 insertions(+), 9 deletions(-)
19 --- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
20 +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
21 @@ -205,11 +205,11 @@ static int jdi_panel_unprepare(struct dr
23 dev_err(dev, "regulator disable failed, %d\n", ret);
25 - gpiod_set_value(jdi->enable_gpio, 0);
26 + gpiod_set_value_cansleep(jdi->enable_gpio, 0);
28 - gpiod_set_value(jdi->reset_gpio, 1);
29 + gpiod_set_value_cansleep(jdi->reset_gpio, 1);
31 - gpiod_set_value(jdi->dcdc_en_gpio, 0);
32 + gpiod_set_value_cansleep(jdi->dcdc_en_gpio, 0);
34 jdi->prepared = false;
36 @@ -233,13 +233,13 @@ static int jdi_panel_prepare(struct drm_
40 - gpiod_set_value(jdi->dcdc_en_gpio, 1);
41 + gpiod_set_value_cansleep(jdi->dcdc_en_gpio, 1);
44 - gpiod_set_value(jdi->reset_gpio, 0);
45 + gpiod_set_value_cansleep(jdi->reset_gpio, 0);
48 - gpiod_set_value(jdi->enable_gpio, 1);
49 + gpiod_set_value_cansleep(jdi->enable_gpio, 1);
52 ret = jdi_panel_init(jdi);
53 @@ -263,11 +263,11 @@ poweroff:
55 dev_err(dev, "regulator disable failed, %d\n", ret);
57 - gpiod_set_value(jdi->enable_gpio, 0);
58 + gpiod_set_value_cansleep(jdi->enable_gpio, 0);
60 - gpiod_set_value(jdi->reset_gpio, 1);
61 + gpiod_set_value_cansleep(jdi->reset_gpio, 1);
63 - gpiod_set_value(jdi->dcdc_en_gpio, 0);
64 + gpiod_set_value_cansleep(jdi->dcdc_en_gpio, 0);