aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-arizona.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-05 12:48:49 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-11 11:06:25 -0500
commitc37b387f077c54c5a01fa240dc8448b60bd731c1 (patch)
tree9d6b15e5e6a557288e5b487ed3c50bf1570c0db0 /drivers/extcon/extcon-arizona.c
parent5d9ab708200fefc3ec6e4454c65584d14ce716b0 (diff)
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/extcon/extcon-arizona.c')
-rw-r--r--drivers/extcon/extcon-arizona.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index aeaf217a05ee..d9918421e80b 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -451,6 +451,10 @@ static int arizona_hpdet_do_id(struct arizona_extcon_info *info, int *reading)
451 info->hpdet_res[0], info->hpdet_res[1], 451 info->hpdet_res[0], info->hpdet_res[1],
452 info->hpdet_res[2]); 452 info->hpdet_res[2]);
453 453
454
455 /* Take the headphone impedance for the main report */
456 *reading = info->hpdet_res[0];
457
454 /* 458 /*
455 * Either the two grounds measure differently or we 459 * Either the two grounds measure differently or we
456 * measure the mic as high impedance. 460 * measure the mic as high impedance.
@@ -466,9 +470,6 @@ static int arizona_hpdet_do_id(struct arizona_extcon_info *info, int *reading)
466 dev_err(arizona->dev, 470 dev_err(arizona->dev,
467 "Failed to report mic: %d\n", ret); 471 "Failed to report mic: %d\n", ret);
468 } 472 }
469
470 /* Take the headphone impedance for the main report */
471 *reading = info->hpdet_res[1];
472 } else { 473 } else {
473 dev_dbg(arizona->dev, "Detected headphone\n"); 474 dev_dbg(arizona->dev, "Detected headphone\n");
474 } 475 }