diff options
author | Thierry Reding <treding@nvidia.com> | 2013-08-30 11:51:22 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2013-10-16 09:05:57 +0200 |
commit | 2b9b1620349e325f184c68cddf3b484499c163c0 (patch) | |
tree | c995537dbc064a0383db2c8a53d4949cff3d6f12 /include/linux | |
parent | 97c38437115aa0c3fb2d50c488814b503ba529e0 (diff) |
pwm-backlight: Add optional enable GPIO
To support a wider variety of backlight setups, introduce an optional
enable GPIO. Legacy users of the platform data already have a means of
supporting GPIOs by using the .init(), .exit() and .notify() hooks. DT
users however cannot use those, so an alternative method is required.
In order to ease the introduction of the optional enable GPIO, make it
available in the platform data first, so that existing users can be
converted. Once that has happened a second patch will add code to make
use of it in the driver.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/pwm_backlight.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index 56f4a866539a..2de2e275b2cb 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h @@ -6,6 +6,9 @@ #include <linux/backlight.h> +/* TODO: convert to gpiod_*() API once it has been merged */ +#define PWM_BACKLIGHT_GPIO_ACTIVE_LOW (1 << 0) + struct platform_pwm_backlight_data { int pwm_id; unsigned int max_brightness; @@ -13,6 +16,8 @@ struct platform_pwm_backlight_data { unsigned int lth_brightness; unsigned int pwm_period_ns; unsigned int *levels; + int enable_gpio; + unsigned long enable_gpio_flags; int (*init)(struct device *dev); int (*notify)(struct device *dev, int brightness); void (*notify_after)(struct device *dev, int brightness); |