summaryrefslogtreecommitdiff
path: root/drivers/mfd/max77663-core.c
diff options
context:
space:
mode:
authorJohnny Qiu <joqiu@nvidia.com>2012-02-16 12:04:37 -0800
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-02-17 06:44:43 -0800
commit11c94f0d529a089f8cc37311258fd518be576383 (patch)
tree871ce217c7683c67289f1032a810f0974f142b1d /drivers/mfd/max77663-core.c
parent03835470a673447cd3dafd2df9d7081e378b1aac (diff)
mfd: max77663: add support for status LED control through PMU GPIO
Bug 920845 Bug 931371 Change-Id: I7c03c7f2f16aee1be636c2f8fd8ad18cf7539eae Signed-off-by: Johnny Qiu <joqiu@nvidia.com> Signed-off-by: Hao Tang <htang@nvidia.com> Reviewed-on: http://git-master/r/83724 Reviewed-by: Kerwin Wan <kerwinw@nvidia.com> Reviewed-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/mfd/max77663-core.c')
-rw-r--r--drivers/mfd/max77663-core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mfd/max77663-core.c b/drivers/mfd/max77663-core.c
index 137c04b01e0d..2ecb84d543df 100644
--- a/drivers/mfd/max77663-core.c
+++ b/drivers/mfd/max77663-core.c
@@ -1358,8 +1358,13 @@ static int max77663_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct max77663_chip *chip = i2c_get_clientdata(client);
+ struct max77663_platform_data *pdata = chip->pdata;
int ret;
+ /* PMU_STAT_LED */
+ if (pdata->has_stat_led)
+ max77663_gpio_dir_input(&chip->gpio, pdata->stat_led_gpio);
+
if (client->irq)
disable_irq(client->irq);
@@ -1374,6 +1379,7 @@ static int max77663_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct max77663_chip *chip = i2c_get_clientdata(client);
+ struct max77663_platform_data *pdata = chip->pdata;
int ret;
ret = max77663_sleep(chip, false);
@@ -1385,6 +1391,12 @@ static int max77663_resume(struct device *dev)
if (client->irq)
enable_irq(client->irq);
+ /* PMU_STAT_LED */
+ if (pdata->has_stat_led) {
+ max77663_gpio_dir_output(&chip->gpio, MAX77663_GPIO7,
+ pdata->stat_led_active_low ? 0 : 1);
+ }
+
return 0;
}
#else