linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers
       [not found]   ` <CAL_JsqJCLgf6syqV=jNPHPyu02ygwWCDDV+U9VCm0qRpLkirSQ@mail.gmail.com>
@ 2020-09-20 19:39     ` Krzysztof Kozlowski
  2020-09-22 15:40       ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-20 19:39 UTC (permalink / raw)
  To: Rob Herring
  Cc: Linux-ALSA, Linus Walleij, linux-riscv, Fabio Estevam,
	moderated list:ARM/STM32 ARCHITECTURE, Bartosz Golaszewski,
	maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE, NXP Linux Team,
	linux-arm-msm, Linux Media Mailing List, devicetree, Ray Jui,
	Sascha Hauer, linux-unisoc,
	moderated list:ARM/Mediatek SoC support, linux-arm-kernel,
	Scott Branden, open list:GPIO SUBSYSTEM, linux-kernel,
	open list:MEDIA DRIVERS FOR RENESAS - FCP,
	Pengutronix Kernel Team, Shawn Guo

On Fri, Sep 18, 2020 at 08:30:02AM -0600, Rob Herring wrote:
> On Thu, Sep 17, 2020 at 10:53 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > Convert parts of gpio.txt bindings into common dtschema file for GPIO
> > controllers.  The schema enforces proper naming of GPIO controller nodes
> > and GPIO hogs.
> 
> Did you not see my previous reply about a common schema? We already
> have a common GPIO and hog schema in dtschema. Please add to it
> whatever is missing.

Indeed, I'll enhance the dt-schema.

The trouble is that each in-kernel YAML file still has to mention
possible gpio-hogs nodes. Is the proper solution to put them in common
YAML inside kernel sources?

> 
> My goal is all common schema end up in dtschema, but I haven't pushed
> folks to do that yet. Ones I've done are there though. One issue is
> what's in dtschema should be GPL/BSD and the existing text bindings
> are default GPL, so there's a relicensing exercise. In some cases, the
> schema is there but I haven't copied over the descriptions.

Right, I'll skip the descriptions when posting to dt-schema.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers
  2020-09-20 19:39     ` [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers Krzysztof Kozlowski
@ 2020-09-22 15:40       ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2020-09-22 15:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux-ALSA, Linus Walleij, linux-riscv, Fabio Estevam,
	moderated list:ARM/STM32 ARCHITECTURE, Bartosz Golaszewski,
	maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE, NXP Linux Team,
	linux-arm-msm, Linux Media Mailing List, devicetree, Ray Jui,
	Sascha Hauer, linux-unisoc,
	moderated list:ARM/Mediatek SoC support, linux-arm-kernel,
	Scott Branden, open list:GPIO SUBSYSTEM, linux-kernel,
	open list:MEDIA DRIVERS FOR RENESAS - FCP,
	Pengutronix Kernel Team, Shawn Guo

On Sun, Sep 20, 2020 at 09:39:15PM +0200, Krzysztof Kozlowski wrote:
> On Fri, Sep 18, 2020 at 08:30:02AM -0600, Rob Herring wrote:
> > On Thu, Sep 17, 2020 at 10:53 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > >
> > > Convert parts of gpio.txt bindings into common dtschema file for GPIO
> > > controllers.  The schema enforces proper naming of GPIO controller nodes
> > > and GPIO hogs.
> > 
> > Did you not see my previous reply about a common schema? We already
> > have a common GPIO and hog schema in dtschema. Please add to it
> > whatever is missing.
> 
> Indeed, I'll enhance the dt-schema.
> 
> The trouble is that each in-kernel YAML file still has to mention
> possible gpio-hogs nodes. Is the proper solution to put them in common
> YAML inside kernel sources?

Currently, the gpio.yaml schema is applied to all nodes. That has the 
advantage that GPIO related properties are always checked whether we 
have a device specific schema or not. It has the disadvantage that you 
can't do some constraints like required properties or what's in child 
nodes.

We could (and probably should) change it to be referenced by specific 
gpio controller schemas like we do for i2c, spi, etc. Then you can 
define required properties there and do something like:

"-hogs$":
  type: object
  $ref: gpio-hogs.yaml#


> > My goal is all common schema end up in dtschema, but I haven't pushed
> > folks to do that yet. Ones I've done are there though. One issue is
> > what's in dtschema should be GPL/BSD and the existing text bindings
> > are default GPL, so there's a relicensing exercise. In some cases, the
> > schema is there but I haven't copied over the descriptions.
> 
> Right, I'll skip the descriptions when posting to dt-schema.

I was hoping someone would add the descriptions. :)

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-22 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200917165301.23100-1-krzk@kernel.org>
     [not found] ` <20200917165301.23100-2-krzk@kernel.org>
     [not found]   ` <CAL_JsqJCLgf6syqV=jNPHPyu02ygwWCDDV+U9VCm0qRpLkirSQ@mail.gmail.com>
2020-09-20 19:39     ` [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers Krzysztof Kozlowski
2020-09-22 15:40       ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).