aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-0510-drm-panel-panel-ilitek9881c-Use-cansleep-methods.patch
blob: c95f4c0323f273c53d552b8f998ce59a44a0ac47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From b969ef21e3522c6829aafaa1fecd33fa653596e4 Mon Sep 17 00:00:00 2001
From: Mark Williams <mwp@mwp.id.au>
Date: Wed, 7 Dec 2022 18:20:40 -0700
Subject: [PATCH] drm/panel: panel-ilitek9881c: Use cansleep methods

Use cansleep version of gpiod_set_value so external IO drivers (like
via I2C) can be used.

Signed-off-by: Mark Williams <mwp@mwp.id.au>
---
 drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
@@ -940,10 +940,10 @@ static int ili9881c_prepare(struct drm_p
 	msleep(5);
 
 	/* And reset it */
-	gpiod_set_value(ctx->reset, 1);
+	gpiod_set_value_cansleep(ctx->reset, 1);
 	msleep(20);
 
-	gpiod_set_value(ctx->reset, 0);
+	gpiod_set_value_cansleep(ctx->reset, 0);
 	msleep(20);
 
 	for (i = 0; i < ctx->desc->init_length; i++) {
@@ -998,7 +998,7 @@ static int ili9881c_unprepare(struct drm
 
 	mipi_dsi_dcs_enter_sleep_mode(ctx->dsi);
 	regulator_disable(ctx->power);
-	gpiod_set_value(ctx->reset, 1);
+	gpiod_set_value_cansleep(ctx->reset, 1);
 
 	return 0;
 }