aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp55xx-common.h
diff options
context:
space:
mode:
authorMilo(Woogyom) Kim <milo.kim@ti.com>2013-02-05 04:08:49 -0500
committerBryan Wu <cooloney@gmail.com>2013-02-06 18:59:27 -0500
commit48068d5de16c23c256c085b2cd3ff03bec393900 (patch)
tree08307d1f09040ef20677b15db0a21113a3ba7842 /drivers/leds/leds-lp55xx-common.h
parenta85908dd7799e4fa242812ce27a8f774c721d1fb (diff)
leds-lp55xx: use lp55xx common init function - reset
LP5521/5523 reset device functions are moved to lp55xx common driver. Value of register address and value are chip dependent. Those are configured in each driver. In init function, reset command is executed. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lp55xx-common.h')
-rw-r--r--drivers/leds/leds-lp55xx-common.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/leds/leds-lp55xx-common.h b/drivers/leds/leds-lp55xx-common.h
index 09d1882ce58e..a73ee0b9a0bd 100644
--- a/drivers/leds/leds-lp55xx-common.h
+++ b/drivers/leds/leds-lp55xx-common.h
@@ -19,17 +19,37 @@ struct lp55xx_led;
19struct lp55xx_chip; 19struct lp55xx_chip;
20 20
21/* 21/*
22 * struct lp55xx_reg
23 * @addr : Register address
24 * @val : Register value
25 */
26struct lp55xx_reg {
27 u8 addr;
28 u8 val;
29};
30
31/*
32 * struct lp55xx_device_config
33 * @reset : Chip specific reset command
34 */
35struct lp55xx_device_config {
36 const struct lp55xx_reg reset;
37};
38
39/*
22 * struct lp55xx_chip 40 * struct lp55xx_chip
23 * @cl : I2C communication for access registers 41 * @cl : I2C communication for access registers
24 * @pdata : Platform specific data 42 * @pdata : Platform specific data
25 * @lock : Lock for user-space interface 43 * @lock : Lock for user-space interface
26 * @num_leds : Number of registered LEDs 44 * @num_leds : Number of registered LEDs
45 * @cfg : Device specific configuration data
27 */ 46 */
28struct lp55xx_chip { 47struct lp55xx_chip {
29 struct i2c_client *cl; 48 struct i2c_client *cl;
30 struct lp55xx_platform_data *pdata; 49 struct lp55xx_platform_data *pdata;
31 struct mutex lock; /* lock for user-space interface */ 50 struct mutex lock; /* lock for user-space interface */
32 int num_leds; 51 int num_leds;
52 struct lp55xx_device_config *cfg;
33}; 53};
34 54
35/* 55/*