All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 09/28] leds-lp5521/5523: add specific max_channel
@ 2012-10-05  8:14 Kim, Milo
  0 siblings, 0 replies; only message in thread
From: Kim, Milo @ 2012-10-05  8:14 UTC (permalink / raw)
  To: Bryan Wu; +Cc: Richard Purdie, linux-leds, linux-kernel

 LP5521 has max 3 channels.
 On the other hand, LP5523/55231 provides up to 9 channels.
 A number of channels is used for validating platform data channel number
 while initializing LEDs.(lp55xx_init_leds)
 To support this, max_channel is configured in each driver.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
---
 drivers/leds/leds-lp5521.c |    1 +
 drivers/leds/leds-lp5523.c |    3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 1791655..4076f54 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -606,6 +606,7 @@ static void lp5521_unregister_sysfs(struct i2c_client *client)
 
 /* Chip specific configurations */
 static struct lp55xx_device_config lp5521_cfg = {
+	.max_channel  = LP5521_MAX_LEDS,
 	.reset = {
 		.addr = LP5521_REG_RESET,
 		.val  = LP5521_RESET,
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
index 5d383b2..85521f8 100644
--- a/drivers/leds/leds-lp5523.c
+++ b/drivers/leds/leds-lp5523.c
@@ -38,6 +38,8 @@
 
 #include "leds-lp55xx-common.h"
 
+#define LP5523_MAX_LEDS			9
+
 #define LP5523_REG_ENABLE		0x00
 #define LP5523_REG_OP_MODE		0x01
 #define LP5523_REG_RATIOMETRIC_MSB	0x02
@@ -686,6 +688,7 @@ static void lp5523_set_mode(struct lp5523_engine *engine, u8 mode)
 
 /* Chip specific configurations */
 static struct lp55xx_device_config lp5523_cfg = {
+	.max_channel  = LP5523_MAX_LEDS,
 	.reset = {
 		.addr = LP5523_REG_RESET,
 		.val  = LP5523_RESET,
-- 
1.7.9.5


Best Regards,
Milo



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-05  8:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-05  8:14 [PATCH 09/28] leds-lp5521/5523: add specific max_channel Kim, Milo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.