diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-11 11:39:03 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-11 11:39:03 -0800 |
commit | e28870f9b3e92cd3570925089c6bb789c2603bc4 (patch) | |
tree | f0a2c91abd0af5579fde082840995bd7cc5e1876 /drivers/video/backlight/pwm_bl.c | |
parent | Merge tag 'pinctrl-v3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl (diff) | |
parent | MAINTAINERS: Remove my name from Backlight subsystem (diff) | |
download | linux-dev-e28870f9b3e92cd3570925089c6bb789c2603bc4.tar.xz linux-dev-e28870f9b3e92cd3570925089c6bb789c2603bc4.zip |
Merge tag 'backlight-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones:
- Clean-up leaky resources; pwm_bl
- Simplify Device Tree initialisation; lp855x_bl
- Add Regulator support; lp855x
- Remove Bryan from the Maintainer list -- new baby, no time :)
* tag 'backlight-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
MAINTAINERS: Remove my name from Backlight subsystem
backlight: lp855x: Add supply regulator to lp855x
backlight: lp855x: Refactor DT parsing code
backlight: pwm: Clean-up pwm requested using legacy API
Diffstat (limited to 'drivers/video/backlight/pwm_bl.c')
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index cb5ae4c08469..3a145a643e0d 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -34,6 +34,7 @@ struct pwm_bl_data { struct regulator *power_supply; struct gpio_desc *enable_gpio; unsigned int scale; + bool legacy; int (*notify)(struct device *, int brightness); void (*notify_after)(struct device *, @@ -274,7 +275,7 @@ static int pwm_backlight_probe(struct platform_device *pdev) pb->pwm = devm_pwm_get(&pdev->dev, NULL); if (IS_ERR(pb->pwm)) { dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n"); - + pb->legacy = true; pb->pwm = pwm_request(data->pwm_id, "pwm-backlight"); if (IS_ERR(pb->pwm)) { dev_err(&pdev->dev, "unable to request legacy PWM\n"); @@ -339,6 +340,8 @@ static int pwm_backlight_remove(struct platform_device *pdev) if (pb->exit) pb->exit(&pdev->dev); + if (pb->legacy) + pwm_free(pb->pwm); return 0; } |