Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 355070
b: refs/heads/master
c: e6dd8cf
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jan 23, 2013
1 parent 2fdebbe commit 7ae5ee2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: 4e6168779508f62c27e43a4f7ded786bfdb0a394
refs/heads/master: e6dd8cf223d1a41b3c3168e97e2c33df0ef05e9d
10 changes: 4 additions & 6 deletions trunk/drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include <linux/mfd/arizona/pdata.h>
#include <linux/mfd/arizona/registers.h>

#define ARIZONA_DEFAULT_HP 32

#define ARIZONA_NUM_BUTTONS 6

#define ARIZONA_ACCDET_MODE_MIC 0
Expand Down Expand Up @@ -208,7 +206,7 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info)
if (!(val & ARIZONA_HP_DONE)) {
dev_err(arizona->dev, "HPDET did not complete: %x\n",
val);
val = ARIZONA_DEFAULT_HP;
return -EAGAIN;
}

val &= ARIZONA_HP_LVL_MASK;
Expand All @@ -218,14 +216,14 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info)
if (!(val & ARIZONA_HP_DONE_B)) {
dev_err(arizona->dev, "HPDET did not complete: %x\n",
val);
return ARIZONA_DEFAULT_HP;
return -EAGAIN;
}

ret = regmap_read(arizona->regmap, ARIZONA_HP_DACVAL, &val);
if (ret != 0) {
dev_err(arizona->dev, "Failed to read HP value: %d\n",
ret);
return ARIZONA_DEFAULT_HP;
return -EAGAIN;
}

regmap_read(arizona->regmap, ARIZONA_HEADPHONE_DETECT_1,
Expand Down Expand Up @@ -267,7 +265,7 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info)
if (!(val & ARIZONA_HP_DONE_B)) {
dev_err(arizona->dev, "HPDET did not complete: %x\n",
val);
return ARIZONA_DEFAULT_HP;
return -EAGAIN;
}

val &= ARIZONA_HP_LVL_B_MASK;
Expand Down

0 comments on commit 7ae5ee2

Please sign in to comment.