diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2014-02-27 00:53:34 -0500 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2014-05-07 04:15:31 -0400 |
commit | 257462dbf3ed233de0dc2e489dcc58579535b33f (patch) | |
tree | cd119efc19caf1d3ebc4cbc76693480e3cda7745 /include/linux/pwm_backlight.h | |
parent | a4406f165faa222a0d2c5e660473bb6822850a55 (diff) |
pwm-backlight: switch to gpiod interface
Switch to the new gpiod interface, which allows to handle GPIO
properties such as active low transparently and removes a whole bunch of
code.
There are still a couple of users of this driver that rely on passing
the enable GPIO number through platform data, so a fallback mechanism
using a GPIO number is still available to avoid breaking them. It will
be removed once current users have switched to the GPIO lookup tables
provided by the gpiod interface.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'include/linux/pwm_backlight.h')
-rw-r--r-- | include/linux/pwm_backlight.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index 2de2e275b2cb..efdd9227a49c 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h | |||
@@ -6,9 +6,6 @@ | |||
6 | 6 | ||
7 | #include <linux/backlight.h> | 7 | #include <linux/backlight.h> |
8 | 8 | ||
9 | /* TODO: convert to gpiod_*() API once it has been merged */ | ||
10 | #define PWM_BACKLIGHT_GPIO_ACTIVE_LOW (1 << 0) | ||
11 | |||
12 | struct platform_pwm_backlight_data { | 9 | struct platform_pwm_backlight_data { |
13 | int pwm_id; | 10 | int pwm_id; |
14 | unsigned int max_brightness; | 11 | unsigned int max_brightness; |
@@ -16,8 +13,8 @@ struct platform_pwm_backlight_data { | |||
16 | unsigned int lth_brightness; | 13 | unsigned int lth_brightness; |
17 | unsigned int pwm_period_ns; | 14 | unsigned int pwm_period_ns; |
18 | unsigned int *levels; | 15 | unsigned int *levels; |
16 | /* TODO remove once all users are switched to gpiod_* API */ | ||
19 | int enable_gpio; | 17 | int enable_gpio; |
20 | unsigned long enable_gpio_flags; | ||
21 | int (*init)(struct device *dev); | 18 | int (*init)(struct device *dev); |
22 | int (*notify)(struct device *dev, int brightness); | 19 | int (*notify)(struct device *dev, int brightness); |
23 | void (*notify_after)(struct device *dev, int brightness); | 20 | void (*notify_after)(struct device *dev, int brightness); |