Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1354735imn; Sun, 31 Jul 2022 03:52:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sOAGVkuUZDwo/Ilsou5eLRfteCH7DrfCwyzj6YapLRStqQXyZNKQIhhNqBxWGUjp5M1ZbC X-Received: by 2002:a05:6402:35c:b0:43c:8f51:130 with SMTP id r28-20020a056402035c00b0043c8f510130mr11087824edw.393.1659264736842; Sun, 31 Jul 2022 03:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659264736; cv=none; d=google.com; s=arc-20160816; b=JaSRmoLYXHfAkLcDNjx9NvrFA8Gne4PitTNHX0qvHi7fsr09SLyZaCyncjEQSfbNEI TKWaz9dOrCSI2efl9hLWbsg4eVPAvr4fNrT0h3py1pPJUYGYWbxsZ/ck2IDSKz0+VmKI FvYUpXnSAZY2pPDT5ILeB/GWlDD2xDgFNwQka36Y0sPZXBk7nVUpFizJnPWt4B3lo7i4 IWsUSg0nl6sdiUVrrpqAVxmpXo5mnCtSBzT9MccKR3+isEAtgfkS+BF0WyNrLT4ipnUg i0v3Y/8vreqEO3tLYGTQSFToyOANlA8yILkIz/6fzGjP/BcoMkb+rvWJ8HisYaizT++b Osvw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=qq5bQx+3d1c7/1I33VmZWx/hkupxU4RMVeBR/FbRUaE=; b=VK2yzkwpsSXCRUFbj12LABDMvVyyNpPtxqpA8omWzu3dQwiGbHYWahY3JxkgJk0s2D d5Q5pZp3aHbZZ+G0s5FbNwi3b3QSS3p2Awzh9BghZelQ8z0tPelAnt7c5H6TWDbiCz81 3s5AolCBz4ZH4zGQuvU9UTtmFOa4Td72iJ9YI28YbIUykKzCMvkbc5IjqsYAsuKyoGTU EQla5ipK3B6Lr1xfwsg/dgqHIdzIIyGv4UAeaWOFkitDR1HH1LhX7uTL6P6vECJIJ5XB nNe6xQeIGUdd/7Y5v0NEzn+FEEya3JdkN9heSzZgFqZ0mnb4N3TWRBdIegzzz/ZJo8Vo H+mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bejCl17Y; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz6-20020a1709077d8600b00726e16c2d4fsi6871918ejc.178.2022.07.31.03.51.52; Sun, 31 Jul 2022 03:52:16 -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=@kernel.org header.s=k20201202 header.b=bejCl17Y; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231719AbiGaKt6 (ORCPT + 99 others); Sun, 31 Jul 2022 06:49:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiGaKt5 (ORCPT ); Sun, 31 Jul 2022 06:49:57 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E4749FC8; Sun, 31 Jul 2022 03:49:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 20F0ECE0E5F; Sun, 31 Jul 2022 10:49:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAF50C433C1; Sun, 31 Jul 2022 10:49:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659264588; bh=PUNN+rCT3YXN5pehv7cULkzpQnreNsgjU2b4qW3dOto=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bejCl17Yd2Tvvo8nEdqDOHsy6MvrBm2YL4gdQtABzahCWd1IyD+yGqMbF12AxcAWe qAygk10Ha3H7fLFiBYQSB4iWD8kP2ijEKXmypi14eeKaUCHteH4bhwLNmaBA6Bp2vT niOdnThWuwAMSrAFmciEp7SwuJkvJCdV+xSsz1NR8TnBHwOFi3s9AmyHhKwNiUfI87 T1Eg1ckCHjMqwRXwMk+cHD9wlP1VYfhCv1AU0WOBX5W9xX7nAp1xgR06+kSBUCF73O oDuiVbu2X4nk0Ec512FsjObYmYNNDOTvLjek+grtmp63BtCjYzqdbVEJqFNsla+Vqc Rw/q6SHFNAfjA== Date: Sun, 31 Jul 2022 11:59:55 +0100 From: Jonathan Cameron To: Krzysztof Kozlowski Cc: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Mark Brown , Tomi Valkeinen , Andrzej Hajda , Maxime Ripard , Marek Belisko , "H. Nikolaus Schaller" , Pratyush Yadav , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Rob Herring Subject: Re: [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties Message-ID: <20220731115955.1977f429@jic23-huawei> In-Reply-To: <20220722191539.90641-2-krzysztof.kozlowski@linaro.org> References: <20220722191539.90641-1-krzysztof.kozlowski@linaro.org> <20220722191539.90641-2-krzysztof.kozlowski@linaro.org> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Jul 2022 21:15:39 +0200 Krzysztof Kozlowski wrote: > The spi-cpha and spi-cpol properties are device specific and should be > accepted only if device really needs them. Drop them from common > spi-peripheral-props.yaml schema, mention in few panel drivers which use > them and include instead in the SPI controller bindings. The controller > bindings will provide CPHA/CPOL type validation and one place for > description. Each device schema must list the properties if they are > applicable. > > Suggested-by: Jonathan Cameron > Suggested-by: Rob Herring > Signed-off-by: Krzysztof Kozlowski This seems like a good solution to me. Reviewed-by: Jonathan Cameron > --- > .../bindings/display/panel/lgphilips,lb035q02.yaml | 3 +++ > .../bindings/display/panel/samsung,ld9040.yaml | 3 +++ > .../bindings/display/panel/sitronix,st7789v.yaml | 3 +++ > .../devicetree/bindings/display/panel/tpo,td.yaml | 3 +++ > .../devicetree/bindings/spi/spi-controller.yaml | 11 +++++++++++ > .../devicetree/bindings/spi/spi-peripheral-props.yaml | 10 ---------- > 6 files changed, 23 insertions(+), 10 deletions(-) > > diff --git a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml > index 5e4e0e552c2f..628c4b898111 100644 > --- a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml > +++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml > @@ -21,6 +21,9 @@ properties: > enable-gpios: true > port: true > > + spi-cpha: true > + spi-cpol: true > + > required: > - compatible > - enable-gpios > diff --git a/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml > index d525165d6d63..c0fabeb38628 100644 > --- a/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml > +++ b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml > @@ -42,6 +42,9 @@ properties: > panel-height-mm: > description: physical panel height [mm] > > + spi-cpha: true > + spi-cpol: true > + > required: > - compatible > - reg > diff --git a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml > index 9e1d707c2ace..d984b59daa4a 100644 > --- a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml > +++ b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml > @@ -23,6 +23,9 @@ properties: > backlight: true > port: true > > + spi-cpha: true > + spi-cpol: true > + > required: > - compatible > - reg > diff --git a/Documentation/devicetree/bindings/display/panel/tpo,td.yaml b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml > index f902a9d74141..e8c8ee8d7c88 100644 > --- a/Documentation/devicetree/bindings/display/panel/tpo,td.yaml > +++ b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml > @@ -28,6 +28,9 @@ properties: > backlight: true > port: true > > + spi-cpha: true > + spi-cpol: true > + > required: > - compatible > - port > diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml > index 678cee68b52a..655713fba7e2 100644 > --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml > +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml > @@ -95,6 +95,17 @@ patternProperties: > type: object > $ref: spi-peripheral-props.yaml > > + properties: > + 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. > + > required: > - compatible > - reg > diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml > index 5e32928c4fc3..2349f83c07f3 100644 > --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml > +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml > @@ -34,16 +34,6 @@ properties: > 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: