瀏覽代碼

extcon: arizona: Stop microphone detection if we give up on it

There should be no point in continuing to try to detect a microphone any
more so stop doing so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Brown 13 年之前
父節點
當前提交
9ef2224d9f
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/extcon/extcon-arizona.c

+ 2 - 0
drivers/extcon/extcon-arizona.c

@@ -196,6 +196,8 @@ static irqreturn_t arizona_micdet(int irq, void *data)
 		if (info->jack_flips >= info->micd_num_modes) {
 			dev_dbg(arizona->dev, "Detected headphone\n");
 			info->detecting = false;
+			arizona_stop_mic(info);
+
 			ret = extcon_set_cable_state_(&info->edev,
 						      ARIZONA_CABLE_HEADPHONE,
 						      true);