Re: [PATCH 1/6] backlight: pwm_bl: Handle gpio that can sleep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 31 Aug 2016, Maxime Ripard wrote:

> 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@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/video/backlight/pwm_bl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

> 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;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux