Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2444211rwb; Fri, 11 Nov 2022 09:21:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf6GKikPC1zfQ/JLpcRLgXtAfG94/49uhFzaX4BWgYzwrz46lkd0UDQY1Tjy4hXb/0CCFqwq X-Received: by 2002:a17:906:1111:b0:78d:8b75:b161 with SMTP id h17-20020a170906111100b0078d8b75b161mr2756007eja.385.1668187258152; Fri, 11 Nov 2022 09:20:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668187258; cv=none; d=google.com; s=arc-20160816; b=lOpiT5zOD17RItW1Moppz18FMkhcYkivqKpZyr+Hrp/rBBranaTDq1XEmEvIpfGsx+ 2w+uxDs7aLS+ahOVJeCD2yDEITxDfwj4HkEq8fM7JFgC3WlclW/WDNzLf0S8e43uGT1J UT8ccoFNJ1nYcghQJ0t3azuvadKWkZ+HI+TFrE+/gjsClBn3LHGS0uP8+S5zlNNkIvPG GD4ZrbjILEDPul1ay+xGMBco7SeBt1DiAipvEqswDLOP893HJ98IrVCP5OOHLkLuj/ZI q4diBHNMSbd5YhsbAEL3X80DagVhFYtJoMgIUNFrwe/z2fCXTzQCvpnz7KVS2VnbvncE 6z7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=KRDq3YvWP3xlx40agy7LwTpV95X9uRpVaWN3hJZiIrE=; b=XBAHMbZlWp/F4tpYNEBzsHlgenhrJ6/Zgo8UuMHvqN/47WKzUPE3/BXExq1jNuIo0k EZv5o0earic2KVEPF2zNS3FyCD+6tlCygau3+0552UEQS1PgX7OQTYE1Ywxl4TdQ4f7R FmVQPZBltBtGBKke7V+BE63Dj+wam0UfO23RMZC90rCPJn9zWyVAErJbBhML0GgweSK/ GaU0SKkOGQTsTW+NtXpmDm5RErgHdVpi8gIciZLpnWVphLrUhoJAXeTVFQey/js1TUL+ OBVAM5GLcAEoi9AaCo9QEFIsoT/HvACsvRT2TiRCeThQiWc9nmWQgSsHfjELTg5ZRD+h wPww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CVsNX79H; 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 by10-20020a0564021b0a00b004570e4887desi2420757edb.437.2022.11.11.09.20.36; Fri, 11 Nov 2022 09:20:58 -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=CVsNX79H; 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 S234267AbiKKQmI (ORCPT + 91 others); Fri, 11 Nov 2022 11:42:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233067AbiKKQmG (ORCPT ); Fri, 11 Nov 2022 11:42:06 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 827395BD70 for ; Fri, 11 Nov 2022 08:42:05 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id y16so7132810wrt.12 for ; Fri, 11 Nov 2022 08:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KRDq3YvWP3xlx40agy7LwTpV95X9uRpVaWN3hJZiIrE=; b=CVsNX79HlQ0xGOF1Z1TKcpj8NMOVjQOldIQpoV1xWeKqERQAHxdQfwaVlfzXCpjA/0 QFuj9ImG3K0oOKY+xgpIvc06pSuEnvTxfITNulGEfv/Q+VluUGXs6XGbLS7JHWMk8Ncq 62Y5wSWP1JUVMzcXLtKhZ5cpoQgqkj+DhD6oU4rIn/YOvky3+//LewKDXNxVSSFQt2gB rgBq/8DDq74p0bOp0yWsSzJl6ppvhItIllWn3wG8hxANEprfRGg0FryKrHFr9vUVn5Jb RAj0NVLpco40QSCw2A/B+Zftk81f26r3BkkCM3vzoEUTJKZffoczl1c1+ycdSvbxYt/C OGmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KRDq3YvWP3xlx40agy7LwTpV95X9uRpVaWN3hJZiIrE=; b=RZKC6y/zYla96WyYCiyWY/pHoYRw2jIT+FUsvY5EzXh3vXLSxL0sbD4f8Vx2daGTnM +928LD/thkSZZ6QFyRf7KTeG71GrvEHYly4X1eR4glrts7Xf5vlCsEwOB4THD8nXyZHL xnYXEu83lDd0nDIw5lwJJkO7BiD5nDDi4HEUh4lfH9pKSIFFZO0WKpy0RarMZ1AWgRHn 5NzKxsY3L05R+TejRXy8LOTuVeVFpoV3SXoQmIN/zk0NPa/Dz7P+3qjmPPBgfRVQxFHE aalbLPnxVWfeALIzs3f9jp+9GrJmaePBW1JXHCdei6vYpIsryzqd6vCo/EZt08LSOtph 315w== X-Gm-Message-State: ANoB5pnjfXxBIV7XmZAQLTx97iiF0BDi8doPbRVld7zIdBGlHxIOzxD+ xbczeS7aY5b+boJOjguvnncOiA== X-Received: by 2002:adf:f08a:0:b0:22e:37d1:b598 with SMTP id n10-20020adff08a000000b0022e37d1b598mr1796487wro.377.1668184924029; Fri, 11 Nov 2022 08:42:04 -0800 (PST) Received: from [192.168.1.195] ([5.133.47.210]) by smtp.googlemail.com with ESMTPSA id r15-20020a05600c35cf00b003a84375d0d1sm10299100wmq.44.2022.11.11.08.42.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Nov 2022 08:42:03 -0800 (PST) Message-ID: <7cdb914a-df88-ca11-45d3-d370d5c94bcd@linaro.org> Date: Fri, 11 Nov 2022 16:42:02 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v2 2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity Content-Language: en-US To: Krzysztof Kozlowski , 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 References: <20221110133512.478831-1-krzysztof.kozlowski@linaro.org> <20221110133512.478831-2-krzysztof.kozlowski@linaro.org> From: Srinivas Kandagatla In-Reply-To: <20221110133512.478831-2-krzysztof.kozlowski@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 10/11/2022 13:35, Krzysztof Kozlowski wrote: > 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)) {