diff options
author | Graeme Gregory <gg@slimlogic.co.uk> | 2012-06-22 13:36:19 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-07-09 00:16:13 +0200 |
commit | 54210c97c8bfff67a4c5ec09ff797543bf291d6b (patch) | |
tree | ca450a79ab4790e0676be6fc1b79c654a4aa454e | |
parent | 56dbd61f297d8d645856f604536bcd856ab9060a (diff) | |
download | talos-obmc-linux-54210c97c8bfff67a4c5ec09ff797543bf291d6b.tar.gz talos-obmc-linux-54210c97c8bfff67a4c5ec09ff797543bf291d6b.zip |
mfd: Add missing hunk to change palmas irq to clear on read
During conversion to regmap_irq this hunk was missing being moved
to MFD driver to put the chip into clear on read mode. Also as slave
is now set use it to determine which slave for the register call.
Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/mfd/palmas.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c index 98fdcdbbd610..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) |