Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3966716ybl; Mon, 9 Dec 2019 03:11:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwcxix7kOT1PY5pWa33JOkPmFhSNb608tdErFARsUFqGG943im6Igbjo89ZOCkMCpowDCug X-Received: by 2002:a9d:7d9a:: with SMTP id j26mr22021579otn.283.1575889902897; Mon, 09 Dec 2019 03:11:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575889902; cv=none; d=google.com; s=arc-20160816; b=KxKaLyRlrv7dp0RiBx6FEMlIMQXNeWLeg38LNYnBiK1fsK20cR5lBqyRS6AqYUfPOs 4Vv7gFWwWFSO8dYMjo98DnTcpppI8mv9gyHiPYcXEScjckx97bkM0N0l4jdyMClAgL12 V48fFFkTGvMb8cpeXIgpVE39FWFoFGPjEUHMnNpHt6TFhg5YM3lczA+XrjjjCH00a8au 2ZAj3/XV30ttwnidTggI/BOJOVM5X5WQxMibagVSWL1s4v4d2fw+9nZCz/Gcauebi6i9 IPQ0KeTi53gznFN5iC84DsZ9BAKcDrPSttT+BjSuYMhhJyXtn5HJ+fcclDsTzumS19X/ Qurw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NpGnmX4h5Asv3Jmb0COAbu34D0iF1UVdc6wCTEKapcI=; b=J4769fyKX/y/fSZYYiSwkrQf6CyAUm3fBxXhyyP3jZMDebZQKEysg0HHeT2f8b8VoR ENg9HinayT3q6O37sTRj5mMmHgCyDVTRlfLZmAonR7UPIeNjZlM6MMVaBFHvsymxzv+5 Wplv0BJVeQnm0uKnSViHJK3udy/0A8S0bjWBBn5kMyT5oKLYaIxTbvE5yB5cpbYcs7xC rIf/ieSplvDCHbPWOQ0go4PtTCxVJdFiyGRLsEmzNWlEvVgt2984lHH0MLOzJ/Ygmd+K OYR8pfOnjepzYkWLrWvb8QQ+vdzIRTOxGx7a2J71SY+EjuYzwHbOR4UQOBGuuSiSw5mv hVWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=U6AS4hho; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=opensource.cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g26si12256163otk.324.2019.12.09.03.11.30; Mon, 09 Dec 2019 03:11:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=U6AS4hho; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=opensource.cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727727AbfLILJ3 (ORCPT + 99 others); Mon, 9 Dec 2019 06:09:29 -0500 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:15728 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727674AbfLILJW (ORCPT ); Mon, 9 Dec 2019 06:09:22 -0500 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xB9B3UZk022346; Mon, 9 Dec 2019 05:09:19 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=PODMain02222019; bh=NpGnmX4h5Asv3Jmb0COAbu34D0iF1UVdc6wCTEKapcI=; b=U6AS4hhoNclX3+mqhbUwUOSaebTdYd1G47hzAvEIzGHZqaXW+mdim5MrdqGQ/5elytaJ Luv8hjPU7O4MGvkZVIviV+FZiF13TZAEmQTIZHT52Z6o2S2DrEQ4j8IlrFjsXZA77oLh MdT61kj5RkYVIU5G/zOZvZBUWVUx93kk4opHFxPlR9nIDO/4xWQmi+OECvFcLWgIfaqP bvLjzbyfNMzkqMr0IAL/BsHQX0nPrvbsKHRSlr3YxSsVUy67+IKeWK6QQUsplPT1svMJ NKaiQlIN5BgRgR2c+BYYnL/7Fx7g6PwlkLzRgWlmIGii8834Gcxdpq+9rOmXHYVj/6H9 sQ== Authentication-Results: ppops.net; spf=fail smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from ediex01.ad.cirrus.com ([5.172.152.52]) by mx0a-001ae601.pphosted.com with ESMTP id 2wrac6j0mu-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 09 Dec 2019 05:09:19 -0600 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Mon, 9 Dec 2019 11:09:16 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1591.10 via Frontend Transport; Mon, 9 Dec 2019 11:09:16 +0000 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 6D7842A1; Mon, 9 Dec 2019 11:09:16 +0000 (UTC) From: Charles Keepax To: CC: , , Subject: [PATCH 06/10] extcon: arizona: Remove unnecessary sets of ACCDET_MODE Date: Mon, 9 Dec 2019 11:09:12 +0000 Message-ID: <20191209110916.29524-6-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191209110916.29524-1-ckeepax@opensource.cirrus.com> References: <20191209110916.29524-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-SPF-Result: fail X-Proofpoint-SPF-Record: v=spf1 include:spf-001ae601.pphosted.com include:spf.protection.outlook.com -all X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 clxscore=1015 adultscore=0 impostorscore=0 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912090094 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org arizona_start_mic sets ACCDET_MODE as required for the microphone detection as such it is redundant to set this outside of this function. Signed-off-by: Charles Keepax --- drivers/extcon/extcon-arizona.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 5ae111ee3d631..e7c198e798e27 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -668,11 +668,6 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data) if (id_gpio) gpio_set_value_cansleep(id_gpio, 0); - /* Revert back to MICDET mode */ - regmap_update_bits(arizona->regmap, - ARIZONA_ACCESSORY_DETECT_MODE_1, - ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); - /* If we have a mic then reenable MICDET */ if (mic || info->mic) arizona_start_mic(info); @@ -732,9 +727,6 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info) arizona_extcon_hp_clamp(info, false); pm_runtime_put_autosuspend(info->dev); - regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, - ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); - /* Just report headphone */ ret = extcon_set_state_sync(info->edev, EXTCON_JACK_HEADPHONE, true); if (ret != 0) @@ -789,9 +781,6 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info) return; err: - regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, - ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); - /* Just report headphone */ ret = extcon_set_state_sync(info->edev, EXTCON_JACK_HEADPHONE, true); if (ret != 0) -- 2.11.0