From patchwork Thu Nov 10 13:35:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 18132 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp153838wru; Thu, 10 Nov 2022 05:43:01 -0800 (PST) X-Google-Smtp-Source: AMsMyM6nBlLtHECUTzwL3OJ/wEG2AkVkAGhapc+MJZsm4ZnRp4ZTInQW11VvhT/y/5D97pKpV71y X-Received: by 2002:a17:907:3206:b0:780:a882:a9ac with SMTP id xg6-20020a170907320600b00780a882a9acmr59221512ejb.765.1668087781281; Thu, 10 Nov 2022 05:43:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668087781; cv=none; d=google.com; s=arc-20160816; b=iY3+PmXo6LKPBmcgeTppj1wNIIgvyvb0oumDGtoT3u8zdFhdf64tyoLRhwwFLeU1kZ RPxpqZv3Qnj1uAtg8ji1J9h1BUzKOigsM1ed7aNOEwFEv6qKFJqBmewGhLzs6Wn60nJ9 7W98oJWrjgr2RKxnbARJyU6i8376tLutP51ET2I148yJ6IZO48oOlaMuvkBrFGMh1Ar4 4dGD1doP4k2yVsNffciCkd3dBy/hLyhe4y1TWGtcIYBx8XX0GQ7a4PmYEFOjP1FVxC6J 7SetLjUG2q4BjbKLpbpGxbgFFkpa0bkvvIwk1F49RGV03h8kBomMgM+iC3gZIN2oiKYN ZauA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=X3pEWPACClIQY3/paQHJjNw2VtpoudfeFxBlbc9fm0M=; b=G/lyxko4Xes46YNnVDhPjuOJvydHrJ4HnRq3LVLsffXL+cCUOuiiB37NZuEKu/l4N5 R3cqkkNjZ7oyZB2RHS874gb4j8CXQ/JqqJPNDCrmpCWdh7JG1fWpbScrUiiZLG+j7oyM KS1QZC/M4Scf6RPomb4d1Kes0FGhWn1tiyBTorvRgQTv7AFkT2XIK4j5ZGYkGLqAsR0n v3Bh2cnlK7Un0ojLcbrB8/Yz4Lc3DKZ+yu7w5Hip8MumdtC6gwMFzbIVcwoqqsZtMei1 N62wWHC5qXvkK/b2SExL4jQfzO4bFhx0wB7XvV7n0PdV+ECjsvoxKnnm69RgiiNUB6dO uzug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hZtgk+Xq; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji21-20020a170907981500b0073d9f16e5b3si20275396ejc.258.2022.11.10.05.42.36; Thu, 10 Nov 2022 05:43:01 -0800 (PST) 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=@linaro.org header.s=google header.b=hZtgk+Xq; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231145AbiKJNfb (ORCPT + 99 others); Thu, 10 Nov 2022 08:35:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbiKJNf2 (ORCPT ); Thu, 10 Nov 2022 08:35:28 -0500 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C51E2BD3 for ; Thu, 10 Nov 2022 05:35:27 -0800 (PST) Received: by mail-lj1-x229.google.com with SMTP id l8so1152777ljh.13 for ; Thu, 10 Nov 2022 05:35:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=X3pEWPACClIQY3/paQHJjNw2VtpoudfeFxBlbc9fm0M=; b=hZtgk+XqtQAv+XWLfm84wxLLD2mPgWzuTTgp8Q0gOl8kIZxpQ9re6jZSm2PXIKKGqx c31ha8v+rxkThYcBDq5FWVw4hy6UJyI3akUrMqkCTR2vsXYsbRF8RNm5VJneNYRuicyl VsH2HgHOPW6W2Wc58pc70r82T9XnpuHae4jendFqDSRr8eKqniKHDJa21hi1rt3+R0+D 0G+AGf5nVyUzXegkHB9zkPSzgunEFp7vQd3e+4xTIJgxSbRq8AgvHoldrA4gtZPbNCqe 56XD4jn2HTi4jP9H1TX+bfVYbY9YtNcf4TgJiVhz3viswLTMR+vcaaFLlR62CclV1Y13 xhQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X3pEWPACClIQY3/paQHJjNw2VtpoudfeFxBlbc9fm0M=; b=jcsJyn9zHzqSvbf4tOoPk6NNBb2sIrs5c75AqTNchV9aZjIGiwaJkCbOHlzKWU1N0q aZC86aeVpqy0XaKUwHtaW9EK3l1ye/AzbO/OryfVq05RREm3O71Ir6/l87et9pUKau57 lkThAs+jEG+gwI3EKDg40yh+SJw/4FaeUFZ2LnxHF3K9ynvcew6+SE/iWqOE/s2TMDCD sT1BwpKC73mt6JDxUBASJGkW85G8rWUuZCZni87kDxb7uLCkZQSfFqzHTv19zgDys6LK ZGa8ASVp70JhYNCkzT4HwRZgtRVVI2yaZ0EGd/mwI/Dsa8axb2isLkw2vk2rT2wWOsod 08kA== X-Gm-Message-State: ACrzQf1AF3EuczaTBQOK3ScOj0MpOW0Z/44It1Hw4nqR2Nep8y7/Vv1+ j7x77oVpWhihtrl9xukbLkDqXA== X-Received: by 2002:a2e:a0d0:0:b0:261:d86f:3cde with SMTP id f16-20020a2ea0d0000000b00261d86f3cdemr9308321ljm.86.1668087326182; Thu, 10 Nov 2022 05:35:26 -0800 (PST) Received: from krzk-bin.NAT.warszawa.vectranet.pl (088156142199.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.199]) by smtp.gmail.com with ESMTPSA id q14-20020a0565123a8e00b004ad5f5c2b28sm2752576lfu.119.2022.11.10.05.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 05:35:25 -0800 (PST) From: Krzysztof Kozlowski To: Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity Date: Thu, 10 Nov 2022 14:35:11 +0100 Message-Id: <20221110133512.478831-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749116813082587570?= X-GMAIL-MSGID: =?utf-8?q?1749116813082587570?= Use correct polarity in example and powerdown-gpios description. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla --- Changes since v1: 1. New patch. --- Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml b/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml index 6113f65f2990..99f9c10bbc83 100644 --- a/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml @@ -23,7 +23,7 @@ properties: maxItems: 1 powerdown-gpios: - description: GPIO spec for Powerdown/Shutdown line to use + description: GPIO spec for Powerdown/Shutdown line to use (pin SD_N) maxItems: 1 vdd-supply: @@ -47,6 +47,8 @@ additionalProperties: false examples: - | + #include + soundwire-controller@3250000 { #address-cells = <2>; #size-cells = <0>; @@ -55,7 +57,7 @@ examples: speaker@0,1 { compatible = "sdw10217020200"; reg = <0 1>; - powerdown-gpios = <&tlmm 1 0>; + powerdown-gpios = <&tlmm 1 GPIO_ACTIVE_LOW>; vdd-supply = <&vreg_s10b_1p8>; #thermal-sensor-cells = <0>; #sound-dai-cells = <0>; @@ -64,7 +66,7 @@ examples: speaker@0,2 { compatible = "sdw10217020200"; reg = <0 2>; - powerdown-gpios = <&tlmm 89 0>; + powerdown-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; vdd-supply = <&vreg_s10b_1p8>; #thermal-sensor-cells = <0>; #sound-dai-cells = <0>; From patchwork Thu Nov 10 13:35:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 18133 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp153874wru; Thu, 10 Nov 2022 05:43:08 -0800 (PST) X-Google-Smtp-Source: AMsMyM4Lwlt/3QU/j/Ek1K1qj55hr8l+FFg4vg9zQQI2D0DXQ6eC8asKYvkA/7LZJt7WXYIiVZLW X-Received: by 2002:a62:820a:0:b0:56d:2b5f:20dd with SMTP id w10-20020a62820a000000b0056d2b5f20ddmr62679544pfd.66.1668087788141; Thu, 10 Nov 2022 05:43:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668087788; cv=none; d=google.com; s=arc-20160816; b=c7cTuZJc5dTgIOlQW6sRXcqNThNdZnFIntT1zeF4fHLrjuEj7f1YTOA8/KUK3LfN7P cK+9gJxqOwGMWpaiCrC7BIzKAvvQHhSe6qrWkJtNsFL8YH526TyesfGUE/Ht9Q0Lsxr5 Wl4eY8pUjPSu0wOQI68N7+rOCCVCgNkzwxnqO+TSUDFIKhJmfGVBITjRYV/H+HpDOXNQ N+7K1dM/RIWj4SYa373sIxdrlND49/0d9ZUp1rX06cH7JFDlzh/lKTI22ckCFC3vqZwZ y3dImKMjgCnnkKZykAMQrfYb0PdtLoJDPQb3BHwJdVG4W/EFg9f/vRDGZFjD2/50nAhS uIPA== 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=BVYq2N7Rct5i92MPe3IgInkaL5zJNoRo/Ju3+MkjpVM=; b=yW2faNjcAKHvRSwQkZOW2drvx2mWC3r37h1Z7wzKJ6xiAu2q9Bnk1UG9VEIrrUCsiF Mz4VMUP5J2R50KgYZz4gfBpLY4y42MrhzOizDoDtzGSLT0Rgdzzgb5a5H7t7V+WsHRMd 0ZUjJmPRL/PHASpx2WJxV27lwVVsrK9G5V0awDKaGQ2/CCZCMd7vQeFAYqLYl06yayq0 k6NlXF2XdytSacIohBEm+dvduFQS47hzTEh0FfSr5qBXwvW8DIg3TUjRhzgabWhQPX7U K9Y3DTG/PMnn71+Plk+jJH+HMyrTw+qTyAmz6/Vm6GKi5Tl5FYz+tKhGsHvjuI4hNoE8 g/HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aHLYA+6x; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r139-20020a632b91000000b0046b2ec0de65si19837121pgr.789.2022.11.10.05.42.51; Thu, 10 Nov 2022 05:43:08 -0800 (PST) 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=@linaro.org header.s=google header.b=aHLYA+6x; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231157AbiKJNfe (ORCPT + 99 others); Thu, 10 Nov 2022 08:35:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231133AbiKJNfa (ORCPT ); Thu, 10 Nov 2022 08:35:30 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27A7329348 for ; Thu, 10 Nov 2022 05:35:29 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id s24so1156944ljs.11 for ; Thu, 10 Nov 2022 05:35:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BVYq2N7Rct5i92MPe3IgInkaL5zJNoRo/Ju3+MkjpVM=; b=aHLYA+6xo0R01ED2csKLZEyU5drBe0n7gYOHCzxbSi5EqgfZxi2pGxMv+sefXP/L0j VmuRoM+0PKVqaomTrPcj5wBVGNtAhukRrEvIpS1E321pynM+zGJ6ASHPX2KFg4bag4EU ZzE5sZhB7nJaITsz/ddH8ZuAffQp+u4e/jUQVIte4af8F7SOPf8UH7WA/LRh6zcBV7Vr AXxzq8/CbX14HV3L/Q9XmJtNY/LeHFNVAVImJMEKVfOH9vs/k6T6pT9wZtN9MQBmbpFw 66Pquh1lhM1B7Mp0hnscP1TrRIUobtEoUhbcoRhrFKw+MtrDynZmTir+qqjbvuv+Yx0x xPjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BVYq2N7Rct5i92MPe3IgInkaL5zJNoRo/Ju3+MkjpVM=; b=pUrWRQo6UjAx04Hta0L7Sc1XYi3Fsznv4xzZ1vVTtVMsIt3T4JMOZ/fnmBlfTTp2aS ffVCeLQUyIg8B+7/QbD5z23IJHjfyUY8QJpJ3/F9ce5MXoE7o71/7N/WEthOPf7lpX7V hnl19bU0S2+7eHA+t8HjOaUXkZ0wADpq0bIBn+jo+LJGqBSLR4ZLlf6FdKbESzvMQvcG 6SgtS3VwSNkfDVUvb/G9+0cWuJfx1upEhF2B8coyJzuSeX8YnGlt1dE8btNFz/U4MTwA I7kFm1tHrQ4nepcNxzcwrS0SQtoYWy/xt0nVuWxb+VUMchzdLCurrq1inma8uj2/87IQ yAbQ== X-Gm-Message-State: ACrzQf0keqSiuFWxlQWbSrLOavier72JPlzfNSQzYMTsBOx5N5tkt1sc wFy7CO1a5s0dGYZtfL5peyEyLA== X-Received: by 2002:a2e:8602:0:b0:277:2217:c7e1 with SMTP id a2-20020a2e8602000000b002772217c7e1mr8784168lji.407.1668087327523; Thu, 10 Nov 2022 05:35:27 -0800 (PST) Received: from krzk-bin.NAT.warszawa.vectranet.pl (088156142199.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.199]) by smtp.gmail.com with ESMTPSA id q14-20020a0565123a8e00b004ad5f5c2b28sm2752576lfu.119.2022.11.10.05.35.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 05:35:27 -0800 (PST) From: Krzysztof Kozlowski To: Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity Date: Thu, 10 Nov 2022 14:35:12 +0100 Message-Id: <20221110133512.478831-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221110133512.478831-1-krzysztof.kozlowski@linaro.org> References: <20221110133512.478831-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749116820847396855?= X-GMAIL-MSGID: =?utf-8?q?1749116820847396855?= The shutdown GPIO is active low (SD_N), but this depends on actual board layout. Linux drivers should only care about logical state, where high (1) means shutdown and low (0) means do not shutdown. Invert the GPIO to match logical value. Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla --- Changes since v1: 1. None. --- sound/soc/codecs/wsa883x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index c7b10bbfba7e..77a7dd3cf495 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -1392,7 +1392,7 @@ static int wsa883x_probe(struct sdw_slave *pdev, } wsa883x->sd_n = devm_gpiod_get_optional(&pdev->dev, "powerdown", - GPIOD_FLAGS_BIT_NONEXCLUSIVE); + GPIOD_FLAGS_BIT_NONEXCLUSIVE | GPIOD_OUT_HIGH); if (IS_ERR(wsa883x->sd_n)) { dev_err(&pdev->dev, "Shutdown Control GPIO not found\n"); ret = PTR_ERR(wsa883x->sd_n); @@ -1411,7 +1411,7 @@ static int wsa883x_probe(struct sdw_slave *pdev, pdev->prop.simple_clk_stop_capable = true; pdev->prop.sink_dpn_prop = wsa_sink_dpn_prop; pdev->prop.scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY; - gpiod_direction_output(wsa883x->sd_n, 1); + gpiod_direction_output(wsa883x->sd_n, 0); wsa883x->regmap = devm_regmap_init_sdw(pdev, &wsa883x_regmap_config); if (IS_ERR(wsa883x->regmap)) {