Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1782075rdf; Sun, 5 Nov 2023 14:16:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqs09Jk6MiZueEudNlInOMSLp5tzh6UeVHgRNNuXoCpxYTFoLcjUS07KRiukQKkiURkpL+ X-Received: by 2002:a92:c566:0:b0:359:6a34:904d with SMTP id b6-20020a92c566000000b003596a34904dmr9969831ilj.3.1699222575247; Sun, 05 Nov 2023 14:16:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699222575; cv=none; d=google.com; s=arc-20160816; b=Kxy5RmJsicYF/t65DtXLM4qtWoMnN6AkiCk1msZIxwv50a4zWO0UFhJb3c6GlCC6AC G/DSn3HeXJTVHCZPs/dlQ4Gortjf3PNX7KAvcIVLXry0JCPk5jDoN1Ebg+pN/9amkLXH fcwVGfs5MuNauSr86aNSRmQbnY9utf4uxcv4Pkkz+ZwN3FPgX02srK2HurzE4saEcyJV HyjJFhbo90azaYd5ssqpk9tt928OTQNDBMnAsjHWaw63lLY2WSlO6rsCGCdtd/8pqNHZ rH0vmVr5/8mtkKNh0ZIOwV+bDLK3lXcLCOpAb4GZT41HA5r2vvmWcWzWhFXe/LRRbbIS QjuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:to:subject:message-id :date:from:in-reply-to:references:mime-version:dkim-signature; bh=JrqCjnNBchrd9FLn5hEJeuZodiLvnKhusQVXvM/Nn54=; fh=q0M+SJH09aQ1S2GQ7DNSA1z41Pd6bv9Rq5Ovrz1uxPA=; b=inU+Hze3WXgaMKyrAri0Xf4tOw71/ZwoubTPgCs9ALk5MJed8esUz0XsBIw/o/zkGe CDSndY/gP9mIcYVd7yGFNSX0qRsU8Izrfx7meEc3SbWCJHVaeBEpSU/x7MLJE5dPB90e aGxvBAultZ2ozDPj65aK4Wnsiiin1wTj7Zq2r2XcfJ2hCHtUa+fx5/3etIk3RGKfYg2M NtF7CTAwqW861gupxQ9+gFW0wz07dpph/CV8nZZlHsLxvZmCHaRBcrYyIRijtQsVan4x c97l9DhssNqnPik9MKTYwN/c5RJr30kI/j8tpGGNiMk4M9St8qoe6Hr97IOJItOfVxIE CFGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E0Szbm7N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id v64-20020a638943000000b00578e5228c76si6475062pgd.505.2023.11.05.14.16.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 14:16:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E0Szbm7N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 8DDBB8057B0A; Sun, 5 Nov 2023 14:16:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229772AbjKEWPr (ORCPT + 99 others); Sun, 5 Nov 2023 17:15:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjKEWPq (ORCPT ); Sun, 5 Nov 2023 17:15:46 -0500 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2464FDD for ; Sun, 5 Nov 2023 14:15:41 -0800 (PST) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-579de633419so46225047b3.3 for ; Sun, 05 Nov 2023 14:15:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699222540; x=1699827340; darn=vger.kernel.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JrqCjnNBchrd9FLn5hEJeuZodiLvnKhusQVXvM/Nn54=; b=E0Szbm7N7Iegktaa14GlXFTvfjQubA4PmaE8hKJny12mcr4+Fbd3rqnxL4cPnlfffA WlAEowmBmAn6CztIn4QRiluhtM4CtIdzckwZqGj796ATzK0BQ6wzUILS+vU31FNt5waE xRjhq8fxO6Fasgvv8Gv+9wrssDiT9YeQ1NOhqcbL6y2HFgp5La/TdlioGQcDHcdxq6/t yClNkjk2SF43q3a5Sx6uLHgmJRB7x0b24Q5k1qFbt2kdm8HTYOGeLNsDdXMI9YsaDGr6 7rknbOyeMbjl3b3La9uJgg3nGk0F/Mv1p8uTomLKOzgzl3ZS45YyVKsGMZp+u4TFuMte 4KTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699222540; x=1699827340; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JrqCjnNBchrd9FLn5hEJeuZodiLvnKhusQVXvM/Nn54=; b=Gr9aVkEyMMt0EYMfRhLJP9nsF3lxCq1DhgJbjw/pfcWcBKHvcsnD+h+N/dk0Dkl+d+ yhHv9QDrCMiKhMKfaT9QkgP7tqhzeqEWWzaA2ltF+KNlKXYjrRR7PjPHPZZmbM/aWPIN tB+wnbFcRSqFIHImxUhCk4s+PA05P+k1zyajm7ptcPDVUunJg/MZ+JSk2pyyj+BrZl6y 2vESS3emyWeFxoDcOFFDTCXyFMRRgAypxnf9oyxTG2iKYvfatdcSNfbOTi7gFQUwN6Zd p/A6c9/8JWAwM6ikijztZNDiPoCKAPk0pTkGMxDdI01QIyCwzcQ6Aq70aDtdRxDQEXaR ot9w== X-Gm-Message-State: AOJu0YxpZ+u0fb4+U1d/41vjz/HLAQK26wPb6wRs63WElp5bIAjnNNF4 UbkmQT/HTRGgUlCPlaRjhbv0QwMbm1SyOs2bHhWU+g== X-Received: by 2002:a0d:df4a:0:b0:5a8:1654:4b6f with SMTP id i71-20020a0ddf4a000000b005a816544b6fmr9302434ywe.17.1699222540310; Sun, 05 Nov 2023 14:15:40 -0800 (PST) MIME-Version: 1.0 References: <20231006132346.GA3426353-robh@kernel.org> In-Reply-To: From: Linus Walleij Date: Sun, 5 Nov 2023 23:15:29 +0100 Message-ID: Subject: Re: [RFC v2 5/5] dt-bindings: gpio: Add bindings for pinctrl based generic gpio driver To: AKASHI Takahiro , Linus Walleij , Rob Herring , sudeep.holla@arm.com, cristian.marussi@arm.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, Oleksii_Moisieiev@epam.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 05 Nov 2023 14:16:12 -0800 (PST) Hi Takahiro, On Tue, Oct 24, 2023 at 3:43=E2=80=AFPM AKASHI Takahiro wrote: > First of all, there is no pre-defined naming convention either for > pins, groups or functions. SCMI firmware can give them any names. OK maybe that should be added to the spec? [NB: I poked the pinctrl implementers in a separate mail, you are on CC.] Otherwise I think this is one of those cases where firmware authors will simply start to use a certain naming convention if the Linux driver requires it. > Secondly, What you said in the above is already implemented in > my RFC patch. Please remember the example that I gave: > > > gpio-ranges =3D <&scmi_pinctrl 6 0 0>; > > gpio-ranges-group-names =3D "pinmux_gpio"; > > > > means that SCMI *group*, "pinmux_gpio", are mapped to this driver's > > gpio range which starts with 5. If "pinmux_gpio" indicates SCMI *pin* > > range [20..24], > > > > baa-gpios =3D <&gpio0 7>; > > will refer to gpio pin#7 that is actually SCMI's 22 (=3D20 + (7-5)). Right! I am so unused to the gpio-ranges-group-names that I didn't parse that properly :( > After all, I still believe we need "gpio-ranges" property in most of > all use cases (The only exception is, as I mentioned, to unconditionally > map all pinctrl's pins to GPIO (if possible) when SCMI firmware provides > only GPIO function for all pins. I think it is a simple and yet likely > use case. I suppose it is a bit of placement question. The device tree GPIO ranges will have to duplicate more information that the SCMI firmware already knows (what ranges are GPIOs, the name of the GPIO mux function), that is my main concern. And when we have information in two places that need to be matched, invariably we get mismatches. I'm trying to figure out what is the best way forward here but I think we need some feedback from the pinctrl driver authors. Yours, Linus Walleij