Commit 15c1a919 authored by Thierry Reding's avatar Thierry Reding

drm/panel: simple: Allow GPIO accesses to sleep

The enable GPIO for panels may be provided by GPIO expanders on slow
busses (such as I2C), and therefore toggling the GPIO may sleep. Since
these accesses don't happen in interrupt context, use the *_cansleep()
variants of the GPIO API.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 887eb66e
...@@ -106,7 +106,7 @@ static int panel_simple_disable(struct drm_panel *panel) ...@@ -106,7 +106,7 @@ static int panel_simple_disable(struct drm_panel *panel)
} }
if (p->enable_gpio) if (p->enable_gpio)
gpiod_set_value(p->enable_gpio, 0); gpiod_set_value_cansleep(p->enable_gpio, 0);
regulator_disable(p->supply); regulator_disable(p->supply);
p->enabled = false; p->enabled = false;
...@@ -129,7 +129,7 @@ static int panel_simple_enable(struct drm_panel *panel) ...@@ -129,7 +129,7 @@ static int panel_simple_enable(struct drm_panel *panel)
} }
if (p->enable_gpio) if (p->enable_gpio)
gpiod_set_value(p->enable_gpio, 1); gpiod_set_value_cansleep(p->enable_gpio, 1);
if (p->backlight) { if (p->backlight) {
p->backlight->props.power = FB_BLANK_UNBLANK; p->backlight->props.power = FB_BLANK_UNBLANK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment