142796d37Seric miao /* 242796d37Seric miao * Generic PWM backlight driver data - see drivers/video/backlight/pwm_bl.c 342796d37Seric miao */ 442796d37Seric miao #ifndef __LINUX_PWM_BACKLIGHT_H 542796d37Seric miao #define __LINUX_PWM_BACKLIGHT_H 642796d37Seric miao 7ef0a5e80SRobert Morell #include <linux/backlight.h> 8ef0a5e80SRobert Morell 9*2b9b1620SThierry Reding /* TODO: convert to gpiod_*() API once it has been merged */ 10*2b9b1620SThierry Reding #define PWM_BACKLIGHT_GPIO_ACTIVE_LOW (1 << 0) 11*2b9b1620SThierry Reding 1242796d37Seric miao struct platform_pwm_backlight_data { 1342796d37Seric miao int pwm_id; 1442796d37Seric miao unsigned int max_brightness; 1542796d37Seric miao unsigned int dft_brightness; 16fef7764fSArun Murthy unsigned int lth_brightness; 1742796d37Seric miao unsigned int pwm_period_ns; 183e3ed6cdSThierry Reding unsigned int *levels; 19*2b9b1620SThierry Reding int enable_gpio; 20*2b9b1620SThierry Reding unsigned long enable_gpio_flags; 213b73125aSPhilipp Zabel int (*init)(struct device *dev); 22cfc3899fSBen Dooks int (*notify)(struct device *dev, int brightness); 23cc7993f6SDilan Lee void (*notify_after)(struct device *dev, int brightness); 243b73125aSPhilipp Zabel void (*exit)(struct device *dev); 25ef0a5e80SRobert Morell int (*check_fb)(struct device *dev, struct fb_info *info); 2642796d37Seric miao }; 2742796d37Seric miao 2842796d37Seric miao #endif 29