]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/video/backlight/lp855x_bl.c: use generic PWM functions
authorKim, Milo <Milo.Kim@ti.com>
Thu, 25 Oct 2012 01:15:02 +0000 (12:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 26 Oct 2012 04:05:29 +0000 (15:05 +1100)
commit8220ea1b34acdd57a5b944a023fa659b93aa5e4b
tree215346508e1ecac97d8ffa36ac9d40a596a5c038
parent68a30600c934d22689301d90a8fb6c83ff16976c
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.

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>
Documentation/backlight/lp855x-driver.txt
drivers/video/backlight/lp855x_bl.c
include/linux/platform_data/lp855x.h