From patchwork Thu Jul 30 14:24:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 11693199 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 608C814B7 for ; Thu, 30 Jul 2020 14:25:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7933B20578 for ; Thu, 30 Jul 2020 14:25:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="YzRc4L1e"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="a/oIX2tA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7933B20578 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A6C501772; Thu, 30 Jul 2020 16:24:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A6C501772 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1596119128; bh=4GY3TnLCNBSy7Cu1xvpU0dcwNnwNMFtY57bUH90+q7k=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=YzRc4L1edhLNedi8OqDOfU6tUDY1BkSBM5F3MfMsF+QHLFGrqbdpVtY9wKzEhUj+X xPu1kUHAR56pYGSb1rLV67zEuQS0Ttarw8O/fh6RchgAFWqyvKWmpYQINhHNq4qA+j x1hdwmzPnoaR3R16onm6aAeDQltWpv9ZPKaUuBLo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3AAA4F8021E; Thu, 30 Jul 2020 16:24:40 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 03104F8012F; Thu, 30 Jul 2020 16:24:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DC74BF8012F for ; Thu, 30 Jul 2020 16:24:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DC74BF8012F Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="a/oIX2tA" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 06UEOPK0120202; Thu, 30 Jul 2020 09:24:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1596119065; bh=Tg6ayNdN7O4/CjjcMHoaiFkUayvdOa+Ei5rN0VtBwB0=; h=From:To:CC:Subject:Date; b=a/oIX2tA3Vi6briZJB3wH4zAU3Zt3eBiB+n1ONHq1Ll6fOMCQFdMWp0/MzhzeaTm3 4AXIBI1C+WSF7jbC32W4mjIUwMRlVIY6NPTwdWV4Hz2QnxL/3ISIfxR8C0qXmZSPF7 fCUqc8tRxkE0fKe+MUVONtAwffct2GAyldawBDPg= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 06UEOPdS075710 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 30 Jul 2020 09:24:25 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 30 Jul 2020 09:24:25 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 30 Jul 2020 09:24:25 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 06UEOPlG115124; Thu, 30 Jul 2020 09:24:25 -0500 From: Dan Murphy To: , , , Subject: [PATCH 1/2] ASoC: tlv320adcx140: Fix GPO register start address Date: Thu, 30 Jul 2020 09:24:18 -0500 Message-ID: <20200730142419.28205-1-dmurphy@ti.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Dan Murphy X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The header was updated to align with the data sheet to start the GPO_CFG at GPO_CFG0. The code was not updated to the change and therefore the GPO_CFG0 register was not written to. Fixes: 6617cff6a05e ("ASoC: tlv320adcx140: Add GPO configuration and drive output config") Signed-off-by: Dan Murphy --- sound/soc/codecs/tlv320adcx140.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c index 7bb9e9aa0c0a..fc7616dcf9b5 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -790,7 +790,7 @@ static int adcx140_configure_gpo(struct adcx140_priv *adcx140) gpo_output_val = gpo_outputs[0] << ADCX140_GPO_SHIFT | gpo_outputs[1]; - ret = regmap_write(adcx140->regmap, ADCX140_GPO_CFG1 + i, + ret = regmap_write(adcx140->regmap, ADCX140_GPO_CFG0 + i, gpo_output_val); if (ret) return ret; From patchwork Thu Jul 30 14:24:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 11693201 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C487A14B7 for ; Thu, 30 Jul 2020 14:26:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ED68620578 for ; Thu, 30 Jul 2020 14:26:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="MQiNHF2o"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="OpFrdnzI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED68620578 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7CC5717AB; Thu, 30 Jul 2020 16:25:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7CC5717AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1596119181; bh=4SNr9U9n2VqCsk7aFsbLKDBElxT5xp2izbQnFCj64sk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MQiNHF2orlSeCFJ6jZHRYhzaxuVqF9CnXmk8idBBDrcFROST9zs5jA3d+ug9Fmer9 iOkHXNZ6+jRW9xVeU57KpvDDcdXO4M4n+5ehEH2J+uSD/pQS/6pBuNDUtfIRz9fCNI 4JofKnkW6IbfDx6lupwHhcfAmo0l3LL3nfnusVp8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 587D3F80240; Thu, 30 Jul 2020 16:24:44 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 91B44F8027B; Thu, 30 Jul 2020 16:24:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8AF9DF8021C for ; Thu, 30 Jul 2020 16:24:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8AF9DF8021C Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="OpFrdnzI" Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 06UEOU1u045357; Thu, 30 Jul 2020 09:24:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1596119070; bh=4n4tczlb66rZ2sALZ2WA0y87szWgkh6JUgil+Oe8bG4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OpFrdnzIw7wxmHUPgpKtZ37mhzn5rW/q0d/QPd4pN9CXUTJ4hXb6bjnz0D2NGYr5N 7qYpdMRtw5INaLMXh96vNv3rCRP87aY5HCsDTv/pCcMnN2t0Gl+84klcjPBXbwp4ks F7y3UBy6m4ov9kBPadPDKstBcPzDTqH0shvsfBDE= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 06UEOU9r002073 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 30 Jul 2020 09:24:30 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 30 Jul 2020 09:24:30 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 30 Jul 2020 09:24:30 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 06UEOUbr023307; Thu, 30 Jul 2020 09:24:30 -0500 From: Dan Murphy To: , , , Subject: [PATCH 2/2] ASoC: tlv320adcx140: Move device reset to before programming Date: Thu, 30 Jul 2020 09:24:19 -0500 Message-ID: <20200730142419.28205-2-dmurphy@ti.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200730142419.28205-1-dmurphy@ti.com> References: <20200730142419.28205-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Dan Murphy X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Reset the device before programming the registers or all programming will be lost as the device resets registers to default settings. Signed-off-by: Dan Murphy --- sound/soc/codecs/tlv320adcx140.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c index fc7616dcf9b5..5cd50d841177 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -838,6 +838,10 @@ static int adcx140_codec_probe(struct snd_soc_component *component) bias_cfg = bias_source << ADCX140_MIC_BIAS_SHIFT | vref_source; + ret = adcx140_reset(adcx140); + if (ret) + goto out; + pdm_count = device_property_count_u32(adcx140->dev, "ti,pdm-edge-select"); if (pdm_count <= ADCX140_NUM_PDM_EDGES && pdm_count > 0) { @@ -885,10 +889,6 @@ static int adcx140_codec_probe(struct snd_soc_component *component) if (ret) goto out; - ret = adcx140_reset(adcx140); - if (ret) - goto out; - if (adcx140->supply_areg == NULL) sleep_cfg_val |= ADCX140_AREG_INTERNAL;