aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2015-06-25 11:47:02 -0400
committerChanwoo Choi <cw00.choi@samsung.com>2015-08-09 22:48:56 -0400
commit57f70ef9bd19378b51a282be6b46b45b70d4980d (patch)
treebd15ae80140e9e9af9b7897328b66e0798d698ac /drivers/extcon
parent7eae43aeab27e8f65c0a2e31567fafcfc7aa4649 (diff)
extcon: arizona: Declare 3-pole jack if we detect open circuit on mic
Detecting an open-circuit on the microphone pin, usually means the headset has a microphone but the cable is faulty. Currently the code will simply stop detecting and declare nothing in this situation. It is better to declare this as headphones such that the user can still use their headset as plain headphones even if the microphone is faulty. 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 2336de66f442..eaf0644b5506 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -829,7 +829,10 @@ static void arizona_micd_detect(struct work_struct *work)
829 /* Due to jack detect this should never happen */ 829 /* Due to jack detect this should never happen */
830 if (!(val & ARIZONA_MICD_STS)) { 830 if (!(val & ARIZONA_MICD_STS)) {
831 dev_warn(arizona->dev, "Detected open circuit\n"); 831 dev_warn(arizona->dev, "Detected open circuit\n");
832 info->mic = false;
833 arizona_stop_mic(info);
832 info->detecting = false; 834 info->detecting = false;
835 arizona_identify_headphone(info);
833 goto handled; 836 goto handled;
834 } 837 }
835 838