From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Subject: Re: [PATCH v1 02/36] dt-bindings: spi: support non-spi bindings as SPI slaves Date: Mon, 16 Mar 2020 14:28:44 +0100 Message-ID: <20200316132844.GA22822@ravnborg.org> References: <20200315134416.16527-1-sam@ravnborg.org> <20200315134416.16527-3-sam@ravnborg.org> <20200316120239.GC5010@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Thierry Reding , Rob Herring , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alexandre Courbot , Andrzej Hajda , Brian Masney , Chris Zhong , Douglas Anderson , Guido Gunther , Heiko Schocher , Nikolaus Schaller , Hoegeun Kwon , Jagan Teki , Jerry Han , Jonathan Bakker , Laurent Pinchart , Lin Huang , Linus Walleij , linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Marco Fr To: Mark Brown Return-path: Content-Disposition: inline In-Reply-To: <20200316120239.GC5010-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Hi Mark. On Mon, Mar 16, 2020 at 12:02:41PM +0000, Mark Brown wrote: > On Sun, Mar 15, 2020 at 02:43:42PM +0100, Sam Ravnborg wrote: > > > Independent bindings can be SPI slaves which for example is > > the case for several panel bindings. > > What is an "independent binding"? For several panels we have device trees that looks like this: spi { #address-cells = <1>; #size-cells = <0>; panel@0 { compatible = "kingdisplay,kd035g6-54nt"; reg = <0>; spi-max-frequency = <3125000>; spi-3wire; spi-cs-high; ... The bindings are child of the spi controller node, but not specified in the same binding file as the spi controller node. A lot of bindings repeats the descriptions of (some of) the pi-slave properties. To avoid introducing yet another set of redundant and maybe incomplete SPI slave property descriptions I moved the relevant properties from spi-controller.yaml to spi-slave.yaml. So SPI slaves can now reference spi-slave.yaml to get access to the SPI slave properties - and the copies can be avoided. Likewise spi-controller.yml now references spi-slave.yaml. This was the best way I saw it could be done. This approach is used in several bindings in this patch set. Sam