Commit 62571c29 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

mfd: Initialise WM8350 interrupts earlier

Ensure that the interrupt handling is configured before we do platform
specific init. This allows the platform specific initialisation to
configure things which use interrupts safely.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@openedhand.com>
parent 720fd66d
...@@ -1404,15 +1404,6 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq, ...@@ -1404,15 +1404,6 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq,
return ret; return ret;
} }
if (pdata && pdata->init) {
ret = pdata->init(wm8350);
if (ret != 0) {
dev_err(wm8350->dev, "Platform init() failed: %d\n",
ret);
goto err;
}
}
mutex_init(&wm8350->auxadc_mutex); mutex_init(&wm8350->auxadc_mutex);
mutex_init(&wm8350->irq_mutex); mutex_init(&wm8350->irq_mutex);
INIT_WORK(&wm8350->irq_work, wm8350_irq_worker); INIT_WORK(&wm8350->irq_work, wm8350_irq_worker);
...@@ -1430,6 +1421,15 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq, ...@@ -1430,6 +1421,15 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq,
} }
wm8350->chip_irq = irq; wm8350->chip_irq = irq;
if (pdata && pdata->init) {
ret = pdata->init(wm8350);
if (ret != 0) {
dev_err(wm8350->dev, "Platform init() failed: %d\n",
ret);
goto err;
}
}
wm8350_reg_write(wm8350, WM8350_SYSTEM_INTERRUPTS_MASK, 0x0); wm8350_reg_write(wm8350, WM8350_SYSTEM_INTERRUPTS_MASK, 0x0);
wm8350_client_dev_register(wm8350, "wm8350-codec", wm8350_client_dev_register(wm8350, "wm8350-codec",
......
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