]> 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>
Fri, 9 Nov 2012 03:04:45 +0000 (14:04 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 12 Nov 2012 04:17:19 +0000 (15:17 +1100)
commit2ee0829fa529d6c3329a2a6cd0759ba024e294ee
treea7a5802a3747b7f2a06b974cd700b53b354cd9d5
parentec6bb79156e00c9e5150200492c03291653c58b4
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