Commit 77438610 authored by Charles Keepax's avatar Charles Keepax Committed by Chanwoo Choi

extcon: arizona: Add support for headphone detection on wm5110 rev D

wm5110 rev D is the first chip to use headphone detection IP 2, specify
such and make a small correction as the impedance value is actually read
in 0.5 ohm increments now.
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 9141461d
...@@ -435,6 +435,8 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) ...@@ -435,6 +435,8 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info)
} }
val &= ARIZONA_HP_LVL_B_MASK; val &= ARIZONA_HP_LVL_B_MASK;
/* Convert to ohms, the value is in 0.5 ohm increments */
val /= 2;
regmap_read(arizona->regmap, ARIZONA_HEADPHONE_DETECT_1, regmap_read(arizona->regmap, ARIZONA_HEADPHONE_DETECT_1,
&range); &range);
...@@ -1147,6 +1149,16 @@ static int arizona_extcon_probe(struct platform_device *pdev) ...@@ -1147,6 +1149,16 @@ static int arizona_extcon_probe(struct platform_device *pdev)
break; break;
} }
break; break;
case WM5110:
switch (arizona->rev) {
case 0 ... 2:
break;
default:
info->micd_clamp = true;
info->hpdet_ip = 2;
break;
}
break;
default: default:
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment