summaryrefslogtreecommitdiffstats
path: root/Documentation/leds
diff options
context:
space:
mode:
authorKim, Milo <Milo.Kim@ti.com>2012-03-23 15:02:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 16:58:34 -0700
commit3b49aacd0e56d5bf1b511f6554f17cd65eb8da64 (patch)
tree22da84acf260e760e68006afa03346342a518f84 /Documentation/leds
parent5ae4e8a77dc82afcfe8460168ec0b94f4b79a54a (diff)
downloadlinux-stable-3b49aacd0e56d5bf1b511f6554f17cd65eb8da64.tar.gz
linux-stable-3b49aacd0e56d5bf1b511f6554f17cd65eb8da64.tar.bz2
linux-stable-3b49aacd0e56d5bf1b511f6554f17cd65eb8da64.zip
drivers/leds/leds-lp5521.c: add 'update_config' in the lp5521_platform_data
The value of CONFIG register(Addr 08h) is configurable. For supporting this feature, update_config is added in the platform data. If 'update_config' is not defined, the default value is 'LP5521_PWRSAVE_EN | LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT'. To define CONFIG register in the platform data, the bit definitions were mo= ved to the header file. Documentation updated : description about 'update_config' and example. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Cc: Arun MURTHY <arun.murthy@stericsson.com> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.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>
Diffstat (limited to 'Documentation/leds')
-rw-r--r--Documentation/leds/leds-lp5521.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/leds/leds-lp5521.txt b/Documentation/leds/leds-lp5521.txt
index f48ab757d120..e3c66c64591d 100644
--- a/Documentation/leds/leds-lp5521.txt
+++ b/Documentation/leds/leds-lp5521.txt
@@ -92,3 +92,22 @@ static struct lp5521_platform_data lp5521_platform_data = {
If the current is set to 0 in the platform data, that channel is
disabled and it is not visible in the sysfs.
+
+The 'update_config' : CONFIG register (ADDR 08h)
+This value is platform-specific data.
+If update_config is not defined, the CONFIG register is set with
+'LP5521_PWRSAVE_EN | LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT'.
+(Enable auto-powersave, set charge pump to auto, red to battery)
+
+example of update_config :
+
+#define LP5521_CONFIGS (LP5521_PWM_HF | LP5521_PWRSAVE_EN | \
+ LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT | \
+ LP5521_CLK_INT)
+
+static struct lp5521_platform_data lp5521_pdata = {
+ .led_config = lp5521_led_config,
+ .num_channels = ARRAY_SIZE(lp5521_led_config),
+ .clock_mode = LP5521_CLOCK_INT,
+ .update_config = LP5521_CONFIGS,
+};