Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbbFZBIH (ORCPT ); Thu, 25 Jun 2015 21:08:07 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:37715 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbbFZBH6 (ORCPT ); Thu, 25 Jun 2015 21:07:58 -0400 X-AuditID: cbfee691-f79ca6d00000456a-70-558ca5ec52b3 Message-id: <558CA5EB.5000807@samsung.com> Date: Fri, 26 Jun 2015 10:07:55 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-version: 1.0 To: Charles Keepax Cc: myungjoo.ham@samsung.com, linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com Subject: Re: [PATCH] extcon: arizona: Declare 3-pole jack if we detect open circuit on mic References: <1435247222-28821-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> In-reply-to: <1435247222-28821-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42JZI2JSpPtmaU+owaUWXot/U26wW1zeNYfN 4nbjCjaL5W//szmweLyc+JvNo2/LKkaPz5vkApijuGxSUnMyy1KL9O0SuDK+7/zJWHCSs2Lf 8ttsDYxP2LsYOTkkBEwkdu9bzwxhi0lcuLeeDcQWEljKKHHqiSdMTePeJpYuRi6g+HRGiTU/ LzNBOA8YJb5eeQjWzSugJfH+xm9WEJtFQFVi6snJYHE2oPj+FzfApooKhEmsnH6FBaJeUOLH 5HtgtoiAhcSUJbfA6pkFEiUuXmpjBLGFBWIk/u67C3VRqMSzbcuZQGxOoDlNn76yQNTrSOxv ncYGYctLbF7zlhnkOAmBZewSfb2t7BAHCUh8m3wIqIEDKCErsekA1MeSEgdX3GCZwCg2C8lJ s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Z8H/+rZ/IKK9isfNboar7afmnpiyrcrEd5r 9PQN955oPVxg/zSy/cHKd4HhVY9+RFoorG2QObl87aO9bpNmlHyar+CvdEH5Z4684a0c5RkH eFo38f+TrneInix016pyqdyb9V4G5fcrom5+/e6xY4pr/I0ct553zu5KLMUZiYZazEXFiQC+ xUvN6AIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1437 Lines: 38 On 06/26/2015 12:47 AM, Charles Keepax wrote: > 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 > --- > drivers/extcon/extcon-arizona.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c > index 4c47eb2..e216a97 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) > /* Due to jack detect this should never happen */ > if (!(val & ARIZONA_MICD_STS)) { > dev_warn(arizona->dev, "Detected open circuit\n"); > + info->mic = false; > + arizona_stop_mic(info); > info->detecting = false; > + arizona_identify_headphone(info); > goto handled; > } > > Applied it. Thanks, Chanwoo Choi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/