Skip to content

Commit

Permalink
drm/panel: simple: Allow GPIO accesses to sleep
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thierry Reding committed Apr 4, 2014
1 parent 887eb66 commit 15c1a91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/panel/panel-simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 15c1a91

Please sign in to comment.