From patchwork Thu Mar 9 15:49:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 66943 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp369735wrd; Thu, 9 Mar 2023 08:01:20 -0800 (PST) X-Google-Smtp-Source: AK7set8g8EQVC77l/0ncqHPQ4DeLWsNkA17dK0Xpr3QcyA9DrZMSZTV+4vx953XQKJG7KOBNAMiP X-Received: by 2002:a17:903:1c1:b0:19b:dae0:c97d with SMTP id e1-20020a17090301c100b0019bdae0c97dmr25965156plh.32.1678377680239; Thu, 09 Mar 2023 08:01:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678377680; cv=none; d=google.com; s=arc-20160816; b=cGjcfLOswDV7o5QUxlFySuyA2f/GZ1oh3Oc8P9VUvxTDC/yMJJlp1zmrmw0hIcbH3a MPlnixvhC+XnXviDDV/E149MCdLQjQ+nnAGMY9wiwR3Eic6WzKmwgtqLz12nD16qf8kX d7C6kryrtW8nxq7DrYiIo3Y27xBt/njZCyeufZjt/nDTzhh0dDsW0Iq3xssMPV+7GuX5 Zc4TARWK5BVZsX+mmhN5klrgnc9RTXQ9Hd4cM5sF8Wb02SC7Q0CYqiif2xYUYd1z1x+2 Z6GlU1ltqQD0SvarbZiyXXfuioZ6353fN/+jSrqvxelGrVaUejm4GTAcm7dfEpw4l3zh 3cNw== 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=SgRFCt619WmiOOy/KiaJocmKNsNdPTYaRqkITCznBlQ=; b=xVEw5oFcoJ8OkC3gwG1p99ozx9xXI3Z6KJhaODnTTLNWObsJMNKntFcIdry+6Mbg90 vbYLxL/1MGBFhaDMKSC06l4EITiJEOGGfoD66KbDRl/8tXVpilomast8fU9Fs6Sb0JmF T1EGZt0sLnELCHc2hrnHVBDa9hWeDOZ/NMiuelPzQQhQ2DPvzO7KSKkrpV4v3XZ39/Xu m0FtsjPfgtygtv+AVxgjmcEVSjproPOcgiFcWI9hA8qEnITngC9csJkNO1Clpm5y9lO2 uVb68dLZRbbmNDm5ppuEUSgQoWwakYls7p6VCGZ7Z0xL+t7XaCgbpYYIhRSgA6jbLTJT /tkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VclA2Usv; 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 c4-20020a170903234400b0019ace138411si2657981plh.577.2023.03.09.08.01.06; Thu, 09 Mar 2023 08:01:20 -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=VclA2Usv; 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 S231281AbjCIPuS (ORCPT + 99 others); Thu, 9 Mar 2023 10:50:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231518AbjCIPuG (ORCPT ); Thu, 9 Mar 2023 10:50:06 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0CCF28BB for ; Thu, 9 Mar 2023 07:50:04 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id x3so8748218edb.10 for ; Thu, 09 Mar 2023 07:50:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678377003; 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=SgRFCt619WmiOOy/KiaJocmKNsNdPTYaRqkITCznBlQ=; b=VclA2Usv5TOQL2tjYEaywOVcbjTRbt5QTlUyua2Pq3vHwT0lIaQM/mNyIOV0TOQI52 IYZaDZIyxI6bfTtSPdkATbzV/vwSKO9WATOYBvvvdfBxINsdOu+9jhVMxgvRVNPKD0DU pBh7wCzQvILtnKTs0D5k9mFn19e2w1H/RLRe+LCuwUq6sN2BP3U82PEETdzvkuDRBatn VC+R8O5s2DjeFay6ztM3X3xLToPRkxTWqQ0+XJHTbOR7nzGi/HLb4CO5t5PSCVMdBptW FJkBfzgxbwDDqL9/oGrik3qqY2WROaHcBKDMY35wBfluGRt2mtPv+Dsin4sC8lt2iHvQ NOig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678377003; 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=SgRFCt619WmiOOy/KiaJocmKNsNdPTYaRqkITCznBlQ=; b=YpJLNevHmOOO0wH5HCORRwBmYYqLK5I6xVcFnxkoigsA1qXjw9b1YP3XB1PTstEGy7 4LbxqSuPc4PZT2v6ZZtCMMciszyh2pScBKvlRPx/ng0ZAZ2pA2o8lsFuR4gkE1wXv0X2 CtgcGS1zUI8aK3OqFe6KDlRzEBS8kBQ5WgfiMGV0p1Xh1TEWttBiWmgB4poTv/voKHws 890/iiwLEkMUdqDR57p9SjdKISEy0TZQIu5HhBGAWG387UJ/ExkfVvu28E26c7l8UbNg 8Cy7X7umwVQDeNOHCCwhZDi+bHVOM0IwNBBCBk7nuCis/hMkjHQKQh9MfQSPQGm01lpo wTrg== X-Gm-Message-State: AO0yUKUMRxD7TK98wCWf0sSTiHn3nWkM595eF5lyB4Yp0YLsa561OFpr UWJd7QtF4s9vwml9mDYBfOB4sA== X-Received: by 2002:a17:906:d28c:b0:8e5:88ca:ebac with SMTP id ay12-20020a170906d28c00b008e588caebacmr22319782ejb.40.1678377003285; Thu, 09 Mar 2023 07:50:03 -0800 (PST) Received: from krzk-bin.. ([2a02:810d:15c0:828:7ee2:e73e:802e:45c1]) by smtp.gmail.com with ESMTPSA id h17-20020a17090634d100b008ee5356801dsm8981683ejb.187.2023.03.09.07.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 07:50:03 -0800 (PST) From: Krzysztof Kozlowski To: Bjorn Andersson , Andy Gross , Konrad Dybcio , Linus Walleij , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 4/4] pinctrl: qcom: sm8550-lpass-lpi: allow GPIO function Date: Thu, 9 Mar 2023 16:49:49 +0100 Message-Id: <20230309154949.658380-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309154949.658380-1-krzysztof.kozlowski@linaro.org> References: <20230309154949.658380-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?1759906554384825124?= X-GMAIL-MSGID: =?utf-8?q?1759906554384825124?= All LPASS pins have basic GPIO function and most of the code is ready for that. Add missing glue pieces to allow LPASS pins to work as GPIO, which is going to be used on MTP8550 and QRD8550 boards. Signed-off-by: Krzysztof Kozlowski --- drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c index c2bdd936d27f..db1a46fee9c6 100644 --- a/drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c @@ -102,6 +102,13 @@ static const struct pinctrl_pin_desc sm8550_lpi_pins[] = { PINCTRL_PIN(22, "gpio22"), }; +static const char * const gpio_groups[] = { + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", + "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", + "gpio22", +}; + static const char * const dmic1_clk_groups[] = { "gpio6" }; static const char * const dmic1_data_groups[] = { "gpio7" }; static const char * const dmic2_clk_groups[] = { "gpio8" }; @@ -168,6 +175,7 @@ static const struct lpi_pingroup sm8550_groups[] = { }; static const struct lpi_function sm8550_functions[] = { + LPI_FUNCTION(gpio), LPI_FUNCTION(dmic1_clk), LPI_FUNCTION(dmic1_data), LPI_FUNCTION(dmic2_clk),