blob: 2de2e275b2cbd1390ec6693d8f436b05352da16a [file] [log] [blame]
eric miao42796d32008-04-14 09:35:08 +01001/*
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
Robert Morellef0a5e82011-03-22 16:30:31 -07007#include <linux/backlight.h>
8
Thierry Reding2b9b1622013-08-30 11:51:22 +02009/* TODO: convert to gpiod_*() API once it has been merged */
10#define PWM_BACKLIGHT_GPIO_ACTIVE_LOW (1 << 0)
11
eric miao42796d32008-04-14 09:35:08 +010012struct platform_pwm_backlight_data {
13 int pwm_id;
14 unsigned int max_brightness;
15 unsigned int dft_brightness;
Arun Murthyfef77642010-11-11 14:05:28 -080016 unsigned int lth_brightness;
eric miao42796d32008-04-14 09:35:08 +010017 unsigned int pwm_period_ns;
Thierry Reding3e3ed6c2011-12-16 21:25:29 +010018 unsigned int *levels;
Thierry Reding2b9b1622013-08-30 11:51:22 +020019 int enable_gpio;
20 unsigned long enable_gpio_flags;
Philipp Zabel3b731252008-05-22 14:18:40 +010021 int (*init)(struct device *dev);
Ben Dookscfc38992009-11-10 17:20:40 +000022 int (*notify)(struct device *dev, int brightness);
Dilan Leecc7993f2011-08-25 15:59:17 -070023 void (*notify_after)(struct device *dev, int brightness);
Philipp Zabel3b731252008-05-22 14:18:40 +010024 void (*exit)(struct device *dev);
Robert Morellef0a5e82011-03-22 16:30:31 -070025 int (*check_fb)(struct device *dev, struct fb_info *info);
eric miao42796d32008-04-14 09:35:08 +010026};
27
28#endif