]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drivers/video/backlight/lp855x_bl.c: use generic PWM functions
authorKim, Milo <Milo.Kim@ti.com>
Sat, 3 Nov 2012 00:42:43 +0000 (11:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Nov 2012 04:58:36 +0000 (15:58 +1100)
commit7f3184e070da708862061b0f6149e5a233687f6a
treec6a7c92dc683133ac206072c592db656bd8761f4
parent2a938710b1d96bddb8e4c2af59c8308734e77abe
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