Commit c37b387f authored by Mark Brown's avatar Mark Brown

extcon: arizona: Always take the first HPDET reading as the final one

This should always be the most accurate reading for supported accessory
configurations.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5d9ab708
...@@ -451,6 +451,10 @@ static int arizona_hpdet_do_id(struct arizona_extcon_info *info, int *reading) ...@@ -451,6 +451,10 @@ static int arizona_hpdet_do_id(struct arizona_extcon_info *info, int *reading)
info->hpdet_res[0], info->hpdet_res[1], info->hpdet_res[0], info->hpdet_res[1],
info->hpdet_res[2]); info->hpdet_res[2]);
/* Take the headphone impedance for the main report */
*reading = info->hpdet_res[0];
/* /*
* Either the two grounds measure differently or we * Either the two grounds measure differently or we
* measure the mic as high impedance. * measure the mic as high impedance.
...@@ -466,9 +470,6 @@ static int arizona_hpdet_do_id(struct arizona_extcon_info *info, int *reading) ...@@ -466,9 +470,6 @@ static int arizona_hpdet_do_id(struct arizona_extcon_info *info, int *reading)
dev_err(arizona->dev, dev_err(arizona->dev,
"Failed to report mic: %d\n", ret); "Failed to report mic: %d\n", ret);
} }
/* Take the headphone impedance for the main report */
*reading = info->hpdet_res[1];
} else { } else {
dev_dbg(arizona->dev, "Detected headphone\n"); dev_dbg(arizona->dev, "Detected headphone\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment