summaryrefslogtreecommitdiff
path: root/drivers/mfd/palmas.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-07-21 23:34:31 +0200
committerArnd Bergmann <arnd@arndb.de>2012-07-21 23:34:31 +0200
commit088eb2a84b3b093af60bbe0b65151e8a9cd2d57d (patch)
tree8f145d8c71f6e249d6664b5482ac216b8c6e4016 /drivers/mfd/palmas.c
parent6217a69a1e38807b3046b4fd6e4bf413e0e03b67 (diff)
parent84a1caf1453c3d44050bd22db958af4a7f99315c (diff)
Merge tag 'v3.5-rc7' into late/soc
Linux 3.5-rc7
Diffstat (limited to 'drivers/mfd/palmas.c')
-rw-r--r--drivers/mfd/palmas.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 00c0aba7eba0..c4a69f193a1d 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -356,7 +356,14 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c,
}
}
- ret = regmap_add_irq_chip(palmas->regmap[1], palmas->irq,
+ /* Change IRQ into clear on read mode for efficiency */
+ slave = PALMAS_BASE_TO_SLAVE(PALMAS_INTERRUPT_BASE);
+ addr = PALMAS_BASE_TO_REG(PALMAS_INTERRUPT_BASE, PALMAS_INT_CTRL);
+ reg = PALMAS_INT_CTRL_INT_CLEAR;
+
+ regmap_write(palmas->regmap[slave], addr, reg);
+
+ ret = regmap_add_irq_chip(palmas->regmap[slave], palmas->irq,
IRQF_ONESHOT | IRQF_TRIGGER_LOW, -1, &palmas_irq_chip,
&palmas->irq_data);
if (ret < 0)
@@ -441,6 +448,9 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c,
goto err;
}
+ children[PALMAS_PMIC_ID].platform_data = pdata->pmic_pdata;
+ children[PALMAS_PMIC_ID].pdata_size = sizeof(*pdata->pmic_pdata);
+
ret = mfd_add_devices(palmas->dev, -1,
children, ARRAY_SIZE(palmas_children),
NULL, regmap_irq_chip_get_base(palmas->irq_data));
@@ -472,6 +482,7 @@ static const struct i2c_device_id palmas_i2c_id[] = {
{ "twl6035", },
{ "twl6037", },
{ "tps65913", },
+ { /* end */ }
};
MODULE_DEVICE_TABLE(i2c, palmas_i2c_id);