diff mbox series

[1/1] drm/bridge: ti-sn65dsi86: Allow GPIO operations to sleep

Message ID 20230405135127.769665-1-alexander.stein@ew.tq-group.com (mailing list archive)
State New, archived
Headers show
Series [1/1] drm/bridge: ti-sn65dsi86: Allow GPIO operations to sleep | expand

Commit Message

Alexander Stein April 5, 2023, 1:51 p.m. UTC
There is no need to require non-sleeping GPIO access. Silence the
WARN_ON() if GPIO is using e.g. I2C expanders.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
This is the TI SN65DSI86 equivalent to 805245071240 ("drm/bridge: 
ti-sn65dsi83: Allow GPIO operations to sleep")

 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Doug Anderson April 5, 2023, 3:35 p.m. UTC | #1
Hi,

On Wed, Apr 5, 2023 at 6:51 AM Alexander Stein
<alexander.stein@ew.tq-group.com> wrote:
>
> There is no need to require non-sleeping GPIO access. Silence the
> WARN_ON() if GPIO is using e.g. I2C expanders.
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> This is the TI SN65DSI86 equivalent to 805245071240 ("drm/bridge:
> ti-sn65dsi83: Allow GPIO operations to sleep")
>
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

Trivial / straightforward change. Sending it to drm-misc-next.

77d08a2de6a4 drm/bridge: ti-sn65dsi86: Allow GPIO operations to sleep
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 1e26fa63845a..7a748785c545 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -363,7 +363,7 @@  static int __maybe_unused ti_sn65dsi86_resume(struct device *dev)
 	/* td2: min 100 us after regulators before enabling the GPIO */
 	usleep_range(100, 110);
 
-	gpiod_set_value(pdata->enable_gpio, 1);
+	gpiod_set_value_cansleep(pdata->enable_gpio, 1);
 
 	/*
 	 * If we have a reference clock we can enable communication w/ the
@@ -386,7 +386,7 @@  static int __maybe_unused ti_sn65dsi86_suspend(struct device *dev)
 	if (pdata->refclk)
 		ti_sn65dsi86_disable_comms(pdata);
 
-	gpiod_set_value(pdata->enable_gpio, 0);
+	gpiod_set_value_cansleep(pdata->enable_gpio, 0);
 
 	ret = regulator_bulk_disable(SN_REGULATOR_SUPPLY_NUM, pdata->supplies);
 	if (ret)