diff options
author | Milo(Woogyom) Kim <milo.kim@ti.com> | 2013-02-05 18:08:49 +0900 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-02-06 15:59:27 -0800 |
commit | 48068d5de16c23c256c085b2cd3ff03bec393900 (patch) | |
tree | 08307d1f09040ef20677b15db0a21113a3ba7842 /drivers/leds/leds-lp55xx-common.h | |
parent | a85908dd7799e4fa242812ce27a8f774c721d1fb (diff) | |
download | talos-obmc-linux-48068d5de16c23c256c085b2cd3ff03bec393900.tar.gz talos-obmc-linux-48068d5de16c23c256c085b2cd3ff03bec393900.zip |
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.h | 20 |
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; struct lp55xx_chip; /* + * struct lp55xx_reg + * @addr : Register address + * @val : Register value + */ +struct lp55xx_reg { + u8 addr; + u8 val; +}; + +/* + * struct lp55xx_device_config + * @reset : Chip specific reset command + */ +struct lp55xx_device_config { + const struct lp55xx_reg reset; +}; + +/* * struct lp55xx_chip * @cl : I2C communication for access registers * @pdata : Platform specific data * @lock : Lock for user-space interface * @num_leds : Number of registered LEDs + * @cfg : Device specific configuration data */ struct lp55xx_chip { struct i2c_client *cl; struct lp55xx_platform_data *pdata; struct mutex lock; /* lock for user-space interface */ int num_leds; + struct lp55xx_device_config *cfg; }; /* |