Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Charles Keepax and committed by
Chanwoo Choi
77438610 9141461d

+12
+12
drivers/extcon/extcon-arizona.c
··· 435 435 } 436 436 437 437 val &= ARIZONA_HP_LVL_B_MASK; 438 + /* Convert to ohms, the value is in 0.5 ohm increments */ 439 + val /= 2; 438 440 439 441 regmap_read(arizona->regmap, ARIZONA_HEADPHONE_DETECT_1, 440 442 &range); ··· 1146 1144 default: 1147 1145 info->micd_clamp = true; 1148 1146 info->hpdet_ip = 1; 1147 + break; 1148 + } 1149 + break; 1150 + case WM5110: 1151 + switch (arizona->rev) { 1152 + case 0 ... 2: 1153 + break; 1154 + default: 1155 + info->micd_clamp = true; 1156 + info->hpdet_ip = 2; 1149 1157 break; 1150 1158 } 1151 1159 break;