diff options
Diffstat (limited to 'drivers/mfd/da9055-core.c')
-rw-r--r-- | drivers/mfd/da9055-core.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mfd/da9055-core.c b/drivers/mfd/da9055-core.c index 49cb23d3746..d3670cd3c3c 100644 --- a/drivers/mfd/da9055-core.c +++ b/drivers/mfd/da9055-core.c @@ -379,8 +379,9 @@ static struct regmap_irq_chip da9055_regmap_irq_chip = { int da9055_device_init(struct da9055 *da9055) { - struct da9055_pdata *pdata = da9055->dev->platform_data; + struct da9055_pdata *pdata = dev_get_platdata(da9055->dev); int ret; + uint8_t clear_events[3] = {0xFF, 0xFF, 0xFF}; if (pdata && pdata->init != NULL) pdata->init(da9055); @@ -390,6 +391,10 @@ int da9055_device_init(struct da9055 *da9055) else da9055->irq_base = pdata->irq_base; + ret = da9055_group_write(da9055, DA9055_REG_EVENT_A, 3, clear_events); + if (ret < 0) + return ret; + ret = regmap_add_irq_chip(da9055->regmap, da9055->chip_irq, IRQF_TRIGGER_LOW | IRQF_ONESHOT, da9055->irq_base, &da9055_regmap_irq_chip, |