lkml.org 
[lkml]   [2013]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 10/11] extcon: arizona: Always take the first HPDET reading as the final one
Date
This should always be the most accurate reading for supported accessory
configurations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/extcon/extcon-arizona.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index aeaf217..d991842 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)
info->hpdet_res[0], info->hpdet_res[1],
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
* measure the mic as high impedance.
@@ -466,9 +470,6 @@ static int arizona_hpdet_do_id(struct arizona_extcon_info *info, int *reading)
dev_err(arizona->dev,
"Failed to report mic: %d\n", ret);
}
-
- /* Take the headphone impedance for the main report */
- *reading = info->hpdet_res[1];
} else {
dev_dbg(arizona->dev, "Detected headphone\n");
}
--
1.7.10.4


\
 
 \ /
  Last update: 2013-02-11 18:21    [W:0.084 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site