summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panel/panel-simple.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-03-14 12:03:47 +0100
committerThierry Reding <treding@nvidia.com>2014-04-04 09:06:39 +0200
commit15c1a919ae9c0a474c9cf4816d164ced5444292d (patch)
tree6580b50979641e84a4093897cce713de8283ac5f /drivers/gpu/drm/panel/panel-simple.c
parent887eb66e3ab2df12b09266724410a66c9400979a (diff)
downloadblackbird-op-linux-15c1a919ae9c0a474c9cf4816d164ced5444292d.tar.gz
blackbird-op-linux-15c1a919ae9c0a474c9cf4816d164ced5444292d.zip
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: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/panel/panel-simple.c')
-rw-r--r--drivers/gpu/drm/panel/panel-simple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 71566d82e482..789c07937990 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -106,7 +106,7 @@ static int panel_simple_disable(struct drm_panel *panel)
}
if (p->enable_gpio)
- gpiod_set_value(p->enable_gpio, 0);
+ gpiod_set_value_cansleep(p->enable_gpio, 0);
regulator_disable(p->supply);
p->enabled = false;
@@ -129,7 +129,7 @@ static int panel_simple_enable(struct drm_panel *panel)
}
if (p->enable_gpio)
- gpiod_set_value(p->enable_gpio, 1);
+ gpiod_set_value_cansleep(p->enable_gpio, 1);
if (p->backlight) {
p->backlight->props.power = FB_BLANK_UNBLANK;
OpenPOWER on IntegriCloud