diff options
author | Kim, Milo <Milo.Kim@ti.com> | 2012-12-17 19:00:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:16 -0500 |
commit | 8cc9764c9c7d01a6e2c3ddac8f0ac7716be01868 (patch) | |
tree | 29a1e895f720dcd8ee969df19ba089401e870f8b /Documentation/backlight/lp855x-driver.txt | |
parent | 05a5d4d2640dfe934ec78ba577dd21baccb11aa6 (diff) |
drivers/video/backlight/lp855x_bl.c: use generic PWM functions
The LP855x family devices support the PWM input for the backlight control.
Period of the PWM is configurable in the platform side. Platform
specific functions are unnecessary anymore because generic PWM functions
are used inside the driver.
(PWM input mode)
To set the brightness, new lp855x_pwm_ctrl() is used.
If a PWM device is not allocated, devm_pwm_get() is called.
The PWM consumer name is from the chip name such as 'lp8550' and 'lp8556'.
To get the brightness value, no additional handling is required.
Just the value of 'props.brightness' is returned.
If the PWM driver is not ready while initializing the LP855x driver, it's
OK. The PWM device can be retrieved later, when the brightness value is
changed.
Documentation is updated with an example.
[akpm@linux-foundation.org: coding-style simplification, per Thierry]
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/backlight/lp855x-driver.txt')
-rw-r--r-- | Documentation/backlight/lp855x-driver.txt | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Documentation/backlight/lp855x-driver.txt b/Documentation/backlight/lp855x-driver.txt index f5e4caafab7d..1529394cfe8b 100644 --- a/Documentation/backlight/lp855x-driver.txt +++ b/Documentation/backlight/lp855x-driver.txt | |||
@@ -35,11 +35,8 @@ For supporting platform specific data, the lp855x platform data can be used. | |||
35 | * mode : Brightness control mode. PWM or register based. | 35 | * mode : Brightness control mode. PWM or register based. |
36 | * device_control : Value of DEVICE CONTROL register. | 36 | * device_control : Value of DEVICE CONTROL register. |
37 | * initial_brightness : Initial value of backlight brightness. | 37 | * initial_brightness : Initial value of backlight brightness. |
38 | * pwm_data : Platform specific pwm generation functions. | 38 | * period_ns : Platform specific PWM period value. unit is nano. |
39 | Only valid when brightness is pwm input mode. | 39 | Only valid when brightness is pwm input mode. |
40 | Functions should be implemented by PWM driver. | ||
41 | - pwm_set_intensity() : set duty of PWM | ||
42 | - pwm_get_intensity() : get current duty of PWM | ||
43 | * load_new_rom_data : | 40 | * load_new_rom_data : |
44 | 0 : use default configuration data | 41 | 0 : use default configuration data |
45 | 1 : update values of eeprom or eprom registers on loading driver | 42 | 1 : update values of eeprom or eprom registers on loading driver |
@@ -71,8 +68,5 @@ static struct lp855x_platform_data lp8556_pdata = { | |||
71 | .mode = PWM_BASED, | 68 | .mode = PWM_BASED, |
72 | .device_control = PWM_CONFIG(LP8556), | 69 | .device_control = PWM_CONFIG(LP8556), |
73 | .initial_brightness = INITIAL_BRT, | 70 | .initial_brightness = INITIAL_BRT, |
74 | .pwm_data = { | 71 | .period_ns = 1000000, |
75 | .pwm_set_intensity = platform_pwm_set_intensity, | ||
76 | .pwm_get_intensity = platform_pwm_get_intensity, | ||
77 | }, | ||
78 | }; | 72 | }; |