summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKim, Milo <Milo.Kim@ti.com>2013-02-07 12:27:26 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-02-14 15:25:55 +1100
commit03c59d2606e3bfe83f5d3c811499809ed3977f55 (patch)
tree27bc54df203d36bbc0e17e9049c63efe25772287 /include
parentc5bc05079b118eb2df53fc6c1e7e7120b3ad63ea (diff)
backlight: add new lp8788 backlight driver
TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight dri= ver and current sinks. This patch enables LP8788 backlight module. (Brightness mode) The brightness is controlled by PWM input or I2C register. All modes are supported in the driver. (Platform data) Configurable data can be defined in the platform side. name : backlight driver name. (default: "lcd-backlight") initial_brightness : initial value of backlight brightness bl_mode : brightness control by PWM or lp8788 register dim_mode : dimming mode selection full_scale : full scale current setting rise_time : brightness ramp up step time fall_time : brightness ramp down step time pwm_pol : PWM polarity setting when bl_mode is PWM based period_ns : platform specific PWM period value. unit is nano. The default values are set in case no platform data is defined. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Thierry Reding <thierry.reding@avionic-design.de> Cc: "devendra.aaru" <devendra.aaru@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/lp8788.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/include/linux/mfd/lp8788.h b/include/linux/mfd/lp8788.h
index 2a32b16f79cb..5c0a49b3abd3 100644
--- a/include/linux/mfd/lp8788.h
+++ b/include/linux/mfd/lp8788.h
@@ -229,16 +229,6 @@ struct lp8788_charger_platform_data {
};
/*
- * struct lp8788_bl_pwm_data
- * @pwm_set_intensity : set duty of pwm
- * @pwm_get_intensity : get current duty of pwm
- */
-struct lp8788_bl_pwm_data {
- void (*pwm_set_intensity) (int brightness, int max_brightness);
- int (*pwm_get_intensity) (int max_brightness);
-};
-
-/*
* struct lp8788_backlight_platform_data
* @name : backlight driver name. (default: "lcd-backlight")
* @initial_brightness : initial value of backlight brightness
@@ -248,8 +238,8 @@ struct lp8788_bl_pwm_data {
* @rise_time : brightness ramp up step time
* @fall_time : brightness ramp down step time
* @pwm_pol : pwm polarity setting when bl_mode is pwm based
- * @pwm_data : platform specific pwm generation functions
- * only valid when bl_mode is pwm based
+ * @period_ns : platform specific pwm period value. unit is nano.
+ Only valid when bl_mode is LP8788_BL_COMB_PWM_BASED
*/
struct lp8788_backlight_platform_data {
char *name;
@@ -260,7 +250,7 @@ struct lp8788_backlight_platform_data {
enum lp8788_bl_ramp_step rise_time;
enum lp8788_bl_ramp_step fall_time;
enum lp8788_bl_pwm_polarity pwm_pol;
- struct lp8788_bl_pwm_data pwm_data;
+ unsigned int period_ns;
};
/*