Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp771595rwb; Thu, 18 Aug 2022 11:56:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR48t1kTPtCYN/iqcbClakoS3c7e5cjYiWM/nzJ5qImGG1Ki4cYKKqOrllWxUrzyrZ2+tndV X-Received: by 2002:a17:903:2448:b0:171:4853:e580 with SMTP id l8-20020a170903244800b001714853e580mr3681452pls.145.1660848968571; Thu, 18 Aug 2022 11:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660848968; cv=none; d=google.com; s=arc-20160816; b=PS+Z9AICt7EZ7ruoYVidgRO7latweCaoao/C7VYTsxnXCU4jcHATEzvOHW4Ha5hVUa ndCObVYDAOwxbRAsS9PDb42GmUqOFlw2LCet4L7gm9IYtNc/XknVoOviR6zMpHkK6RPE RlQezw3vGPdvVOSamyIXugMxXDbOQ1mCSANO58sGrzJ9Ka3NEilvs67FbGsaf/20ig6L 4+X1HdCOeL5HLLb76LJltykwutCsuaexgfK5por9A12cc6DX2imqqZpMK+KoLOr2Tf0W xK5MytrW4AFTGkPmk82Hp+q5mljuIRkvJ8xOA6TbQu9W87dmE5mr5kiw4qKNKXyOZg0e 7a1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=6Z6uEqxwpDOfnuK+UVMCWoACLsRd2/9qi+DqixTXtxw=; b=PkgYCQrrTEmb6S0jJ+uq7ycuI7uXTNVRNwbkyz4bVmRTchBGp0uzTiuWRLmKyrWRo2 Lta/qIC7kMUNDleXAV6p1Nkv66dTFimcP6Q8E5GFAwk22a8u6D3Pm0ezdt4lTOqJ8FGV mcgQiuc0qR9q0dW8X/8ooInLgbt2L0N5zSuFFwinTMZpJ6xn71z80F9pggTYg+DdYFZ/ 1YVRedrM3kPmYhj4oI4WNJV2Oq4ysl9eYsWIeUa9JyACRdvswOTcFnRylx6E9XxtvJ8/ cazoMOh8v57Obk30l9kuFwjKoId3c/ozQD1VM7U6/GQnw5X5NEU8fc/fQp/nY3+4fdV+ Yn5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iVNTuDR5; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a4-20020a170902ecc400b0016dba016f15si1905586plh.227.2022.08.18.11.55.52; Thu, 18 Aug 2022 11:56:08 -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=@chromium.org header.s=google header.b=iVNTuDR5; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345005AbiHRSrH (ORCPT + 99 others); Thu, 18 Aug 2022 14:47:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345544AbiHRSqr (ORCPT ); Thu, 18 Aug 2022 14:46:47 -0400 Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0880BD1C1 for ; Thu, 18 Aug 2022 11:46:22 -0700 (PDT) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-11cab7d7e0fso1617275fac.6 for ; Thu, 18 Aug 2022 11:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:user-agent:from:references :in-reply-to:mime-version:from:to:cc; bh=6Z6uEqxwpDOfnuK+UVMCWoACLsRd2/9qi+DqixTXtxw=; b=iVNTuDR5I+ytb+s4rAAhFaglQPC3WfvEqoAhtAff0x1FWbwybR8rgiCGh1lXQLM8kI KA+gO4pHbgJLaAbzCOqNwjqfY+6rbvRJYG0GnzxKJWr3uPzs3Flw6P3u4MrwObvicT7H 2SH5Noomu406flNjt6iXBe45b7cMnNAAlSB6U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:user-agent:from:references :in-reply-to:mime-version:x-gm-message-state:from:to:cc; bh=6Z6uEqxwpDOfnuK+UVMCWoACLsRd2/9qi+DqixTXtxw=; b=FbLbfk2tL/ir15GJRVmjrDPKtqYNFSoW2vMgS1KkF/yMS+r4zVCeAIXaiYCU/0GHrx TC81OzhRvFHa4FuvFLdkYTmRCINRx3/XR5dga8kJcCqtfZL6z1OgvMcA0SBlklnye3me m7BlVEEXJwwPkc9xL/JlHCAUvL26PEgdt3KAYtqZfkjobf6unT0mLujhPG+MgEQ/+z9R 2QAJgi7W5UaHOquAaNPkqKfuJgePeYVuSpA4G5flQY7e3q4BprLImSy1x/Ne6ThAMA8I MtVOxzad9RSAVUJ/CPuWLGRz+N0rYsH5gXBk8F6uKX1bzA/pQ0tb2AQqH0rA76ZyZjvS dkGQ== X-Gm-Message-State: ACgBeo1/VY9MCpNvzV/F6Lil4P40PjNetW5liphWeG8oSAM4UKv42Qv4 LTnjN9wpG/YVZv4OEUDv8wrSJ55C1een366xvcDRPg== X-Received: by 2002:a05:6870:e408:b0:11c:37ad:773a with SMTP id n8-20020a056870e40800b0011c37ad773amr2042704oag.44.1660848382277; Thu, 18 Aug 2022 11:46:22 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 18 Aug 2022 13:46:21 -0500 MIME-Version: 1.0 In-Reply-To: <20220818084216.1.I5c2b6fea19c4c0dec67fd4931f03df8e5ccaca95@changeid> References: <20220818084216.1.I5c2b6fea19c4c0dec67fd4931f03df8e5ccaca95@changeid> From: Stephen Boyd User-Agent: alot/0.10 Date: Thu, 18 Aug 2022 13:46:21 -0500 Message-ID: Subject: Re: [PATCH] arm64: dts: qcom: sc7180: Add sleep state for alc5682 codec To: "Joseph S. Barrera III" , linux-arm-msm@vger.kernel.org Cc: Alexandru Stan , Doug Anderson , Judy Hsiao , Andy Gross , Bjorn Andersson , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Quoting Joseph S. Barrera III (2022-08-18 08:42:19) > Add sleep state to acl5682. In default, gpio28 (HP_IRQ) is bias-pull-up. > To save power, in the new sleep state, gpio28 is bias-disable. > > sleeping, /sys/kernel/debug/gpio shows gpio28 as "no pull". When codec Is something missing? The sentence starts with 'sleeping'. > is awake (microphone plugged in and in use), it shows gpio28 as "pull up". > > Signed-off-by: Joseph S. Barrera III > --- > > arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi > index b5f534db135a..94dd6c34d997 100644 > --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi > @@ -755,8 +755,9 @@ hp_i2c: &i2c9 { > alc5682: codec@1a { > compatible = "realtek,rt5682i"; > reg = <0x1a>; > - pinctrl-names = "default"; > + pinctrl-names = "default", "sleep"; > pinctrl-0 = <&hp_irq>; > + pinctrl-1 = <&hp_sleep>; > > #sound-dai-cells = <1>; > > @@ -1336,6 +1337,18 @@ pinconf { > }; > }; > > + hp_sleep: hp-sleep { > + pinmux { > + pins = "gpio28"; > + function = "gpio"; > + }; > + > + pinconf { > + pins = "gpio28"; > + bias-disable; > + }; Does removing the bias cause an irq to trigger? I'm worried that this change may cause a spurious irq upon entering or exiting sleep, maybe both actually. The irq is double edged so we really want it to stay stable at one level whenever the gpio interrupt hardware is sensing the line. From what I can tell the pin is powered by AVDD-supply and I can't tell if that is ever powered off while the driver is probed. Probably not? If the power to the pin on the codec is never turned off then there isn't a power leak from what I can tell.