extcon: Add the support for the capability of each property
[cascardo/linux.git] / drivers / extcon / extcon-arizona.c
index 1d8e0a5..493bd9f 100644 (file)
@@ -183,7 +183,7 @@ static void arizona_extcon_hp_clamp(struct arizona_extcon_info *info,
                if (clamp)
                        val = ARIZONA_RMV_SHRT_HP1L;
                break;
-       };
+       }
 
        snd_soc_dapm_mutex_lock(arizona->dapm);
 
@@ -1149,10 +1149,13 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
                                         info->micd_ranges[i].key, 0);
                input_sync(info->input);
 
-               ret = extcon_update_state(info->edev, 0xffffffff, 0);
-               if (ret != 0)
-                       dev_err(arizona->dev, "Removal report failed: %d\n",
-                               ret);
+               for (i = 0; i < ARRAY_SIZE(arizona_cable) - 1; i++) {
+                       ret = extcon_set_cable_state_(info->edev,
+                                       arizona_cable[i], false);
+                       if (ret != 0)
+                               dev_err(arizona->dev,
+                                       "Removal report failed: %d\n", ret);
+               }
 
                regmap_update_bits(arizona->regmap,
                                   ARIZONA_JACK_DETECT_DEBOUNCE,