summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMin-wuk Lee <mlee@nvidia.com>2013-07-19 19:21:02 +0900
committerGabby Lee <galee@nvidia.com>2013-07-22 20:02:09 -0700
commite1fa47428e164545237ba30a460308b146263ccd (patch)
tree01cdf2f3bd4539410dfcac9f12980a6bc5ab52fd /include
parent2f00ddb17b2caa2d2bd92af9f0de10d20fb6c987 (diff)
video: backlight: pwm_bl: device tree support for pwm_bl
Add device tree support for pwm based backlight driver. Values for platform data required by pwm backlight driver are parsed from device tree properties, directly. For function pointers in platform data, separate devdata generating driver is prepared. In order to construct functions, it also parses values from different device tree node. Backlight output array to make linear backlight response are parsed in separate devdata generating driver. Bug 1240921 Change-Id: Ie2b20efa368a0caa3a8a4d316482a2153cdaadc1 Signed-off-by: Min-wuk Lee <mlee@nvidia.com> Reviewed-on: http://git-master/r/251313 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Gabby Lee <galee@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pwm_backlight.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h
index 2fc86de2a95f..633ee4b90a5c 100644
--- a/include/linux/pwm_backlight.h
+++ b/include/linux/pwm_backlight.h
@@ -20,6 +20,7 @@
#define __LINUX_PWM_BACKLIGHT_H
#include <linux/backlight.h>
+#include <linux/platform_device.h>
enum tegra_pwm_bl_edp_states {
TEGRA_PWM_BL_EDP_NEG_3,
@@ -33,6 +34,11 @@ enum tegra_pwm_bl_edp_states {
struct platform_pwm_backlight_data {
int pwm_id;
+ /*
+ * different brightness can be set
+ * between charging mode and normal mode
+ */
+ bool is_charged;
unsigned int max_brightness;
unsigned int dft_brightness;
unsigned int lth_brightness;
@@ -48,4 +54,17 @@ struct platform_pwm_backlight_data {
int (*check_fb)(struct device *dev, struct fb_info *info);
};
+struct of_tegra_pwm_bl_devdata {
+ 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);
+};
+
+struct platform_pwm_backlight_data
+ *of_pwm_bl_parse_platform_data(struct platform_device *ndev);
+
+void pwm_bl_devdata_set_callback(struct device*(*func)
+ (struct device_node *));
#endif