Message ID | 20231002021602.260100-2-takahiro.akashi@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1155949vqb; Sun, 1 Oct 2023 19:41:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8iXWQzURdvCuqF19W2FglH1g+vRiMEoaFVVoLDUOOybnI5cP6ufZn9VbFHNRgKtBHzKwe X-Received: by 2002:a05:6808:d49:b0:3ae:524a:fcd6 with SMTP id w9-20020a0568080d4900b003ae524afcd6mr13217479oik.51.1696214510934; Sun, 01 Oct 2023 19:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696214510; cv=none; d=google.com; s=arc-20160816; b=GYAmlNzbeWbe/WUVqdCMl0v/bLjlUR2Vl0phZ80VPtjrtEmuvPxAzVopmZcGB6ffVY tWbdVR3IVt0glgNAco29Z7ukB1Rfkfipss6VKlhSuOgsypY4XCnD/HQjLFn5JJka3JvM tGn1slAaBEQmNSueeIaNmb49ZJhWk5MVnQdxxlq7VR33TwyKUUscVgqb8pEw1/8a6Yde kcFaYruLDI0fuEJwGMHXsCKP/4V243fVurSY3nO98fOloYZVgEEGFSVUD2QpJiDuaeiR SL7AqLhVk68gWUOwnPgnQNcQngC0KSmbPomthtLO0NPPseu7ILzZz1LXStE44Y2dpDhm SOfw== 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=OqXtc+pvir/IxuRnJD6IqOJ/WGP90gqy5QBVu45Fdzc=; fh=5LIWo2D/PeZk6SC/rjjkha3vijtdzmZAJYKHEnFRQDY=; b=GgtFWCYtF2mFRGaRNuz/KOWjjGuqhx9ZMXcqmNhwEgk4Oww0wXxKP77NO489zNo7yk I/ETFcaihf0xlUEs73S6uPKogHLDG2y02udZPD5b60OwNgea59l9b2stsdTzn4sbXkaR TGFbKq9J56HBVxiHIuOjBNmFHm3V2x9TORZ3tP6nPilbgkCnFJSq8hC3hTHkOnb9dOJi CgqRv8wGmUqS26bwwRO8BKlQS0HYr1a32qeFrvpLy2DYvSBnZsQNB40sHevRPSPWXtcs VR3+e7kPrS49apvh3O/ch1AAm4PugbnUKSJpa/GsNjFgtCdBeZPTEpZPVOzFWF7lHzH3 bDGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lZn2pwFb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id nv6-20020a17090b1b4600b00277636a9e5csi7092598pjb.96.2023.10.01.19.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 19:41:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lZn2pwFb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1D88E80C65CF; Sun, 1 Oct 2023 19:17:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234639AbjJBCRY (ORCPT <rfc822;pwkd43@gmail.com> + 17 others); Sun, 1 Oct 2023 22:17:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235058AbjJBCRW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 1 Oct 2023 22:17:22 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7076BD8 for <linux-kernel@vger.kernel.org>; Sun, 1 Oct 2023 19:17:20 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-2739c8862d2so3432168a91.1 for <linux-kernel@vger.kernel.org>; Sun, 01 Oct 2023 19:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696213040; x=1696817840; darn=vger.kernel.org; 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=OqXtc+pvir/IxuRnJD6IqOJ/WGP90gqy5QBVu45Fdzc=; b=lZn2pwFb8BqomhzWtAvwLT48pzE9S3E79uVffBJJ32dMYr5zTU3K6J7LgE0p//k8nE Tij7XdkHJYtaP1l63gQzHiCe3UL+fs54ED8T9/hwlEiScvNsPuFFkgpvpEuuWZOpywLi YCnmseyiK+uegvTLTO9Ak1vhaP2e8ZUE6FETm2LzusNlulcex3gPYoCNBw34R+vbsAYq PNfzCM65rOjpUd0ctCGQPWVD/QDSShlMvCEyPeq7nIOE0j54ojIcVBTU8qdqslyOPdj9 NKZyq7J1fk0EU02bklhhN6nRgzxQanDWK1KP+3J/Bpn/qTGPjknYwsk6hifs2qRvsNPo G51w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696213040; x=1696817840; 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=OqXtc+pvir/IxuRnJD6IqOJ/WGP90gqy5QBVu45Fdzc=; b=CW3lJLPiLMVIc53zu7uNFAIAK6r7+CQFM8hIgQy13vHwhRn2gwZwTSzrhcxr8QJrcl kzlwVEWjnT4TN/mv2HC7YjGvoLQYvy1lR2QaAmVZuQkJGJI1Az66dKyNHWcnKrfxgRGu diYPws86CFiZB5CMoCh/c6lzxDAu6tGvDK8fb+fGjIFHTgRJhcja8/vtPou9Z87frq+g HQLMzdzuupjBaoMv33teQKM4J+7Vp5FinlqTDBBgc/adl+8XH3jNM+ne4yWvCn7+UtJu T1lSX6kOYV0eZWxaeqmwl922okhDI8QQRXyxMQjYLeEakOI1GVK1basU3AJ3esGWgl+4 uNEA== X-Gm-Message-State: AOJu0YxOeuWL7tyqmUhpip80Yf9pYHydsDXdAglHHPEWNsAbzSYdwdl5 mOSAq6TtmhErzB/tlDnwcccAlQ== X-Received: by 2002:a17:90a:1383:b0:274:60c7:e15a with SMTP id i3-20020a17090a138300b0027460c7e15amr9153621pja.4.1696213039746; Sun, 01 Oct 2023 19:17:19 -0700 (PDT) Received: from octopus.. ([2400:4050:c3e1:100:7ab1:199:d138:f054]) by smtp.gmail.com with ESMTPSA id mg11-20020a17090b370b00b002609cadc56esm5278319pjb.11.2023.10.01.19.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 19:17:19 -0700 (PDT) From: AKASHI Takahiro <takahiro.akashi@linaro.org> To: sudeep.holla@arm.com, cristian.marussi@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linus.walleij@linaro.org Cc: Oleksii_Moisieiev@epam.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, AKASHI Takahiro <takahiro.akashi@linaro.org> Subject: [RFC 1/4] pinctrl: define PIN_CONFIG_INPUT Date: Mon, 2 Oct 2023 11:15:59 +0900 Message-Id: <20231002021602.260100-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231002021602.260100-1-takahiro.akashi@linaro.org> References: <20231002021602.260100-1-takahiro.akashi@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_BLOCKED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 01 Oct 2023 19:17:32 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778609827168702075 X-GMAIL-MSGID: 1778609827168702075 |
Series | gpio: add SCMI pinctrl based driver | |
Commit Message
Takahiro Akashi
Oct. 2, 2023, 2:15 a.m. UTC
This allows for enabling SCMI pinctrl based GPIO driver to obtain
an input gpio pin.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
include/linux/pinctrl/pinconf-generic.h | 3 +++
1 file changed, 3 insertions(+)
Comments
Hi Takahiro, On Mon, Oct 2, 2023 at 4:17 AM AKASHI Takahiro <takahiro.akashi@linaro.org> wrote: > This allows for enabling SCMI pinctrl based GPIO driver to obtain > an input gpio pin. > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> (...) > + * @PIN_CONFIG_INPUT: This will obtain a value on an input pin. The returned > + * argument indicates the value. We need to specify that this is the inverse of @PIN_CONFIG_OUTPUT, that setting a line into *input mode* requires the use of @PIN_CONFIG_INPUT_ENABLE, so the config can never be set but should return an error on set, and that the argument returned is 1 for logic high and 0 for logic low. Otherwise I think this is fine! Yours, Linus Walleij
On Tue, Oct 03, 2023 at 10:49:10PM +0200, Linus Walleij wrote: > Hi Takahiro, > > On Mon, Oct 2, 2023 at 4:17???AM AKASHI Takahiro > <takahiro.akashi@linaro.org> wrote: > > > This allows for enabling SCMI pinctrl based GPIO driver to obtain > > an input gpio pin. > > > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > (...) > > + * @PIN_CONFIG_INPUT: This will obtain a value on an input pin. The returned > > + * argument indicates the value. > > We need to specify that this is the inverse of @PIN_CONFIG_OUTPUT, > that setting a line into *input mode* requires the use of > @PIN_CONFIG_INPUT_ENABLE, so the config can never be set > but should return an error on set, and that the argument returned is 1 for > logic high and 0 for logic low. I will add more as you suggest. -Takahiro Akashi > Otherwise I think this is fine! > > Yours, > Linus Walleij
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index d74b7a4ea154..842b328ea504 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -67,6 +67,8 @@ struct pinctrl_map; * passed as argument. The argument is in mA. * @PIN_CONFIG_DRIVE_STRENGTH_UA: the pin will sink or source at most the current * passed as argument. The argument is in uA. + * @PIN_CONFIG_INPUT: This will obtain a value on an input pin. The returned + * argument indicates the value. * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode, * which means it will wait for signals to settle when reading inputs. The * argument gives the debounce time in usecs. Setting the @@ -128,6 +130,7 @@ enum pin_config_param { PIN_CONFIG_DRIVE_PUSH_PULL, PIN_CONFIG_DRIVE_STRENGTH, PIN_CONFIG_DRIVE_STRENGTH_UA, + PIN_CONFIG_INPUT, PIN_CONFIG_INPUT_DEBOUNCE, PIN_CONFIG_INPUT_ENABLE, PIN_CONFIG_INPUT_SCHMITT,