Commit 92d80139 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

mfd: arizona: Disable control interface error reporting for early devices

Early revisions of the initial Arizona-based devices can generate spurious
control interface errors in certain circumstances. Avoid causing confusion
by disabling the control interface error reporting on these devices.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent a70abacb
...@@ -156,18 +156,35 @@ int arizona_irq_init(struct arizona *arizona) ...@@ -156,18 +156,35 @@ int arizona_irq_init(struct arizona *arizona)
int flags = IRQF_ONESHOT; int flags = IRQF_ONESHOT;
int ret, i; int ret, i;
const struct regmap_irq_chip *aod, *irq; const struct regmap_irq_chip *aod, *irq;
bool ctrlif_error = true;
switch (arizona->type) { switch (arizona->type) {
#ifdef CONFIG_MFD_WM5102 #ifdef CONFIG_MFD_WM5102
case WM5102: case WM5102:
aod = &wm5102_aod; aod = &wm5102_aod;
irq = &wm5102_irq; irq = &wm5102_irq;
switch (arizona->rev) {
case 0:
ctrlif_error = false;
break;
default:
break;
}
break; break;
#endif #endif
#ifdef CONFIG_MFD_WM5110 #ifdef CONFIG_MFD_WM5110
case WM5110: case WM5110:
aod = &wm5110_aod; aod = &wm5110_aod;
irq = &wm5110_irq; irq = &wm5110_irq;
switch (arizona->rev) {
case 0:
ctrlif_error = false;
break;
default:
break;
}
break; break;
#endif #endif
default: default:
...@@ -226,13 +243,17 @@ int arizona_irq_init(struct arizona *arizona) ...@@ -226,13 +243,17 @@ int arizona_irq_init(struct arizona *arizona)
} }
/* Handle control interface errors in the core */ /* Handle control interface errors in the core */
i = arizona_map_irq(arizona, ARIZONA_IRQ_CTRLIF_ERR); if (ctrlif_error) {
ret = request_threaded_irq(i, NULL, arizona_ctrlif_err, IRQF_ONESHOT, i = arizona_map_irq(arizona, ARIZONA_IRQ_CTRLIF_ERR);
"Control interface error", arizona); ret = request_threaded_irq(i, NULL, arizona_ctrlif_err,
if (ret != 0) { IRQF_ONESHOT,
dev_err(arizona->dev, "Failed to request boot done %d: %d\n", "Control interface error", arizona);
arizona->irq, ret); if (ret != 0) {
goto err_ctrlif; dev_err(arizona->dev,
"Failed to request CTRLIF_ERR %d: %d\n",
arizona->irq, ret);
goto err_ctrlif;
}
} }
ret = request_threaded_irq(arizona->irq, NULL, arizona_irq_thread, ret = request_threaded_irq(arizona->irq, NULL, arizona_irq_thread,
......
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