openwrt/target/linux/bcm27xx/patches-6.1/950-0510-drm-panel-panel-ilitek9881c-Use-cansleep-methods.patch
Álvaro Fernández Rojas 793f8ab62c bcm27xx: 6.1: add kernel patches
Add kernel patches for version 6.1.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-09 19:12:30 +02:00

38 lines
1.1 KiB
Diff

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;
}