Skip to contentSkip to conversation

drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller

PATCH Applied Wadim Egorov 3 participants 3 messages Dec 28, 2022 – Jan 19, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller

Switch to gpiod_set_value_cansleep() in sii902x_reset(). This is relevant if the reset line is tied to a I2C GPIO controller.

---
 drivers/gpu/drm/bridge/sii902x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/sii902x.c +2 -2
index 878fb7d3732b..980611aec2f6 100644
@@ -240,12 +240,12 @@ static void sii902x_reset(struct sii902x *sii902x)
 	if (!sii902x->reset_gpio)
 		return;
 
-	gpiod_set_value(sii902x->reset_gpio, 1);
+	gpiod_set_value_cansleep(sii902x->reset_gpio, 1);
 
 	/* The datasheet says treset-min = 100us. Make it 150us to be sure. */
 	usleep_range(150, 200);
 
-	gpiod_set_value(sii902x->reset_gpio, 0);
+	gpiod_set_value_cansleep(sii902x->reset_gpio, 0);
 }
 
 static enum drm_connector_status sii902x_detect(struct sii902x *sii902x)
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Wadim Egorov

Switch to gpiod_set_value_cansleep() in sii902x_reset(). This is relevant if the reset line is tied to a I2C GPIO controller.

Regards
Andrzej

Quoted 23 lines
---
  drivers/gpu/drm/bridge/sii902x.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/sii902x.c +2 -2
index 878fb7d3732b..980611aec2f6 100644
@@ -240,12 +240,12 @@ static void sii902x_reset(struct sii902x *sii902x)
  	if (!sii902x->reset_gpio)
  		return;
 
-	gpiod_set_value(sii902x->reset_gpio, 1);
+	gpiod_set_value_cansleep(sii902x->reset_gpio, 1);
 
  	/* The datasheet says treset-min = 100us. Make it 150us to be sure. */
  	usleep_range(150, 200);
 
-	gpiod_set_value(sii902x->reset_gpio, 0);
+	gpiod_set_value_cansleep(sii902x->reset_gpio, 0);
  }
 
  static enum drm_connector_status sii902x_detect(struct sii902x *sii902x)
maintainer Applied
#2 lore raw
In reply to Wadim Egorov

Hi,

Quoted 5 lines · Wadim Egorov

Switch to gpiod_set_value_cansleep() in sii902x_reset(). This is relevant if the reset line is tied to a I2C GPIO controller.

Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next)

[1/1] drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller

      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=5688ca34698c734d5591add39e72380123132656
Signature · 1 line
Neil