Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp742060rwb; Thu, 10 Nov 2022 06:56:38 -0800 (PST) X-Google-Smtp-Source: AMsMyM61p1IW/TUQy5Qutzjo4BmZmMT02QQlL1MdbiThMXiCK6049K75z7QCefbnWQWNDQ3lqiw6 X-Received: by 2002:a05:6402:40d4:b0:461:5b75:d3df with SMTP id z20-20020a05640240d400b004615b75d3dfmr2538813edb.367.1668092198515; Thu, 10 Nov 2022 06:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668092198; cv=none; d=google.com; s=arc-20160816; b=jb4MHR6T6nuQ56D60a9cJlxaOQauTIr4F4Gg+bmsi7B5ly4NoyBbmYSEmMaueTADVe Y7Lo1j9Wg1wL9WbcRyOBZwPTg/5pvsYyW3Gcpcp+o/IlAEY8xeMDijolez3tLXg/X/7Q ZA+KKkIj0oqH3/c/MIy/LOUmxFudKipnFww/uBJ6VwkG3pizuT6pG+O8dVXDSmUEbA3h UWnGWxQuEXlpVDXbdxvpyrRmQL3DZ+Mede1M6sn96aBjZVlhS7O1VCcXMjzza2jufT06 mn7TyX86Ef9dGbe11irQgwOkojiN6mjpJyjOA3wnH/2MChYQbUy9xuIz1BLGz1DOG1B3 LJDg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xc2-20020a170907074200b0073ce34d1a13si18726614ejb.499.2022.11.10.06.56.16; Thu, 10 Nov 2022 06:56:38 -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 + 92 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 Content-Transfer-Encoding: 8bit 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 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 --- 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)) { -- 2.34.1