diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-08-31 10:18:12 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2016-10-06 09:27:26 +0100 |
commit | 0c9501f823a40a061f755d3789c4705c9fe85f14 (patch) | |
tree | 0748b51b1419b74ed275cec6b8d13cfad64ad0ab /drivers/video/backlight | |
parent | 358791033f39d138bf64e5544937345f4a7cf83a (diff) | |
download | blackbird-op-linux-0c9501f823a40a061f755d3789c4705c9fe85f14.tar.gz blackbird-op-linux-0c9501f823a40a061f755d3789c4705c9fe85f14.zip |
backlight: pwm_bl: Handle gpio that can sleep
Some backlight GPIOs might be connected to some i2c based expanders whose
access might sleep.
Since it's not in any critical path, use the cansleep variant of the GPIO
API.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index b2b366bb0f97..12614006211e 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -55,7 +55,7 @@ static void pwm_backlight_power_on(struct pwm_bl_data *pb, int brightness) dev_err(pb->dev, "failed to enable power supply\n"); if (pb->enable_gpio) - gpiod_set_value(pb->enable_gpio, 1); + gpiod_set_value_cansleep(pb->enable_gpio, 1); pwm_enable(pb->pwm); pb->enabled = true; @@ -70,7 +70,7 @@ static void pwm_backlight_power_off(struct pwm_bl_data *pb) pwm_disable(pb->pwm); if (pb->enable_gpio) - gpiod_set_value(pb->enable_gpio, 0); + gpiod_set_value_cansleep(pb->enable_gpio, 0); regulator_disable(pb->power_supply); pb->enabled = false; |