mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 06:46:59 +07:00
2b9b162034
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>
29 lines
782 B
C
29 lines
782 B
C
/*
|
|
* Generic PWM backlight driver data - see drivers/video/backlight/pwm_bl.c
|
|
*/
|
|
#ifndef __LINUX_PWM_BACKLIGHT_H
|
|
#define __LINUX_PWM_BACKLIGHT_H
|
|
|
|
#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;
|
|
unsigned int dft_brightness;
|
|
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);
|
|
void (*exit)(struct device *dev);
|
|
int (*check_fb)(struct device *dev, struct fb_info *info);
|
|
};
|
|
|
|
#endif
|