summaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-arizona.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-01 19:10:28 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-02 11:54:01 +0100
commitdb924ff5c7297cca85eb0faa79ea29e988f96420 (patch)
tree05f665120f345e1e841265baf9f874426fa538cf /drivers/extcon/extcon-arizona.c
parent9dd5e53d9d2f933039eb2d5e4052afa249f638ba (diff)
downloadtalos-obmc-linux-db924ff5c7297cca85eb0faa79ea29e988f96420.tar.gz
talos-obmc-linux-db924ff5c7297cca85eb0faa79ea29e988f96420.zip
extcon: arizona: Don't ground flip when using HPDET identification
This extra check makes the procedure take longer and is of marginal use in identification so do not execute it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/extcon/extcon-arizona.c')
-rw-r--r--drivers/extcon/extcon-arizona.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index c18cf14067c6..7c4ce812d735 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -470,29 +470,7 @@ static int arizona_hpdet_do_id(struct arizona_extcon_info *info, int *reading)
*/
if (arizona->pdata.hpdet_acc_id) {
info->hpdet_res[info->num_hpdet_res++] = *reading;
-
- /*
- * If the impedence is too high don't measure the
- * second ground.
- */
- if (info->num_hpdet_res == 1 && *reading >= 45) {
- dev_dbg(arizona->dev, "Skipping ground flip\n");
- info->hpdet_res[info->num_hpdet_res++] = *reading;
- }
-
- if (info->num_hpdet_res == 1) {
- dev_dbg(arizona->dev, "Flipping ground\n");
-
- regmap_update_bits(arizona->regmap,
- ARIZONA_ACCESSORY_DETECT_MODE_1,
- ARIZONA_ACCDET_SRC,
- ~info->micd_modes[0].src);
-
- regmap_update_bits(arizona->regmap,
- ARIZONA_HEADPHONE_DETECT_1,
- ARIZONA_HP_POLL, ARIZONA_HP_POLL);
- return -EAGAIN;
- }
+ info->hpdet_res[info->num_hpdet_res++] = *reading;
/* Only check the mic directly if we didn't already ID it */
if (id_gpio && info->num_hpdet_res == 2 &&
OpenPOWER on IntegriCloud