pwm_backlight.h 782 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Generic PWM backlight driver data - see drivers/video/backlight/pwm_bl.c
  3. */
  4. #ifndef __LINUX_PWM_BACKLIGHT_H
  5. #define __LINUX_PWM_BACKLIGHT_H
  6. #include <linux/backlight.h>
  7. /* TODO: convert to gpiod_*() API once it has been merged */
  8. #define PWM_BACKLIGHT_GPIO_ACTIVE_LOW (1 << 0)
  9. struct platform_pwm_backlight_data {
  10. int pwm_id;
  11. unsigned int max_brightness;
  12. unsigned int dft_brightness;
  13. unsigned int lth_brightness;
  14. unsigned int pwm_period_ns;
  15. unsigned int *levels;
  16. int enable_gpio;
  17. unsigned long enable_gpio_flags;
  18. int (*init)(struct device *dev);
  19. int (*notify)(struct device *dev, int brightness);
  20. void (*notify_after)(struct device *dev, int brightness);
  21. void (*exit)(struct device *dev);
  22. int (*check_fb)(struct device *dev, struct fb_info *info);
  23. };
  24. #endif