mfd: arizona: Disable control interface error reporting for early devices
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 7 Aug 2012 18:57:53 +0000 (19:57 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 11 Sep 2012 09:40:13 +0000 (11:40 +0200)
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/arizona-irq.c

index 98ac345f468e23517d904a80ea6035933bac8c9c..64940c6da93c031b7fb5e8dad88366b79c1eaa57 100644 (file)
@@ -156,18 +156,35 @@ int arizona_irq_init(struct arizona *arizona)
        int flags = IRQF_ONESHOT;
        int ret, i;
        const struct regmap_irq_chip *aod, *irq;
+       bool ctrlif_error = true;
 
        switch (arizona->type) {
 #ifdef CONFIG_MFD_WM5102
        case WM5102:
                aod = &wm5102_aod;
                irq = &wm5102_irq;
+
+               switch (arizona->rev) {
+               case 0:
+                       ctrlif_error = false;
+                       break;
+               default:
+                       break;
+               }
                break;
 #endif
 #ifdef CONFIG_MFD_WM5110
        case WM5110:
                aod = &wm5110_aod;
                irq = &wm5110_irq;
+
+               switch (arizona->rev) {
+               case 0:
+                       ctrlif_error = false;
+                       break;
+               default:
+                       break;
+               }
                break;
 #endif
        default:
@@ -226,13 +243,17 @@ int arizona_irq_init(struct arizona *arizona)
        }
 
        /* Handle control interface errors in the core */
-       i = arizona_map_irq(arizona, ARIZONA_IRQ_CTRLIF_ERR);
-       ret = request_threaded_irq(i, NULL, arizona_ctrlif_err, IRQF_ONESHOT,
-                                  "Control interface error", arizona);
-       if (ret != 0) {
-               dev_err(arizona->dev, "Failed to request boot done %d: %d\n",
-                       arizona->irq, ret);
-               goto err_ctrlif;
+       if (ctrlif_error) {
+               i = arizona_map_irq(arizona, ARIZONA_IRQ_CTRLIF_ERR);
+               ret = request_threaded_irq(i, NULL, arizona_ctrlif_err,
+                                          IRQF_ONESHOT,
+                                          "Control interface error", arizona);
+               if (ret != 0) {
+                       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,