Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363188
b: refs/heads/master
c: db924ff
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Apr 2, 2013
1 parent 0088aed commit 2ce9701
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9dd5e53d9d2f933039eb2d5e4052afa249f638ba
refs/heads/master: db924ff5c7297cca85eb0faa79ea29e988f96420
24 changes: 1 addition & 23 deletions trunk/drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 2ce9701

Please sign in to comment.