diff options
Diffstat (limited to 'drivers/mfd/palmas.c')
-rw-r--r-- | drivers/mfd/palmas.c | 13 |
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, | |||
356 | } | 356 | } |
357 | } | 357 | } |
358 | 358 | ||
359 | ret = regmap_add_irq_chip(palmas->regmap[1], palmas->irq, | 359 | /* Change IRQ into clear on read mode for efficiency */ |
360 | slave = PALMAS_BASE_TO_SLAVE(PALMAS_INTERRUPT_BASE); | ||
361 | addr = PALMAS_BASE_TO_REG(PALMAS_INTERRUPT_BASE, PALMAS_INT_CTRL); | ||
362 | reg = PALMAS_INT_CTRL_INT_CLEAR; | ||
363 | |||
364 | regmap_write(palmas->regmap[slave], addr, reg); | ||
365 | |||
366 | ret = regmap_add_irq_chip(palmas->regmap[slave], palmas->irq, | ||
360 | IRQF_ONESHOT | IRQF_TRIGGER_LOW, -1, &palmas_irq_chip, | 367 | IRQF_ONESHOT | IRQF_TRIGGER_LOW, -1, &palmas_irq_chip, |
361 | &palmas->irq_data); | 368 | &palmas->irq_data); |
362 | if (ret < 0) | 369 | if (ret < 0) |
@@ -441,6 +448,9 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c, | |||
441 | goto err; | 448 | goto err; |
442 | } | 449 | } |
443 | 450 | ||
451 | children[PALMAS_PMIC_ID].platform_data = pdata->pmic_pdata; | ||
452 | children[PALMAS_PMIC_ID].pdata_size = sizeof(*pdata->pmic_pdata); | ||
453 | |||
444 | ret = mfd_add_devices(palmas->dev, -1, | 454 | ret = mfd_add_devices(palmas->dev, -1, |
445 | children, ARRAY_SIZE(palmas_children), | 455 | children, ARRAY_SIZE(palmas_children), |
446 | NULL, regmap_irq_chip_get_base(palmas->irq_data)); | 456 | NULL, regmap_irq_chip_get_base(palmas->irq_data)); |
@@ -472,6 +482,7 @@ static const struct i2c_device_id palmas_i2c_id[] = { | |||
472 | { "twl6035", }, | 482 | { "twl6035", }, |
473 | { "twl6037", }, | 483 | { "twl6037", }, |
474 | { "tps65913", }, | 484 | { "tps65913", }, |
485 | { /* end */ } | ||
475 | }; | 486 | }; |
476 | MODULE_DEVICE_TABLE(i2c, palmas_i2c_id); | 487 | MODULE_DEVICE_TABLE(i2c, palmas_i2c_id); |
477 | 488 | ||