Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4830236rwb; Tue, 8 Aug 2023 14:50:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJy4CCDoVj8gtXlmJlb1F5Y6rPEFXq1RI1oLgjO605VTW9oUehpmczgdEBljGVa1x8ItoA X-Received: by 2002:a05:6a20:7fa6:b0:133:17f1:6436 with SMTP id d38-20020a056a207fa600b0013317f16436mr1327947pzj.19.1691531427097; Tue, 08 Aug 2023 14:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691531427; cv=none; d=google.com; s=arc-20160816; b=yUBXmEFcUpcw6Kwf0v9NPhlXtQWYtIj2b6W5MZ4YN5IxJMJ5qqT9Fh3iVSFFW84pEP IGQtz1qMXmWRGPu6mIMEHRj1xanKsV5v/5J/3j42ACTFtzmimpgjxwDtr636PSlWV+mV RtRvQ4W50m4nxqhJNTn727EUSIj2nDerUtPGhmAt8P79FbGFD2XDg0OZ2O1f07rkpr4Z MkUp2fDByWOrRZ/LFOtZuqtQkzaugrEc2NbUyPbSfZOS+gqAlWZXqfaUVhktNzDw+/Dp WM9aXnJolnLx/sjjs6fJ/c7DrDVgk68OGt9oPIKwYWC+Qiw5lgGXwDaJZZPcwWlNLv0c D74A== 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=AuMoPk2SddtMqxj2LNmox9QFPh23Jlu82ndLix93u4E=; fh=P0QvHlMMFJbJCslH/dmoAyQXUbc/W4z1rDtGQDk5OTc=; b=as2r2k5iDzra749RY2HmWjjsQxCWXW76E3GpcbkEOrE44OpejSYEVqyZhg3vscwS62 pZO2PQt9vfSn3Wf4xK4HIR3Runczm97kDv7ewQd8STiaIPff69KPRRKr1r3muJBQYGAd zpnP85t/dilgGzb60QkIN9TtpxHW9fakp3500L86FbvMLaI19nQHhRhd/XQBoM6MzyiO 17himY548tLCZIfGnkti8k3gfv0pa8ld/EnmrDCPaAXw5JUHZetYYlDitd1IJTjy/hmm vHC/Pqn0GeadVwXxLEGpJ8USiJlwv243ZckG2q4ApwgDd9wRY5Mp5egXzobwnGdcyWO8 AonQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=NgvX80+c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a633d03000000b00564a033fb0csi7672122pga.569.2023.08.08.14.50.15; Tue, 08 Aug 2023 14:50:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=NgvX80+c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235673AbjHHT14 (ORCPT + 99 others); Tue, 8 Aug 2023 15:27:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236116AbjHHT1l (ORCPT ); Tue, 8 Aug 2023 15:27:41 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E01474AFA for ; Tue, 8 Aug 2023 10:19:45 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 378GfYwF012826; Tue, 8 Aug 2023 11:47:07 -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=AuMoPk2SddtMqxj2LNmox9QFPh23Jlu82ndLix93u4E=; b= NgvX80+c/S3jRDKQoq6/Tl6nnBWUNJTjjr1K9/iNKeMNkkkmjtGDpevVnEXj9d9Z OaxEI8uh7N79xrF0Qj32phy0DgEr1O/bbtPnWBnqwX/GL2pCblCLYiaNWTEZK4ui xwnIViwTgSsxbGEkDDaqgz8H2xJMTrGsPu6WEUGdvXACPOBg9cmeqqel8Z4EdmGq p2ZvTZ1KLF6qSql5NYIOIV53wt7ltBqu7w2ZDU2YzH58uaUfJmXfnZ8jfTFYZHON 0WRiwcnmHMU4De2Pi+0MncwwTsOcXBlrTDcIyu0WACX1H6OGbPMO10VT2lIjzVNO C9/ODoE5Z15I55dNaDB//g== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3s9juhtucr-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Aug 2023 11:47:07 -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.30; Tue, 8 Aug 2023 17:47:05 +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.30 via Frontend Transport; Tue, 8 Aug 2023 17:47:05 +0100 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.64.220]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id F32E43563; Tue, 8 Aug 2023 16:47:04 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Richard Fitzgerald Subject: [PATCH 2/5] ASoC: cs35l56: Don't rely on GPIOD_OUT_LOW to set RESET initially low Date: Tue, 8 Aug 2023 17:46:59 +0100 Message-ID: <20230808164702.21272-3-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230808164702.21272-1-rf@opensource.cirrus.com> References: <20230808164702.21272-1-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: VpSh-Y7tixG6CeifcVqE4kD-QZaxSsK7 X-Proofpoint-ORIG-GUID: VpSh-Y7tixG6CeifcVqE4kD-QZaxSsK7 X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ACPI setting for a GPIO default state has higher priority than the flag passed to devm_gpiod_get_optional() so ACPI can override the GPIOD_OUT_LOW. Explicitly set the GPIO low when hard resetting. Although GPIOD_OUT_LOW can't be relied on this doesn't seem like a reason to stop passing it to devm_gpiod_get_optional(). So we still pass it to state our intent, but can deal with it having no effect. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index be400208205a..9560059c867b 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -1069,6 +1069,8 @@ int cs35l56_common_probe(struct cs35l56_private *cs35l56) return dev_err_probe(cs35l56->base.dev, ret, "Failed to enable supplies\n"); if (cs35l56->base.reset_gpio) { + /* ACPI can override GPIOD_OUT_LOW flag so force it to start low */ + gpiod_set_value_cansleep(cs35l56->base.reset_gpio, 0); cs35l56_wait_min_reset_pulse(); gpiod_set_value_cansleep(cs35l56->base.reset_gpio, 1); } -- 2.30.2