mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
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>
This commit is contained in:
parent
a4406f165f
commit
257462dbf3
2 changed files with 30 additions and 44 deletions
|
@ -6,9 +6,6 @@
|
|||
|
||||
#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;
|
||||
|
@ -16,8 +13,8 @@ struct platform_pwm_backlight_data {
|
|||
unsigned int lth_brightness;
|
||||
unsigned int pwm_period_ns;
|
||||
unsigned int *levels;
|
||||
/* TODO remove once all users are switched to gpiod_* API */
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue