Message ID | 20230913150012.604775-2-sbinding@opensource.cirrus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp1195951vqx; Wed, 13 Sep 2023 09:13:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFI4MgnsxtSXl4I86tUUYVEsBqP6+rMob6QAaatPmB9fi8Y+0D/fEX49f6ZMY2rQ1ln8vWh X-Received: by 2002:aca:1b18:0:b0:3a7:cccd:33e9 with SMTP id b24-20020aca1b18000000b003a7cccd33e9mr3435790oib.41.1694621631360; Wed, 13 Sep 2023 09:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694621631; cv=none; d=google.com; s=arc-20160816; b=Qrb2l/w27lmb1L9TZDULgNhERth9eJuowfGBVwYE6ZfGTaHUJGBIR7ycDdVbOSVqyt C9OxyDMKTU/YCKS5X0NKozd58esexLum+JfzfrQdMoRPg+yUC7Nmp7GTSvFiRJzNrVsw JLG/bKJQct+tk0a3PgljPJtKZts9r14XFozUKP87m09g6dBoj9sRBKYnBKbI3jTsrHql qKk6pZKViQLC5/NNgXfzAofRyEtPa4xzsm4aqkCDm2r5EZXFn5BXFYgMYV1I//OmqKo5 7S2h8uhfHMexzTWClH87zemDTvPf4JV8SLjdIgTo6EL4z/wbizlNOj85rBtye6H8knco BY7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Dh+rm8/z+C93/OT9V7lVmPaM5s4LmDAFqoJT9hkB4GU=; fh=nLTNXObJ5oqFazCRfk6NCsjnmxCjZ5yWeCYqqRZCVhM=; b=r+j5ry1LR+EBVlvrXbW/HP7VZ+Wqm3dqznPlTuXMB9CD9Ira26YDY1J1ccfXW22uAG UU+PHKPSKMf2aE5xqzI9wO5W/OggpG2kmO64QgMZntrgSfliJHjRQsSMOAIrVQZAN1dH UxcYd/V2SQCE2sF+kdPgcEdR7atp3tHeKMI1hwdRNclGqsvaei4UqL82cdjXOaQMjDTf ilEx1fLsE+bP7XdKdTb/eHd0TNs1TI61fwS+gboR7Ko3Mahhvp8UN8KPh/4aTQMXzucM kBAi1+N4wT7S/tsTwlb2km2A9CbYGB+1nm22ZvxcKT9ndjf6ai3qzIFYmgIiYm79bP3+ Ya2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=qvciHAJn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id w24-20020a637b18000000b00565550ba905si7653242pgc.622.2023.09.13.09.13.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 09:13:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=qvciHAJn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1E80680E6C89; Wed, 13 Sep 2023 08:01:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240971AbjIMPAl (ORCPT <rfc822;pwkd43@gmail.com> + 36 others); Wed, 13 Sep 2023 11:00:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234329AbjIMPAh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Sep 2023 11:00:37 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31F6AB3 for <linux-kernel@vger.kernel.org>; Wed, 13 Sep 2023 08:00:33 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 38CMxBYs012824; Wed, 13 Sep 2023 10:00:23 -0500 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-transfer-encoding:content-type; s= PODMain02222019; bh=Dh+rm8/z+C93/OT9V7lVmPaM5s4LmDAFqoJT9hkB4GU=; b= qvciHAJn7z2vKVWeICmAqeZ/0vJ4Tu44gm11e1i5y2Iy3QN9L3Aa0/dSTinHheUw ns7jln0/ET8PAgrT6rGUj9ROC4NPQ6HTWVn24N6YqnNuplaKFw+TdToWlUbG9J6z 4PdDiNBtZXWixvbIBQ0jTQPjoE9SRlF6kCF9XpaUQn9XB6E6NqTCWioojDJurgGL vuCqbkX9g9MDH7TpsOZsHrBJmcyxN6X2Xppz5CBun23CFjsDitOlu7nWuWDT4eQB hAF/XxYm5szXcdfHhgRRt1W4tU66DBAShSlQdiMaKOK3VxZW+j1NFYqwKMQXfKdu ND45i4zVjCZ9bSh/mvnL8A== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3t2y7u125n-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Sep 2023 10:00:23 -0500 (CDT) 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_256_GCM_SHA384) id 15.2.1118.37; Wed, 13 Sep 2023 16:00:20 +0100 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.2.1118.37 via Frontend Transport; Wed, 13 Sep 2023 16:00:20 +0100 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (unknown [198.90.238.120]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 21DCB11AA; Wed, 13 Sep 2023 15:00:20 +0000 (UTC) From: Stefan Binding <sbinding@opensource.cirrus.com> To: Mark Brown <broonie@kernel.org>, Uday M Bhat <uday.m.bhat@intel.com>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> CC: <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>, Richard Fitzgerald <rf@opensource.cirrus.com>, Stefan Binding <sbinding@opensource.cirrus.com> Subject: [PATCH v1 1/3] ASoC: cs42l42: Ensure a reset pulse meets minimum pulse width. Date: Wed, 13 Sep 2023 16:00:10 +0100 Message-ID: <20230913150012.604775-2-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230913150012.604775-1-sbinding@opensource.cirrus.com> References: <20230913150012.604775-1-sbinding@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: oQb8ia575QRFzeNOv0q-cj2ulpxtpl8e X-Proofpoint-ORIG-GUID: oQb8ia575QRFzeNOv0q-cj2ulpxtpl8e X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 13 Sep 2023 08:01:04 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776939571688026792 X-GMAIL-MSGID: 1776939571688026792 |
Series |
ASoC: cs42l42: Fix handling of hard reset
|
|
Commit Message
Stefan Binding
Sept. 13, 2023, 3 p.m. UTC
From: Richard Fitzgerald <rf@opensource.cirrus.com> The CS42L42 can accept very short reset pulses of a few microseconds but there's no reason to force a very short pulse. Allow a wide range for the usleep_range() so it can be relaxed about the choice of timing source. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> --- sound/soc/codecs/cs42l42.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c index a0de0329406a..56d2857a4f01 100644 --- a/sound/soc/codecs/cs42l42.c +++ b/sound/soc/codecs/cs42l42.c @@ -2320,6 +2320,10 @@ int cs42l42_common_probe(struct cs42l42_private *cs42l42, if (cs42l42->reset_gpio) { dev_dbg(cs42l42->dev, "Found reset GPIO\n"); + + /* Ensure minimum reset pulse width */ + usleep_range(10, 500); + gpiod_set_value_cansleep(cs42l42->reset_gpio, 1); } usleep_range(CS42L42_BOOT_TIME_US, CS42L42_BOOT_TIME_US * 2);