lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 5 Oct 2012 08:14:30 +0000
From:	"Kim, Milo" <Milo.Kim@...com>
To:	Bryan Wu <bryan.wu@...onical.com>
CC:	Richard Purdie <rpurdie@...ys.net>,
	"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH 09/28] leds-lp5521/5523: add specific max_channel

 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@...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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ