dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

2 Commits

Author SHA1 Message Date
Kim, Milo 8cc9764c9c 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>
2012-12-17 17:15:16 -08:00
Kim, Milo 7be865ab86 backlight: new backlight driver for LP855x devices
THis driver supports TI LP8550/LP8551/LP8552/LP8553/LP8556 backlight
devices.

The brightness can be controlled by the I2C or PWM input.  The lp855x
driver provides both modes.  For the PWM control, pwm-specific functions
can be defined in the platform data.  And some information can be read
via the sysfs(lp855x device attributes).

For details, please refer to Documentation/backlight/lp855x-driver.txt.

[axel.lin@gmail.com: add missing mutex_unlock in lp855x_read_byte() error path]
[axel.lin@gmail.com: check platform data in lp855x_probe()]
[axel.lin@gmail.com: small cleanups]
[dan.carpenter@oracle.com: silence a compiler warning]
[axel.lin@gmail.com: use id->driver_data to differentiate lp855x chips]
[akpm@linux-foundation.org: simplify boolean return expression]
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:33 -07:00