Skip to contentSkip to conversation

extcon: arizona: Use bypass mode for MICVDD

PATCH In review Mark Brown 2 participants 2 messages Sep 7, 2012 External connector subsystem (extcon)

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 extcon: arizona: Use bypass mode for MICVDD

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.

---

This depends on the newly added regulator bypass support which will be going in during the merge window so probably the easiest thing here is if I apply this to the regulator tree? I will be publishing a signed tag if you want to pull it in but for a simple, non-invasive change like this it seems like more trouble than it's worth.

 drivers/extcon/extcon-arizona.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/extcon/extcon-arizona.c +5 -0
index dc81d5f..cdab9e5 100644
@@ -483,6 +483,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);
 
 	ret = input_register_device(info->input);
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Mark Brown

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.

Quoted 8 lines

---

This depends on the newly added regulator bypass support which will be going in during the merge window so probably the easiest thing here is if I apply this to the regulator tree? I will be publishing a signed tag if you want to pull it in but for a simple, non-invasive change like this it seems like more trouble than it's worth.

No objection from me for you to take this through the regulator tree: