From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25C23C10F29 for ; Tue, 17 Mar 2020 14:18:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA0132051A for ; Tue, 17 Mar 2020 14:18:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="LP1I9ll8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="WAc3H/gW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA0132051A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DB9E76E1B8; Tue, 17 Mar 2020 14:16:44 +0000 (UTC) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by gabe.freedesktop.org (Postfix) with ESMTPS id 436B36E4D0 for ; Mon, 16 Mar 2020 20:49:00 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 6699B58089A; Mon, 16 Mar 2020 16:48:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 16 Mar 2020 16:48:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=2tglQQZWc8w8BFYHHOuQ8FRIUWK jMyItVwVW13flha0=; b=LP1I9ll8CV/bx8h+KXkGxkFpvuXfPfTPSCZq1455SA6 oW1thhFn4p2zGNFDMWx6loA246ZNaggiWkI2PMPcUKyYdptl0DIh8jL8C/kRJY44 tARF8LnwNGRM6Gl3v8ramNfHvpTJ+SGRAoqEtU6BYb+izeX2sTJSlbbue1XNw9bp qvuyRXX1KXurx5LuxJLI+zEl9TmtS50a4RpvGn/qEP24jJm2sekECVQdrzxxFLnT iPCB/Y/Rh7IErGSNZmDvJDePWHTUK2OFFMx1HvdI9IDQmVnR8XSsMYVk81T8c96R Pqyb03DlVavmgxAqFnifFpV00TF6BQwDRw9cLPkCSow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=2tglQQ ZWc8w8BFYHHOuQ8FRIUWKjMyItVwVW13flha0=; b=WAc3H/gWQdr3elcEYWxvbq wslSbdrMrxGnWftrdLz+1T+t/F//9bAbg65T7dsIxWHugJtMIliNktmFEjm1Bfp/ za2nvaGjmUE+uPZJaDQyJRWAj8eX8x+nTeIB7EPm+tFyNab6f/t+Kkjic8UGX7VA CbjcelqmPy5gAjtyfJ1UbZp/g+ejTPdYvIhyrzIbvokKPdgos+7j9sgrq7Q/sVdB FJHAJ37alG/F7T/2W2Crv/aePS63mAe4fFN6nX4Uf+SFXbparBLXLO1Mms/CCeBO UGkWo8ZhsfGrSWc+B9iatHK2tuE+17Z1ueJx+J5tBLraJSNCmtBI41arNQVj5F6A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeffedgudegtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucfkpheple dtrdekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id D21533280060; Mon, 16 Mar 2020 16:48:52 -0400 (EDT) Date: Mon, 16 Mar 2020 21:48:50 +0100 From: Maxime Ripard To: Sam Ravnborg Subject: Re: [PATCH v1 02/36] dt-bindings: spi: support non-spi bindings as SPI slaves Message-ID: <20200316204850.gggeyjulgiy53i7x@gilmour.lan> References: <20200315134416.16527-1-sam@ravnborg.org> <20200315134416.16527-3-sam@ravnborg.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200315134416.16527-3-sam@ravnborg.org> X-Mailman-Approved-At: Tue, 17 Mar 2020 14:16:40 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , Nikolaus Schaller , Jonathan Bakker , Sandeep Panda , dri-devel@lists.freedesktop.org, Paul Cercueil , Andrzej Hajda , Thierry Reding , Laurent Pinchart , Chris Zhong , Marco Franchi , Stefan Mavrodiev , Jerry Han , Hoegeun Kwon , Tony Lindgren , Nickey Yang , Tomi Valkeinen , Jagan Teki , Robert Chiras , Vinay Simha BN , Marek Belisko , Heiko Schocher , Brian Masney , devicetree@vger.kernel.org, Guido Gunther , Mark Brown , Alexandre Courbot , Werner Johansson , Purism Kernel Team , Peter Ujfalusi , Lin Huang , Douglas Anderson , linux-spi@vger.kernel.org, Peter Rosin Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Sam, 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. > > Move SPI slave properties to spi-slave.yaml so the independent > SPI slave bindings can include spi-slave.yaml rather than > duplicating the properties. > > Signed-off-by: Sam Ravnborg > Cc: Maxime Ripard > Cc: Rob Herring > Cc: Mark Brown > Cc: linux-spi@vger.kernel.org > --- > .../bindings/spi/spi-controller.yaml | 63 +------------- > .../devicetree/bindings/spi/spi-slave.yaml | 83 +++++++++++++++++++ > 2 files changed, 86 insertions(+), 60 deletions(-) > create mode 100644 Documentation/devicetree/bindings/spi/spi-slave.yaml > > diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml > index 1e0ca6ccf64b..99531c8d10dd 100644 > --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml > +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml > @@ -67,71 +67,14 @@ patternProperties: > "^.*@[0-9a-f]+$": > type: object > > + allOf: > + - $ref: spi-slave.yaml# > + > properties: > compatible: > description: > Compatible of the SPI device. > > - reg: > - minimum: 0 > - maximum: 256 > - description: > - Chip select used by the device. > - > - spi-3wire: > - $ref: /schemas/types.yaml#/definitions/flag > - description: > - The device requires 3-wire mode. > - > - spi-cpha: > - $ref: /schemas/types.yaml#/definitions/flag > - description: > - The device requires shifted clock phase (CPHA) mode. > - > - spi-cpol: > - $ref: /schemas/types.yaml#/definitions/flag > - description: > - The device requires inverse clock polarity (CPOL) mode. > - > - spi-cs-high: > - $ref: /schemas/types.yaml#/definitions/flag > - description: > - The device requires the chip select active high. > - > - spi-lsb-first: > - $ref: /schemas/types.yaml#/definitions/flag > - description: > - The device requires the LSB first mode. > - > - spi-max-frequency: > - $ref: /schemas/types.yaml#/definitions/uint32 > - description: > - Maximum SPI clocking speed of the device in Hz. > - > - spi-rx-bus-width: > - allOf: > - - $ref: /schemas/types.yaml#/definitions/uint32 > - - enum: [ 1, 2, 4, 8 ] > - - default: 1 > - description: > - Bus width to the SPI bus used for MISO. > - > - spi-rx-delay-us: > - description: > - Delay, in microseconds, after a read transfer. > - > - spi-tx-bus-width: > - allOf: > - - $ref: /schemas/types.yaml#/definitions/uint32 > - - enum: [ 1, 2, 4, 8 ] > - - default: 1 > - description: > - Bus width to the SPI bus used for MOSI. > - > - spi-tx-delay-us: > - description: > - Delay, in microseconds, after a write transfer. > - I can see what you're trying to do, but you don't really need to. All the SPI devices will be declared under a spi controller node that will validate its child nodes (and thus the devices) already. Doing it this way would actually make all the checks happen twice, once as part of the SPI controller, once as part of the SPI device binding, without any good reason. Maxime _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel