Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1869964rda; Tue, 24 Oct 2023 06:04:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESTLfaBlrjKghjmwLmjd8sqY886jpgjp1uMyamk+V+hSwQ28usHJHobRvBXRQql5DP463m X-Received: by 2002:a17:90b:2b46:b0:27d:882f:e6c5 with SMTP id rr6-20020a17090b2b4600b0027d882fe6c5mr9951925pjb.9.1698152663797; Tue, 24 Oct 2023 06:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698152663; cv=none; d=google.com; s=arc-20160816; b=dZ5EIsll67jOR+bi6nRFqKkIZUN08qkcgTIWTBIfLtih5jDOvSj/Q6oBVXdcZmjoOH hBzQoTXamU2z2E97DmNPjAW7QGB4FsvLuRG3vXxzSwDMUFgDAAWs+G68dX9b7xHAZKuy mvEtIisxcgELNlqr6dTYZbq00gguRofIKigvvAj0cQx+SglqZ0YJKIZaK0poj0jurk0f BXjgEWnNDIkIZBX7YhZI44YS7KwYNm2gcvQ4fp4w7XM4d5MIQAWvKOF+bElgiT0NdfpQ DoqYUzYbg6ui/nsF8dnT9d/1sZwS6tTyLImAAXpLnjuedaaH/FjFh5GU7c3AZBBDSTfk NTWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=WdiQyW/DR0saP5hyzIEWBzZ94+Rea1U1vbWoFnm3Jwk=; fh=ldJjlXHwvBMgLbktms5T5ZcHo5/rD009Nnwdg5065E0=; b=Iesw2UnzJAXo0LnCX5yMY/qedx5SCERGtKllo8EQgTHxfJn7lyoxLnVvzH5QZpFohz 9FvDVYcxO1QkCI9exeeNMbmKpLvjglyfEuJWUFdw4rNjbqZa5zGITi+jTNTpABi157wV zs+y8pcRxRFBpLoLBf/eOfzS6xR6UB3xqW8bdlRayks4lhKHoTZoe3nLxNHICCJOZ7vW 5m1aanFsLjZrXs9jsDcMp1RX6wr3BcCzG41cwISIRZdjt8OZAkAPIDmWwVF4FQw3CUXd XO1vcmbtEbD0pj/se+End4DtAk2zK3jrOst9YXtPP6uugY1+8ru17nsG5WEOuBP0Vklb H2EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yiDmmu1f; 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 nk3-20020a17090b194300b0027da14d150esi7977723pjb.187.2023.10.24.06.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 06:04:23 -0700 (PDT) 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=yiDmmu1f; 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 B22E480B12E7; Tue, 24 Oct 2023 06:04:12 -0700 (PDT) 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 S234615AbjJXNDX (ORCPT + 99 others); Tue, 24 Oct 2023 09:03:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234695AbjJXNCO (ORCPT ); Tue, 24 Oct 2023 09:02:14 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD5311732 for ; Tue, 24 Oct 2023 06:01:33 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-d9ac9573274so4069132276.0 for ; Tue, 24 Oct 2023 06:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698152493; x=1698757293; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WdiQyW/DR0saP5hyzIEWBzZ94+Rea1U1vbWoFnm3Jwk=; b=yiDmmu1fMz8EXLYU231mPxIe/WZTzCpSnRY9wHniXSUz0Z3XATmxHRYzIOsG1uyACv b0ZnEFNLFtMDmprpBGv/vMfQ0OUnogf4r+foyAYYOgHiBTMZPRNI1KADPivor8wTOcYS Mc6Al5fUzWJL9Pwa8k+h3iEZU3WOTJJdDf9I/7LZRY9i707hCOzW2GBssQ8W9U0+qbaF qLWAAEPhV+Ak6tr+yVyLhgCwaNhssBLUVex8Wp3xPCgcMEPB/YNoTBDuOboTwKjm/V7R 5RuTAVMvGCjtL6Dln4fHw2ROcq7l1VW2NmWv62zGFEA977CoX9CRLlJB4NJyJ36jUIOU L+EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698152493; x=1698757293; h=content-transfer-encoding:cc: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=WdiQyW/DR0saP5hyzIEWBzZ94+Rea1U1vbWoFnm3Jwk=; b=c5WYn2wp/qtt+N+D9XY8ruI6iwzlUZJXjMeVlve3wPaNwrgGPBBfOOf61bP82NSgzE vbUAXWSbwXaYA1CgqViHOFZ0MPDIE/QPzfrzXxZLAF8r5KPlyp1adQ6MsnGXE8AjW9Sm P787EP/kszkx3mdve9gg3U5zb+CmLKwQJm7HCDZDuJcWpom697jepduSyq/ZZkaBwPgX ufUQ0XC8EMOQq7No+OX5FKUHl2pruIDZoINb9TjU0HhmKLoVWaq9u074xl6Bycwnfz0w j3SLufcTTQkhaL77nkPtCL1ydBYW07PaeYTtfMNo5oGVPo85xnD6u/UnGFN1jnn8wJN5 dKKg== X-Gm-Message-State: AOJu0YxFb+kQyjkKsfD4D0o+doFDa0GIEcBo80N+kH4SAqY47OnGmZ0s HNDVWwShqrCqeNUk8Yy2MDmrQN8Q/yGYo58aR88SKw== X-Received: by 2002:a25:b53:0:b0:d9a:ccdf:3873 with SMTP id 80-20020a250b53000000b00d9accdf3873mr10818054ybl.48.1698152491198; Tue, 24 Oct 2023 06:01:31 -0700 (PDT) MIME-Version: 1.0 References: <20231005025843.508689-1-takahiro.akashi@linaro.org> <20231005025843.508689-6-takahiro.akashi@linaro.org> <20231006132346.GA3426353-robh@kernel.org> In-Reply-To: From: Linus Walleij Date: Tue, 24 Oct 2023 15:01:19 +0200 Message-ID: Subject: Re: [RFC v2 5/5] dt-bindings: gpio: Add bindings for pinctrl based generic gpio driver To: Cristian Marussi Cc: AKASHI Takahiro , Rob Herring , sudeep.holla@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.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 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]); Tue, 24 Oct 2023 06:04:12 -0700 (PDT) On Tue, Oct 24, 2023 at 12:55=E2=80=AFPM Cristian Marussi wrote: > ...a maybe dumb question from my side, BUT does the SCMI Pinctrl carry > enough information as it stands for the driver to derive autonomously > and efficently the possible/applicable gpio ranges ? I don't know, that's part of the problem I suppose. But if the pin controller can report functions supported by certain pins or groups of pins, then certainly "gpio" should be one of those functions or else the pin cannot be used for GPIO at all? Then maybe that function is just a name convention, such as "all pins are members of a 1-pin group named 'gpioN' where N is the pin number" then you need to switch the pin into this function in order to use the pin as a GPIO line. Pins that do not have this group associated with them cannot be used for GPIO. This is incidentally exactly the method used by the Qualcomm pin control driver (IIRC). If the SCMI protocol has not though about GPIO as a special function, or mentioned anything about group name conventions for the GPIO function, then there is a hole in the specification, and this is likely best filled by creating one-pin groups as per above and feed this back to the spec. If the GPIO usecase isn't even considered a function by SCMI, or (more likely) "nobody thought about that" then this is a good time to send it back to the drawing board for specification, right? It's normal for specs to run into a bit of friction when confronted with the real world. Yours, Linus Walleij