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: 623933 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCA49C43217 for ; Thu, 10 Nov 2022 13:35:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230527AbiKJNfa (ORCPT ); Thu, 10 Nov 2022 08:35:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230508AbiKJNf2 (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 C529CDF94 for ; Thu, 10 Nov 2022 05:35:27 -0800 (PST) Received: by mail-lj1-x229.google.com with SMTP id d3so1182830ljl.1 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=Rm/vHCXWKHYUi0mxhHzDocZSWEHVpQourtCy7vV7vVfA4Nb+eHNHjQwApumKJL8llR pVTF1fOpdwu8WQQhruN6hqVazI7awR59Bqgca4axweNhxcYhmXm4WlVMCesDSQL1keii cuj2tU5qjIBJ0cZFM4Q0wHnyBAvtQWPJrT7lGlcbblX0CWPH6/CbewqbqkyjCk22GLNx QqHbQ3K0039ClY6IMSQsfzvKURxCktx1r7p51EZ7qA3Pc186AW9WdU3vZ1P14hE0mVUY vW7cczb+hbAyPFOYy4giKvdi9oINgYcaP3sMg0u+yaGGn4xrL3xByvRKF6Eig9/RAQhh bnmg== X-Gm-Message-State: ACrzQf2e/9zxBhUtG4dM+QIgAnJt1KtOQkJ2zlduWXNa0wb9oo4qmAg6 quuF4dDqM6RIaiXmb0nVlcyVlw== X-Google-Smtp-Source: AMsMyM7ZsAaCoMRKyH64gFWu9/lw3JKr1YbEwgIWT7QSSmLf+YECbGSbvB+NikQpWYTycsz3LoJzmA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 623391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04B25C43217 for ; Thu, 10 Nov 2022 13:35:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231142AbiKJNfb (ORCPT ); Thu, 10 Nov 2022 08:35:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbiKJNfa (ORCPT ); Thu, 10 Nov 2022 08:35:30 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21FA21FCE3 for ; Thu, 10 Nov 2022 05:35:29 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id b9so1172421ljr.5 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=nFX/pd/FBgG9kqJMbZE6xRD1PW5hfyoZMLlckTX76WTTySDY0P3/ETwycJ2rtBom9V uWo3vFYwb0nJGmE1w81MshApncU2NJIX1zAOcKWizBDcUK6OTpfA5fwVqI6ANVvgB2Nf DlMqG1iPDKwdR9y35cPbaB/qYy1qd2mGBtKtTWdq2nZhqf8UJOzQHHTH7jv4ubsNrtZ9 n2/AXFFAquMxWx6LlavsFM6LcXkPwB1psZDHRpVfcKvDJ3VZKRFiNUTsAONZ2E/3fgpG AzFfVQu6t47bXmxAUj/Z2MyAvswszeU4h1YnaQgcieQ+i+geuNk3dm3qpC59ztv4fNAy hbMw== X-Gm-Message-State: ACrzQf13gQIi0FZhHqrK7x26AlWN9dTNYyhfVfTWnixg5my/3e06+8dA qV3Oy48q9vivLrILlv4fCptiew== X-Google-Smtp-Source: AMsMyM5uuuy6vzbm6Wss8li0CVLMJd7xDK+0FdYwv7VWxMESFwlGkAuH/yOIdWdL1vP4Kcok92FBvg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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)) {