diff options
| author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2013-11-14 11:18:25 -0500 |
|---|---|---|
| committer | Chanwoo Choi <cw00.choi@samsung.com> | 2014-01-06 21:54:28 -0500 |
| commit | 77438610ffd93462348346430d17470cd3ce7bbc (patch) | |
| tree | 6480bc1e6ba79561867a89d5f4fe5cb5aab1fdf8 /drivers/extcon | |
| parent | 9141461d81717ef94b7d38a4b3581114ac1307db (diff) | |
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>
Diffstat (limited to 'drivers/extcon')
| -rw-r--r-- | drivers/extcon/extcon-arizona.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 4487bdaf9b43..c20602f601ee 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c | |||
| @@ -435,6 +435,8 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) | |||
| 435 | } | 435 | } |
| 436 | 436 | ||
| 437 | val &= ARIZONA_HP_LVL_B_MASK; | 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 | regmap_read(arizona->regmap, ARIZONA_HEADPHONE_DETECT_1, | 441 | regmap_read(arizona->regmap, ARIZONA_HEADPHONE_DETECT_1, |
| 440 | &range); | 442 | &range); |
| @@ -1147,6 +1149,16 @@ static int arizona_extcon_probe(struct platform_device *pdev) | |||
| 1147 | break; | 1149 | break; |
| 1148 | } | 1150 | } |
| 1149 | break; | 1151 | break; |
| 1152 | case WM5110: | ||
| 1153 | switch (arizona->rev) { | ||
| 1154 | case 0 ... 2: | ||
| 1155 | break; | ||
| 1156 | default: | ||
| 1157 | info->micd_clamp = true; | ||
| 1158 | info->hpdet_ip = 2; | ||
| 1159 | break; | ||
| 1160 | } | ||
| 1161 | break; | ||
| 1150 | default: | 1162 | default: |
| 1151 | break; | 1163 | break; |
| 1152 | } | 1164 | } |
