blob: 8ea265a022fdb3752476ea1e1e2ef8def054b041 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
eric miao42796d32008-04-14 09:35:08 +01002/*
3 * Generic PWM backlight driver data - see drivers/video/backlight/pwm_bl.c
4 */
5#ifndef __LINUX_PWM_BACKLIGHT_H
6#define __LINUX_PWM_BACKLIGHT_H
7
Robert Morellef0a5e82011-03-22 16:30:31 -07008#include <linux/backlight.h>
9
eric miao42796d32008-04-14 09:35:08 +010010struct platform_pwm_backlight_data {
11 int pwm_id;
12 unsigned int max_brightness;
13 unsigned int dft_brightness;
Arun Murthyfef77642010-11-11 14:05:28 -080014 unsigned int lth_brightness;
eric miao42796d32008-04-14 09:35:08 +010015 unsigned int pwm_period_ns;
Thierry Reding3e3ed6c2011-12-16 21:25:29 +010016 unsigned int *levels;
Enric Balletbo i Serra31576942018-03-28 19:03:25 +020017 unsigned int post_pwm_on_delay;
18 unsigned int pwm_off_delay;
Alexandre Courbot257462d2014-02-27 14:53:34 +090019 /* TODO remove once all users are switched to gpiod_* API */
Thierry Reding2b9b1622013-08-30 11:51:22 +020020 int enable_gpio;
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