Message ID | 20230712074553.35907-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp981734vqm; Wed, 12 Jul 2023 00:59:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlFVxlD2O2lqqfoAeDjCCx/5H50UptO4HTp4gbD9y0n+IYU3lg8AMQlHrZdCQ3e0GZOSu35S X-Received: by 2002:a05:6402:1642:b0:51e:344f:81ae with SMTP id s2-20020a056402164200b0051e344f81aemr14990931edx.14.1689148779949; Wed, 12 Jul 2023 00:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689148779; cv=none; d=google.com; s=arc-20160816; b=yiVMzmBXqYn1JvwAM3fTOark758wpXHLOHJucdkRZJS/vLLfFle7ozNyZTdTaHtnaz vsmGIP8aT+df9oV2zvuyPsmUiiEiav/OBAL0jFQJqIKNOJs+GL7HUZIj/zwPTeLAruqY W5Q97cXiNhPOHtVFbgIqNUnVkxWW4sLVecwD0ZjlrPXkHPbgZeHdqkQlIOTy5P3sX/FX RMb1a2w6E4Lwt2hm8d/7KDjgxJ7gGzfHYoijfAOhjt9zMrJMwbnjjUVBq9zbf5BFicl6 fKthfS6qvMFhycB2kS5XvuDBvbQeY+LtfyU+nEe5ems6MqF4wM/rw0qWGasmkLktFoYS EMQw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=pebAsfz/DVvDsj5RbKcteoVoBJD27FSwU5r3Wri7LCk=; fh=I+HJ9dkCkOF28OesA44dB265Q+gya/jI09XlxFOanCA=; b=T3B7C0HDlaPwwWRtl4QHS6d2dt6//acOQNJGbjNHWzfCyYFRtkmmW1kbKr2oHFhzx6 rq6SLng6wtbBCWRiFhXmzj/jamZAic9NFj/FuUBnakg4xEj9NQkM6N64Psx2nroV60+i 4KUUKhCB0N0wd+Ik04m93xxQrbmaCUy/sv2TrmcWBpSy2NCGxgbe1m74YhbVksnDt/V5 9wYNGv2WGobvfbcKhUtJn+u0ZSatxG9WQPZ9kykHEeGzvFzyaPnSSDm9lFemaJeYCZDb LVaFv4crN/pzyYk5Q4sLZvvyQhS161I1n8tmN5Z6tFRxtw7A/BGLe14hq3u/oqZGfpZN qACA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HL6YR07d; 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 j7-20020aa7c407000000b0051dd30daa6asi3744991edq.268.2023.07.12.00.59.17; Wed, 12 Jul 2023 00:59:39 -0700 (PDT) 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=HL6YR07d; 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 S231238AbjGLHqD (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Wed, 12 Jul 2023 03:46:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjGLHqA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Jul 2023 03:46:00 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B162F173A for <linux-kernel@vger.kernel.org>; Wed, 12 Jul 2023 00:45:58 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4fbaef9871cso10366790e87.0 for <linux-kernel@vger.kernel.org>; Wed, 12 Jul 2023 00:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689147957; x=1691739957; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=pebAsfz/DVvDsj5RbKcteoVoBJD27FSwU5r3Wri7LCk=; b=HL6YR07d/vOgm0OMRsUstV38BpDXG0hMCdU9gCh0P3Yyz4eLQA85StITyqM9W4tcM8 nO46ikXlottN694F81ETrKz7ojBsCP2xeSSgKg4XAo5OBnH0VxyjzkMmvz1VXgiVhcaZ 0gGbXBlmZVwlyvcUZEDM3QlYfI6IgM9n+/GqzWvJjWDEs5hVVf9bcUg99oGPdST/aI6X U6o4vVRfWaFZpn/qCiUAEV8HkWhxuELCJAepAzw/mxDfmTO4pfpHKylApcbnMsR9yvcJ OEIIevT7vjxTbT6YyL2ldHfj/kxUzqGn8rnNmYKtyJpypZ8BEjFz7RSoASE/OWnjTh+F 9zfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689147957; x=1691739957; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pebAsfz/DVvDsj5RbKcteoVoBJD27FSwU5r3Wri7LCk=; b=dMBog4pMHPjkWDBr8oaQmFXBgubW+GKGVccHeQrEMFOEb3+KO19usb+FNqIq59oiOB TRo+z55hhX7JhI4CH6KWfSdHvCORzBAzYiWHXat4ZZGhZjm9oolFmaQCtTuLbMZlBYO2 6xs4iLYAHLixpr5uf6Z59q6hitwPEjB4fSYoek3HJ72f5oM6DqD3cygVBj+o4WgGcMZS CPpQ7LoD8Yi/32QkGFcwvDZ8+iq4/VF/ap5VuV6JcnN6O1KfYNT6cWH6xBM3UwzWUukt Iss+Soq53mvUdUpwjFGSqw49DqlJwQW0hot8nsqmlMvt/9PIimoFm6ZUYVysno4CpG8m VY9g== X-Gm-Message-State: ABy/qLZp46Siy9zO6Q4dONGmApyUImnA957+/fI3URz9SxI9T448zKPi oFLdEebEBOKnir7SpjgWFNbNFg== X-Received: by 2002:a05:6512:3da6:b0:4f9:5933:8eea with SMTP id k38-20020a0565123da600b004f959338eeamr18436879lfv.3.1689147956959; Wed, 12 Jul 2023 00:45:56 -0700 (PDT) Received: from krzk-bin.. ([178.197.223.104]) by smtp.gmail.com with ESMTPSA id b22-20020aa7dc16000000b0051bed21a635sm2352706edu.74.2023.07.12.00.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 00:45:56 -0700 (PDT) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Hoan Tran <hoan@os.amperecomputing.com>, Serge Semin <fancer.lancer@gmail.com>, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Andy Shevchenko <andy@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names Date: Wed, 12 Jul 2023 09:45:53 +0200 Message-Id: <20230712074553.35907-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771200871169560873 X-GMAIL-MSGID: 1771200871169560873 |
Series |
dt-bindings: gpio: snps,dw-apb: allow gpio-line-names
|
|
Commit Message
Krzysztof Kozlowski
July 12, 2023, 7:45 a.m. UTC
Allow the GPIO controller subnode to define GPIO names. Already used in
at least on DTS:
bitmain/bm1880-sophon-edge.dtb: gpio@50027000: gpio-controller@0: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml | 4 ++++
1 file changed, 4 insertions(+)
Comments
On Wed, Jul 12, 2023 at 09:45:53AM +0200, Krzysztof Kozlowski wrote: > Allow the GPIO controller subnode to define GPIO names. Already used in > at least on DTS: s/on/one > > bitmain/bm1880-sophon-edge.dtb: gpio@50027000: gpio-controller@0: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+' Acked-by: Serge Semin <fancer.lancer@gmail.com> -Serge(y) > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml > index b391cc1b4590..209f03bba0a7 100644 > --- a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml > +++ b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml > @@ -61,6 +61,10 @@ patternProperties: > '#gpio-cells': > const: 2 > > + gpio-line-names: > + minItems: 1 > + maxItems: 32 > + > ngpios: > default: 32 > minimum: 1 > -- > 2.34.1 >
On Wed, Jul 12, 2023 at 12:53:00PM +0300, Serge Semin wrote: > On Wed, Jul 12, 2023 at 09:45:53AM +0200, Krzysztof Kozlowski wrote: > > Allow the GPIO controller subnode to define GPIO names. Are we going to do this for each GPIO controller bindings? Can it be done once for all please?
On Wed, Jul 12, 2023 at 06:28:40PM +0300, Andy Shevchenko wrote: > On Wed, Jul 12, 2023 at 12:53:00PM +0300, Serge Semin wrote: > > On Wed, Jul 12, 2023 at 09:45:53AM +0200, Krzysztof Kozlowski wrote: > > > Allow the GPIO controller subnode to define GPIO names. > > Are we going to do this for each GPIO controller bindings? Can it be done once > for all please? AFAIU the DT-binding schemas which have "unevaluatedProperties: false" property specified won't have such problem since any DT property with "*-names" is already evaluated by the dt-validate core. Meanwhile in this case the schema has "additionalProperties: false" property which prohibits any none-explicitly defined property in the node. Regarding the "gpio-line-names" DT-property constraints. Alas it can't be done generically because at least a number of items is device specific. -Serge(y) > > -- > With Best Regards, > Andy Shevchenko > >
On 12/07/2023 17:28, Andy Shevchenko wrote: > On Wed, Jul 12, 2023 at 12:53:00PM +0300, Serge Semin wrote: >> On Wed, Jul 12, 2023 at 09:45:53AM +0200, Krzysztof Kozlowski wrote: >>> Allow the GPIO controller subnode to define GPIO names. > > Are we going to do this for each GPIO controller bindings? Can it be done once > for all please? No, because sizes differ. Although here the size is anyway flexible, so not much benefit of it, but in other GPIO controllers it is not flexible. Best regards, Krzysztof
On Wed, 12 Jul 2023 09:45:53 +0200, Krzysztof Kozlowski wrote: > Allow the GPIO controller subnode to define GPIO names. Already used in > at least on DTS: > > bitmain/bm1880-sophon-edge.dtb: gpio@50027000: gpio-controller@0: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+' > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml | 4 ++++ > 1 file changed, 4 insertions(+) > Acked-by: Rob Herring <robh@kernel.org>
On Wed, Jul 12, 2023 at 9:45 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > Allow the GPIO controller subnode to define GPIO names. Already used in > at least on DTS: > > bitmain/bm1880-sophon-edge.dtb: gpio@50027000: gpio-controller@0: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+' > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml > index b391cc1b4590..209f03bba0a7 100644 > --- a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml > +++ b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml > @@ -61,6 +61,10 @@ patternProperties: > '#gpio-cells': > const: 2 > > + gpio-line-names: > + minItems: 1 > + maxItems: 32 > + > ngpios: > default: 32 > minimum: 1 > -- > 2.34.1 > Applied, thanks! Bart
diff --git a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml index b391cc1b4590..209f03bba0a7 100644 --- a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml @@ -61,6 +61,10 @@ patternProperties: '#gpio-cells': const: 2 + gpio-line-names: + minItems: 1 + maxItems: 32 + ngpios: default: 32 minimum: 1