Commit 439b8bdd authored by Dmitry Lavnikevich's avatar Dmitry Lavnikevich Committed by Lee Jones

mfd: da9063: Get irq base dynamically before registering device

After registering mfd device with proper irq_base
platform_get_irq_byname() calls will return VIRQ instead of local IRQ.
This fixes da9063 rtc registration issue:
da9063-rtc da9063-rtc: Failed to request ALARM IRQ 1: -22
Signed-off-by: default avatarDmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 2c20f6de
...@@ -118,7 +118,7 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq) ...@@ -118,7 +118,7 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq)
da9063->irq_base = pdata->irq_base; da9063->irq_base = pdata->irq_base;
} else { } else {
da9063->flags = 0; da9063->flags = 0;
da9063->irq_base = 0; da9063->irq_base = -1;
} }
da9063->chip_irq = irq; da9063->chip_irq = irq;
...@@ -168,6 +168,8 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq) ...@@ -168,6 +168,8 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq)
return ret; return ret;
} }
da9063->irq_base = regmap_irq_chip_get_base(da9063->regmap_irq);
ret = mfd_add_devices(da9063->dev, -1, da9063_devs, ret = mfd_add_devices(da9063->dev, -1, da9063_devs,
ARRAY_SIZE(da9063_devs), NULL, da9063->irq_base, ARRAY_SIZE(da9063_devs), NULL, da9063->irq_base,
NULL); NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment