extcon: arizona: Use bypass mode for MICVDD
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 7 Sep 2012 09:01:15 +0000 (17:01 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 10 Sep 2012 03:25:14 +0000 (11:25 +0800)
We can perform microphone detection with MICVDD in bypass mode so try to
enable that during startup for minimal power - other users or machine
constraints will prevent bypass mode being activated if it is unsuitable.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/extcon/extcon-arizona.c

index 427a289f32a5a2707fd417ee56468600d572cbb4..6c19833ed2d06033e9b683ad602dd6c62905bac6 100644 (file)
@@ -434,6 +434,11 @@ static int __devinit arizona_extcon_probe(struct platform_device *pdev)
        regmap_update_bits(arizona->regmap, ARIZONA_JACK_DETECT_ANALOGUE,
                           ARIZONA_JD1_ENA, ARIZONA_JD1_ENA);
 
+       ret = regulator_allow_bypass(info->micvdd, true);
+       if (ret != 0)
+               dev_warn(arizona->dev, "Failed to set MICVDD to bypass: %d\n",
+                        ret);
+
        pm_runtime_put(&pdev->dev);
 
        return 0;