From patchwork Wed Jul 27 16:46:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E01FC04A68 for ; Wed, 27 Jul 2022 17:27:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242098AbiG0R1q (ORCPT ); Wed, 27 Jul 2022 13:27:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242133AbiG0R1U (ORCPT ); Wed, 27 Jul 2022 13:27:20 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94BDC7E80B for ; Wed, 27 Jul 2022 09:47:07 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id v21so1862957ljh.3 for ; Wed, 27 Jul 2022 09:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zEKaPVUMxxU4oJ57FhELTHOsnHL7UT+SJtG/zR5EpBY=; b=oedyUahrnOxJICw/alkuB4UHNr6GUpqkrCN5TG1NrhTBEoK7bCdPVop+9M6IeDk+Ui Ua0qeseS2ZCYxdB0KMAwRNEOyaSLeXXPYiZ/FlzSEC4/KH4Zm2JamCTDLHAkn+bsfwyK rtFCD0knauG40E+HM7HJP58HYF8efNrf71BJfNgVUpDXMPX0hWVoj1FN2S2MYbi9k2kQ jkR0BPZ+lv4UDKJsF1rKvPDRQsHdwTf6v91ySboaOpny7zdtYpKTv8bW3CU2PMlMCwV7 aFWVRQh071MDLgDouyx1wuBiu4X2kgi6mSliYRnQiT4fj2/+kG5wdZYmuph8CinVJLR5 4zZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zEKaPVUMxxU4oJ57FhELTHOsnHL7UT+SJtG/zR5EpBY=; b=HmO0j1x0uhs1veXcIbYDL4rBypVioq+K7iFIchlkVJNFM/g4zrqHesNYSkKOeO7z/1 dJw3UKvf6+8CV/Mm3mt1meEt6Yv9NDfi1aDqeNEwTEApiOXQdcKnesZ94X0iAW9I78E5 IZlnhAMBHrH+ISVFsZiMgC7QxpyiSj3C/6L+n8r78CndDGOzd8kz7Lvl62RW7ECQlJ82 BsYoY4iGttKzTjcHUU3MGJwj57jPpSCc+2JuULb1JbpiFgptt8Y0IjlgQFKnARpXjlCE c2IMx5en9k0KQUwEptIsVrdrAv96eH6/mqvuMW/z1d+tQYg1l4HRNLQpz1CN/TWipcAf 5L7g== X-Gm-Message-State: AJIora/v0tzOs0myfXXqkOvX4ZedDPJ2Ps5LLcaAqMyjORcatVbjm9XL 08MCXfJwNv7yvS7kMwwtB2WGWA== X-Google-Smtp-Source: AGRyM1tWq93zLi/9t5PPX6WWx5oR05NHl/5lIgsDIjRFGkHubrsqg1FhJaUXEE6F9UHzgtHb9Rsjbg== X-Received: by 2002:a2e:7314:0:b0:25d:d79a:550c with SMTP id o20-20020a2e7314000000b0025dd79a550cmr7363444ljc.260.1658940424893; Wed, 27 Jul 2022 09:47:04 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:04 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 01/10] dt-bindings: iio: adc: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:37 +0200 Message-Id: <20220727164646.387541-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Marcus Folkesson --- .../bindings/iio/adc/adi,ad7124.yaml | 7 ++--- .../bindings/iio/adc/adi,ad7192.yaml | 7 ++--- .../bindings/iio/adc/adi,ad7280a.yaml | 7 ++--- .../bindings/iio/adc/adi,ad7292.yaml | 7 ++--- .../bindings/iio/adc/adi,ad7298.yaml | 6 +++-- .../bindings/iio/adc/adi,ad7476.yaml | 8 +++--- .../bindings/iio/adc/adi,ad7606.yaml | 7 ++--- .../bindings/iio/adc/adi,ad7768-1.yaml | 7 ++--- .../bindings/iio/adc/adi,ad7923.yaml | 7 ++--- .../bindings/iio/adc/adi,ad7949.yaml | 7 ++--- .../bindings/iio/adc/holt,hi8435.yaml | 7 ++--- .../bindings/iio/adc/lltc,ltc2496.yaml | 8 +++--- .../bindings/iio/adc/maxim,max1027.yaml | 5 +++- .../bindings/iio/adc/maxim,max11100.yaml | 7 +++-- .../bindings/iio/adc/maxim,max1118.yaml | 26 ++++++++++--------- .../bindings/iio/adc/maxim,max1241.yaml | 7 ++--- .../bindings/iio/adc/microchip,mcp3201.yaml | 6 +++-- .../bindings/iio/adc/microchip,mcp3911.yaml | 5 +++- .../bindings/iio/adc/ti,adc0832.yaml | 7 ++--- .../bindings/iio/adc/ti,adc084s021.yaml | 7 ++--- .../bindings/iio/adc/ti,adc108s102.yaml | 6 +++-- .../bindings/iio/adc/ti,adc12138.yaml | 7 ++--- .../bindings/iio/adc/ti,adc128s052.yaml | 7 ++--- .../bindings/iio/adc/ti,adc161s626.yaml | 7 ++--- .../bindings/iio/adc/ti,ads124s08.yaml | 7 ++--- .../bindings/iio/adc/ti,ads131e08.yaml | 7 ++--- .../bindings/iio/adc/ti,ads8344.yaml | 7 ++--- .../bindings/iio/adc/ti,ads8688.yaml | 7 ++--- .../bindings/iio/adc/ti,tlc4541.yaml | 7 ++--- .../bindings/iio/adc/ti,tsc2046.yaml | 7 ++--- 30 files changed, 131 insertions(+), 93 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml index fb3d0dae9bae..75a7184a4735 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml @@ -52,8 +52,6 @@ properties: avdd-supply: description: avdd supply can be used as reference for conversion. - spi-max-frequency: true - required: - compatible - reg @@ -106,7 +104,10 @@ patternProperties: additionalProperties: false -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml index 22b7ed3723f6..cc347dade4ef 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml @@ -30,8 +30,6 @@ properties: spi-cpha: true - spi-max-frequency: true - clocks: maxItems: 1 description: phandle to the master clock (mclk) @@ -94,7 +92,10 @@ required: - spi-cpol - spi-cpha -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml index a694d5794d4a..dfb8f305e2f0 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml @@ -28,8 +28,6 @@ properties: description: IRQ line for the ADC maxItems: 1 - spi-max-frequency: true - adi,voltage-alert-last-chan: $ref: /schemas/types.yaml#/definitions/uint32 description: @@ -55,7 +53,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml index a3e39a40c9b3..1bfbeed6f299 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml @@ -30,8 +30,6 @@ properties: spi-cpha: true - spi-max-frequency: true - '#address-cells': const: 1 @@ -65,7 +63,10 @@ patternProperties: additionalProperties: true -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7298.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7298.yaml index ca414bb396c5..cd8ac5162d27 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7298.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7298.yaml @@ -24,13 +24,15 @@ properties: vref-supply: true vdd-supply: true - spi-max-frequency: true required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml index 666414a9c0de..44c671eeda73 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml @@ -66,8 +66,6 @@ properties: to the other supplies. Needed to be able to establish channel scaling unless there is also an internal reference available (e.g. ad7091r) - spi-max-frequency: true - adi,conversion-start-gpios: description: A GPIO used to trigger the start of a conversion maxItems: 1 @@ -76,9 +74,9 @@ required: - compatible - reg -additionalProperties: false - allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + # Devices where reference is vcc - if: properties: @@ -158,6 +156,8 @@ allOf: properties: adi,conversion-start-gpios: false +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 73775174cf57..7c734b2f7e43 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -33,8 +33,6 @@ properties: spi-cpol: true - spi-max-frequency: true - avcc-supply: true interrupts: @@ -106,7 +104,10 @@ required: - interrupts - adi,conversion-start-gpios -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml index a85a28145ef6..3ce59d4d065f 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml @@ -50,8 +50,6 @@ properties: reset-gpios: maxItems: 1 - spi-max-frequency: true - spi-cpol: true spi-cpha: true @@ -88,7 +86,10 @@ patternProperties: - reg additionalProperties: false -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml index e82194974eea..24a810c23197 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml @@ -43,13 +43,14 @@ properties: '#size-cells': const: 0 - spi-max-frequency: true - required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml index 0b10ed5f74ae..9ee4d977c5ed 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml @@ -49,8 +49,6 @@ properties: default: 4096000 - spi-max-frequency: true - '#io-channel-cells': const: 1 @@ -64,7 +62,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml index 52490cbb0af0..56bcbe5dcd79 100644 --- a/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml +++ b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml @@ -24,8 +24,6 @@ properties: GPIO used for controlling the reset pin maxItems: 1 - spi-max-frequency: true - "#io-channel-cells": const: 1 @@ -33,7 +31,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml index 0bd2fc0356c8..5207c919abe0 100644 --- a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml @@ -22,15 +22,15 @@ properties: reg: maxItems: 1 - spi-max-frequency: - description: maximal spi bus frequency supported - required: - compatible - vref-supply - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml index 46b7747076b9..d0a7ed26d9ea 100644 --- a/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml @@ -45,7 +45,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml index 0cf87556ef82..4f74cb33383a 100644 --- a/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml @@ -26,13 +26,16 @@ properties: minimum: 100000 maximum: 4800000 -additionalProperties: false - required: - compatible - reg - vref-supply +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml index e948b3e37b0c..bb336e33ebe2 100644 --- a/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml @@ -28,23 +28,25 @@ properties: vref-supply: description: External reference, needed to establish input scaling -if: - properties: - compatible: - contains: - const: maxim,max1118 -then: - required: - - vref-supply -else: - properties: - vref-supply: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + - if: + properties: + compatible: + contains: + const: maxim,max1118 + then: + required: + - vref-supply + else: + properties: + vref-supply: false required: - compatible - reg -additionalProperties: false +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml index 4c7e0d94bff1..58b12fe8070c 100644 --- a/Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml @@ -39,15 +39,16 @@ properties: thus enabling power-down mode. maxItems: 1 - spi-max-frequency: true - required: - compatible - reg - vdd-supply - vref-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml index fcc1ba53b20d..18108f0f3731 100644 --- a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml +++ b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml @@ -32,7 +32,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true spi-cpha: true spi-cpol: true @@ -51,7 +50,10 @@ required: - reg - vref-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml index 95ab285f4eba..067a7bbadab8 100644 --- a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml +++ b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml @@ -51,7 +51,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml index f5a923cc847f..686721176a58 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml @@ -24,8 +24,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vref-supply: description: External reference, needed to establish input scaling @@ -37,7 +35,10 @@ required: - reg - vref-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml index 1a113b30a414..726d2cbfa368 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml @@ -19,8 +19,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vref-supply: description: External reference, needed to establish input scaling @@ -37,7 +35,10 @@ required: - spi-cpol - spi-cpha -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml index 54955f03df93..1a589ad1659f 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml @@ -19,7 +19,6 @@ properties: reg: true vref-supply: true - spi-max-frequency: true "#io-channel-cells": const: 1 @@ -28,7 +27,10 @@ required: - reg - vref-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml index ec3b2edf1fb7..076088a328c3 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml @@ -31,8 +31,6 @@ properties: maxItems: 1 description: Conversion clock input. - spi-max-frequency: true - vref-p-supply: description: The regulator supply for positive analog voltage reference @@ -62,7 +60,10 @@ required: - clocks - vref-p-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml index d54a0183f024..775eee972b12 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml @@ -27,8 +27,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vref-supply: true "#io-channel-cells": @@ -39,7 +37,10 @@ required: - reg - vref-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml index 3f4f334d6f73..afe782522904 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml @@ -21,8 +21,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vdda-supply: true "#io-channel-cells": @@ -32,7 +30,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml index 9f5e96439c01..4a6e54debf10 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml @@ -18,8 +18,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - spi-cpha: true reset-gpios: @@ -32,7 +30,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads131e08.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads131e08.yaml index e0670e3fbb72..5882de6fd967 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,ads131e08.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads131e08.yaml @@ -28,8 +28,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - spi-cpha: true clocks: @@ -120,7 +118,10 @@ patternProperties: additionalProperties: false -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml index b8c398187d5c..f75b2c702986 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml @@ -19,8 +19,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vref-supply: description: Supply the 2.5V or 5V reference voltage @@ -32,7 +30,10 @@ required: - reg - vref-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml index a0af4b24877f..f26fdbc15f84 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml @@ -25,13 +25,14 @@ properties: description: Optional external reference. If not supplied, assume REFSEL input tied low to enable the internal reference. - spi-max-frequency: true - required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml b/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml index 6c2539b3d707..314d1d99bf73 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml @@ -21,8 +21,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vref-supply: true "#io-channel-cells": @@ -33,7 +31,10 @@ required: - reg - vref-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml b/Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml index 601d69971d84..0b48814c0dc2 100644 --- a/Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml +++ b/Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml @@ -23,8 +23,6 @@ properties: interrupts: maxItems: 1 - spi-max-frequency: true - "#io-channel-cells": const: 1 @@ -59,7 +57,10 @@ patternProperties: additionalProperties: false -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | From patchwork Wed Jul 27 16:46:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930614 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB72FC19F28 for ; Wed, 27 Jul 2022 17:28:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242004AbiG0R2X (ORCPT ); Wed, 27 Jul 2022 13:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241968AbiG0R1c (ORCPT ); Wed, 27 Jul 2022 13:27:32 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3D6F7E837 for ; Wed, 27 Jul 2022 09:47:13 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id u17so10301506lji.5 for ; Wed, 27 Jul 2022 09:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1OkHpjzGCry+ZL6//0vSWmlU3q3YJnXwCwfZ625r6ZU=; b=OdFsbffjdPuAG+i0aLOyLOTL1B4JMDmd0jqT8YKt3OD0j4KUyoxxg0/IlIVlXmOTqG Qrk2Hmqlw6ILOg2FRXTOJHNVR791ajvg4c5r3Z5PKHtzvrlib624iqRQJSu8Yt2IMNef a65m0Yfk9r0qZ+ZFi42tswpWo/LgkrQu2B35jgVTHqWWRh8HuaPLP7BpmGbTnkosltvu pI3ckFFDFJYLwwHUubFN9lR8qgOujROpducc2YGNnQT2CuGThSNtsbenTudSRdJwz/0y e0QwaycEoQzc6QukVzXiHxNChxuSS5m+FjMxgBrBifBlpnQcBjE2nRfA2HMfqX9B73Er XYIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1OkHpjzGCry+ZL6//0vSWmlU3q3YJnXwCwfZ625r6ZU=; b=zFLaW0B0ivervCQHw3TQHT5rt+fpITny4uTMSF5cJ38sbBXuXCy1SOtAU50nFA/l/W 2Lqgjjy+MpPH+kJRetBfuVrRu77Gx+S2bdjPYR79c+mp4NdLhJrvIgtvpuGpKw7jXECW rzKoSVMAaowp+MLgD7c3qL/Nj5YHK3TvHPx7bRWI/64J/HaJqpJ8mA9ANpT/egL/x9Dv YcKJDsRPgTXoGUn2lkdnO4lxPosiXJO82dCnvPOHHMHoLAKYtBDk4NkoB5U+ThEHOzON nMvmba63OpP7Ko++FPGgyHy6mgOKCPPfNc66IVq4rvLrZtjk/YiDLGI8yEJFm8+4cFz6 M1Hg== X-Gm-Message-State: AJIora9bat1dcKVIAh6N+n+ksdhF9CtJbtdRas/RGcORCOukULBeUxae hq7Hix7ppdcXTcy5BDZqK5+jgw== X-Google-Smtp-Source: AGRyM1tq+XscqgTAiSYgbgmYLXWSAr8Aj4Q1GW3kkYgpdqZHoEE9e7yaYdiManN2n3HTwpBhc2r6Kw== X-Received: by 2002:a2e:a36a:0:b0:25d:d73d:d8c9 with SMTP id i10-20020a2ea36a000000b0025dd73dd8c9mr7615913ljn.68.1658940427856; Wed, 27 Jul 2022 09:47:07 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:07 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 02/10] dt-bindings: iio: accel: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:38 +0200 Message-Id: <20220727164646.387541-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski --- I wonder if spi-3wire is device specific (not controller) and should be rather explicitly mentioned by device schema. Just like spi-cpol/cpha. --- .../devicetree/bindings/iio/accel/adi,adis16201.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/adi,adis16240.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/adi,adxl313.yaml | 9 ++++----- .../devicetree/bindings/iio/accel/adi,adxl345.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/adi,adxl355.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/adi,adxl367.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/adi,adxl372.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/bosch,bma220.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/bosch,bma255.yaml | 5 ++++- .../devicetree/bindings/iio/accel/bosch,bmi088.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/fsl,mma7455.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/kionix,kxsd9.yaml | 7 ++++--- .../devicetree/bindings/iio/accel/murata,sca3300.yaml | 5 ++++- .../devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 7 ++++--- 14 files changed, 56 insertions(+), 40 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml index 6f8f8a6258fe..7332442e5661 100644 --- a/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml +++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml @@ -27,15 +27,16 @@ properties: interrupts: maxItems: 1 - spi-max-frequency: true - vdd-supply: true required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml index 8d829ef878bc..f6f97164c2ca 100644 --- a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml +++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml @@ -25,14 +25,15 @@ properties: interrupts: maxItems: 1 - spi-max-frequency: true - required: - compatible - reg - interrupts -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml index d6afc1b8c272..7c1bc7810528 100644 --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml @@ -22,10 +22,6 @@ properties: reg: maxItems: 1 - spi-3wire: true - - spi-max-frequency: true - vs-supply: description: Regulator that supplies power to the accelerometer @@ -48,7 +44,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml index 9bb039e2f533..346abfb13a3a 100644 --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml @@ -32,8 +32,6 @@ properties: spi-cpol: true - spi-max-frequency: true - interrupts: maxItems: 1 @@ -42,7 +40,10 @@ required: - reg - interrupts -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml index ba54d6998f2e..14b487088ab4 100644 --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml @@ -45,13 +45,14 @@ properties: vddio-supply: description: Regulator that provides power to the bus - spi-max-frequency: true - required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml index d259e796c1d6..f10d98d34cb8 100644 --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml @@ -35,8 +35,6 @@ properties: interrupts: maxItems: 1 - spi-max-frequency: true - vdd-supply: true vddio-supply: true @@ -45,7 +43,10 @@ required: - reg - interrupts -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml index 38b59b6454ce..73a5c8f814cc 100644 --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml @@ -25,14 +25,15 @@ properties: interrupts: maxItems: 1 - spi-max-frequency: true - required: - compatible - reg - interrupts -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml index 942b23ad0712..5dd06f5905b4 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml @@ -20,8 +20,6 @@ properties: interrupts: maxItems: 1 - spi-max-frequency: true - vdda-supply: true vddd-supply: true vddio-supply: true @@ -30,7 +28,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml index 478e75ae0885..457a709b583c 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml @@ -72,7 +72,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml index 272eb48eef5a..3cb82576d758 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml @@ -24,8 +24,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vdd-supply: true vddio-supply: true @@ -50,7 +48,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml index 7c8f8bdc2333..589ca8178f4a 100644 --- a/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml +++ b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml @@ -40,13 +40,14 @@ properties: - "INT1" - "INT2" - spi-max-frequency: true - required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml b/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml index 390b87242fcb..f64d99b35492 100644 --- a/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml +++ b/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml @@ -29,13 +29,14 @@ properties: mount-matrix: description: an optional 3x3 mounting rotation matrix. - spi-max-frequency: true - required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml b/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml index f6e2a16a710b..00c990caa1e4 100644 --- a/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml +++ b/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml @@ -29,7 +29,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml b/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml index ad529ab2c6e2..65ce8ea14b52 100644 --- a/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml +++ b/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml @@ -27,8 +27,6 @@ properties: vdd-supply: description: phandle to the regulator that provides power to the accelerometer - spi-max-frequency: true - interrupts: maxItems: 1 @@ -44,7 +42,10 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | From patchwork Wed Jul 27 16:46:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930615 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE73DC04A68 for ; Wed, 27 Jul 2022 17:28:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242164AbiG0R2c (ORCPT ); Wed, 27 Jul 2022 13:28:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiG0R1g (ORCPT ); Wed, 27 Jul 2022 13:27:36 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A7847F50E for ; Wed, 27 Jul 2022 09:47:16 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id r14so20446971ljp.2 for ; Wed, 27 Jul 2022 09:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mXw/gx1TvWDFNgjG1qr/pqI36Mmqb6KSC/b/lR/QsLU=; b=layrHSzuuv7WZaKIMxqMlq4RK1ZL55arpJ65jtX7RdCUtFejuIaL8Knr9jz9MPtQKa igjYvSZ7O12G4rPWOkL6+xA/t65NoZGrKQFnnZ8lsn6tYFWQFIaBT+PRnfSXjl4vmNPA zRpZP3PKnU0ia3VaEVGFu4o/i1c1z8g6RjQz8SM1A4n329tpp8JeQNmbqX3HpN8bbNc9 DzW/KCI3QSS+5TMzXtB9XuXEfHWaomVMtzZSZRnmtlRaKVWIyb+/4Yf5rFrsES3ShMUx Y67Fvc9DW12vdPuz0tv6k2Q43OjsUTwYy6HsU1dMrrFrwwUcgFcGPTZ/U1Eb35abgpDX +P4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mXw/gx1TvWDFNgjG1qr/pqI36Mmqb6KSC/b/lR/QsLU=; b=y17pvkGo5jD7xC/2LM9dDD/aO0QrmV3j1RlYJrZnfwkThkAHdIrMP5ppqg64M940Go z7N4Fvq6+O7lvSNfIKkxXcoljX4UKBDmf7Tdp4NW7ICEVct6kJyixSoH4f2msk9+RjoB r7a0qnb0wKW0SiqdfwLIrhPlqmkknKC8FnugTENubdD7wrXpvx+G6lkn7ZTEjstsjgB7 nkUB3kIGHpQWtlf0LL0UCswgxA2RJlW3rdZHT8YWdINTHt/bP1KKG9UVWiVDNWbZq2Vp 97x79uDzntRv4rkmCt6+aIU/JqLze/LMe4oPVG8IpIY3LeSYggsXpwjRlSemKguJdSRT h1ig== X-Gm-Message-State: AJIora9jDiIHewuYNxDX2sil9TQVNq/dC6UmHP9nYIsogt6C/7OkWu2G o7wL+NeZ2KI9jiOqsDd0mGENUQ== X-Google-Smtp-Source: AGRyM1uCkfI3WTlZUr7WEZGfvAesB7wgSz0zkg+J9RomegxGE4tsQI4qHhyYZ9pnFuMvhJCs3YaR9Q== X-Received: by 2002:a2e:844a:0:b0:255:46b9:5e86 with SMTP id u10-20020a2e844a000000b0025546b95e86mr7505870ljh.388.1658940430765; Wed, 27 Jul 2022 09:47:10 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:10 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 03/10] dt-bindings: iio: amplifiers: adi,ada4250: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:39 +0200 Message-Id: <20220727164646.387541-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/iio/amplifiers/adi,ada4250.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml b/Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml index 5277479be382..c15da155d300 100644 --- a/Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml +++ b/Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml @@ -27,14 +27,15 @@ properties: Enable internal buffer to drive the reference pin. type: boolean - spi-max-frequency: true - required: - compatible - reg - avdd-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | From patchwork Wed Jul 27 16:46:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE1C7C19F2B for ; Wed, 27 Jul 2022 17:28:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242227AbiG0R26 (ORCPT ); Wed, 27 Jul 2022 13:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239142AbiG0R1k (ORCPT ); Wed, 27 Jul 2022 13:27:40 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C9277F519 for ; Wed, 27 Jul 2022 09:47:17 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id p21so12803996ljh.12 for ; Wed, 27 Jul 2022 09:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5hs2L2k4qCWX2gnOpNz9FnyN8tjq/hVKa8FSzGNbvHY=; b=Nz0NtvJJcqRxKRT5px1ZtW+FsV3draGdGXgF0M1caY5X80Ck5ISgFnye8Uc4zVnKP+ NZAJDWjUgAB1QXuRhbz5q7XwylRoJkn6ZrwdtRq+uc4nbfL2dbcdfL3rCVkenbinO2lX RkEaydx3XxdbrMXW7MnBOEbMkbp66BAu5KOoqz1fCHNrrFCWndREWI31kaUy4y2GdjSz 7VhhNvCgBBiBd8t6xRsMoPPNJsS6jBWIjX4E52O+5eQWrf57+LgA/gYg0tr+wkLL09Hi j1BkwCmAnJazmJetMngMGCZm0ksdNSqRd/eDy/klK1zvtCHT/G7lCeZ7cM426Xw314zr GFrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5hs2L2k4qCWX2gnOpNz9FnyN8tjq/hVKa8FSzGNbvHY=; b=eTuJtgfT6h0bRcKI1tzSlQ0KaVhCjjLxdU//gPzfvdULM9iDDgfLr/kDZluhU40yLX oeNlyL8MUZ7klPABFHPJ7983hCylYtt/GqksdxV2zX5frsUlVMDJmvYfD1PE4+RsJ+fj wsEJZ16zaSYykcNCJZk5VabIFvEBgvpnWYUq9M+J606TKfrAjHvk0K3oxgSIZ25xbBT5 GlHbg7sQmxZbVj8xzJ4ggpr/OkBGQMt7FdjLq8H1QJk/z17vZUxlZMHdhIBBNHNFegvH Uru8vFPlgP/x9nf/mqITkQq8FUZhbUVXmcWqxvEGbO68Xq/EHNSLIk7KM10R1wFm7nI/ CL5w== X-Gm-Message-State: AJIora98unX1YBPV8Qy7pGrCmkPFp7qaJjaoLb/+dOZj+sL1FLwBPOAG UsSDrDu2amoTlM0syMQhGypQEA== X-Google-Smtp-Source: AGRyM1tnLBvt1C5HTanFjLIbWJ2+62dBBeJtU9YqyUQ6RsYe+3R4sNIhehgwrriDI2l1EWHaP57Qqw== X-Received: by 2002:a2e:780a:0:b0:25d:f5af:856d with SMTP id t10-20020a2e780a000000b0025df5af856dmr7663949ljc.222.1658940433759; Wed, 27 Jul 2022 09:47:13 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:13 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 04/10] dt-bindings: iio: dac: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:40 +0200 Message-Id: <20220727164646.387541-5-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/iio/dac/adi,ad5064.yaml | 7 +++---- .../devicetree/bindings/iio/dac/adi,ad5360.yaml | 7 +++---- .../devicetree/bindings/iio/dac/adi,ad5380.yaml | 9 +++++---- .../devicetree/bindings/iio/dac/adi,ad5421.yaml | 7 ++++--- .../devicetree/bindings/iio/dac/adi,ad5449.yaml | 7 +++---- .../devicetree/bindings/iio/dac/adi,ad5624r.yaml | 9 +++++---- .../devicetree/bindings/iio/dac/adi,ad5686.yaml | 9 +++++---- .../devicetree/bindings/iio/dac/adi,ad5755.yaml | 9 +++++---- .../devicetree/bindings/iio/dac/adi,ad5758.yaml | 4 ++-- .../devicetree/bindings/iio/dac/adi,ad5761.yaml | 7 +++---- .../devicetree/bindings/iio/dac/adi,ad5764.yaml | 7 +++---- .../devicetree/bindings/iio/dac/adi,ad5770r.yaml | 7 ++++--- .../devicetree/bindings/iio/dac/adi,ad5791.yaml | 9 +++++---- .../devicetree/bindings/iio/dac/adi,ad8801.yaml | 7 +++---- .../devicetree/bindings/iio/dac/microchip,mcp4922.yaml | 9 +++++---- .../devicetree/bindings/iio/dac/ti,dac082s085.yaml | 9 +++++---- .../devicetree/bindings/iio/dac/ti,dac7311.yaml | 7 ++++--- .../devicetree/bindings/iio/dac/ti,dac7612.yaml | 7 ++++--- 18 files changed, 71 insertions(+), 66 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml index 05ed4e0ec364..c04165fa9259 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml @@ -95,15 +95,12 @@ properties: vrefD-supply: true vref-supply: true - spi-max-frequency: true - -additionalProperties: false - required: - compatible - reg allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - # Shared external vref, no internal reference if: properties: @@ -232,6 +229,8 @@ allOf: - vrefA-supply - vrefB-supply +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml index 65f86f26947c..86e2884cdfb1 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml @@ -28,10 +28,6 @@ properties: vref1-supply: true vref2-supply: true - spi-max-frequency: true - -additionalProperties: false - required: - compatible - reg @@ -39,6 +35,7 @@ required: - vref1-supply allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: properties: compatible: @@ -63,6 +60,8 @@ allOf: required: - vref2-supply +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml index d599b418a020..ff50c72c62b5 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml @@ -39,14 +39,15 @@ properties: description: If not supplied devices will use internal regulators. - spi-max-frequency: true - -additionalProperties: false - required: - compatible - reg +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml index 188f656617e3..52d089ebde95 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml @@ -26,13 +26,14 @@ properties: maxItems: 1 description: Fault signal. - spi-max-frequency: true - required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml index 044332c97743..d2af2d491986 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml @@ -27,19 +27,16 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - VREF-supply: true VREFA-supply: true VREFB-supply: true -additionalProperties: false - required: - compatible - reg allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: properties: compatible: @@ -72,6 +69,8 @@ allOf: - VREFA-supply - VREFB-supply +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml index 330383b85eeb..4d5111a5f9bd 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml @@ -22,17 +22,18 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vref-supply: description: If not present, internal reference will be used. -additionalProperties: false - required: - compatible - reg +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml index 5c26441eae9f..13f214234b8e 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml @@ -53,14 +53,15 @@ properties: vcc-supply: description: If not supplied the internal reference is used. - spi-max-frequency: true - -additionalProperties: false - required: - compatible - reg +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml index f866b88e1440..9a3c2926bf85 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml @@ -25,8 +25,6 @@ properties: description: Either this or spi-cpol but not both. spi-cpol: true - spi-max-frequency: true - adi,ext-dc-dc-compenstation-resistor: $ref: /schemas/types.yaml#/definitions/flag description: @@ -67,8 +65,6 @@ required: - compatible - reg -additionalProperties: false - patternProperties: "^channel@[0-7]$": type: object @@ -123,6 +119,11 @@ oneOf: - required: - spi-cpol +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml index fd4edca34a28..e49e7556175d 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml @@ -16,7 +16,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true spi-cpha: true adi,dc-dc-mode: @@ -99,6 +98,7 @@ required: - adi,dc-dc-mode allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: properties: adi,dc-dc-mode: @@ -115,7 +115,7 @@ allOf: required: - adi,range-microvolt -additionalProperties: false +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml index 7f95a9ed55fe..df550b5af2f7 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml @@ -22,18 +22,15 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vref-supply: description: If not supplied, internal reference will be used. -additionalProperties: false - required: - compatible - reg allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: properties: compatible: @@ -45,6 +42,8 @@ allOf: required: - vref-supply +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml index 8e893d52bfb1..0b409a727a43 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml @@ -22,18 +22,15 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vrefAB-supply: true vrefCD-supply: true -additionalProperties: false - required: - compatible - reg allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: properties: compatible: @@ -46,6 +43,8 @@ allOf: - vrefAB-supply - vrefCD-supply +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml index 24ac40180ac1..ca5432ffdedb 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml @@ -49,8 +49,6 @@ properties: asserted during driver probe. maxItems: 1 - spi-max-frequency: true - '#address-cells': const: 1 @@ -138,7 +136,10 @@ required: - channel@4 - channel@5 -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml index 650d1ebdcec3..3a84739736f6 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml @@ -23,19 +23,20 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vdd-supply: true vss-supply: true -additionalProperties: false - required: - compatible - reg - vdd-supply - vss-supply +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml index 6a3990a8d0ad..1849a2ff05c7 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml @@ -19,19 +19,16 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vrefh-supply: true vrefl-supply: true -additionalProperties: false - required: - compatible - reg - vrefh-supply allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: properties: compatible: @@ -44,6 +41,8 @@ allOf: properties: vrefl-supply: false +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml index 4c430abcdbf9..19374401e509 100644 --- a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml +++ b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml @@ -21,17 +21,18 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - vref-supply: true -additionalProperties: false - required: - compatible - reg - vref-supply +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml b/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml index b0157050f1ee..201b04af2b22 100644 --- a/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml +++ b/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml @@ -33,21 +33,22 @@ properties: vref-supply: description: Needed to provide output scaling. - spi-max-frequency: true - required: - compatible - reg - vref-supply -additionalProperties: false - oneOf: - required: - spi-cpha - required: - spi-cpol +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | vref_2v5_reg: regulator-vref { diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac7311.yaml b/Documentation/devicetree/bindings/iio/dac/ti,dac7311.yaml index 10be98d1f19c..a6814587dbc4 100644 --- a/Documentation/devicetree/bindings/iio/dac/ti,dac7311.yaml +++ b/Documentation/devicetree/bindings/iio/dac/ti,dac7311.yaml @@ -24,14 +24,15 @@ properties: Reference voltage must be supplied to establish the scaling of the output voltage. - spi-max-frequency: true - required: - compatible - reg - vref-supply -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml b/Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml index d172b142f6ed..20dd1370660d 100644 --- a/Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml +++ b/Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml @@ -29,13 +29,14 @@ properties: DACs are loaded when the pin connected to this GPIO is pulled low. maxItems: 1 - spi-max-frequency: true - required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | From patchwork Wed Jul 27 16:46:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930616 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5308C19F2B for ; Wed, 27 Jul 2022 17:28:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242219AbiG0R24 (ORCPT ); Wed, 27 Jul 2022 13:28:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238024AbiG0R1k (ORCPT ); Wed, 27 Jul 2022 13:27:40 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E1E27F526 for ; Wed, 27 Jul 2022 09:47:18 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id bf9so27843083lfb.13 for ; Wed, 27 Jul 2022 09:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xZf4OdbV43HHtgf1qVIKge/GbJKtAf7d2TC+uXlE1iw=; b=unFrdwkByedm1Cx4IG8Ku7mviSYROrujqG4UjXQkiG0xYgsmJHR0xO4a+bYbYW/PwS +BpCE5BwASL4enlWpSc5ChcanRPNkec78zKAkoqgkfIfM9juO9yFiudCpM2kK2iiVUUN vcX/bOW82bpl3sEJt8lJ4P7UjpNpPGtSmZmxIhjeBtOY/lI5Pyef+zmEyrN7JnZwOT2v 5ornAJUjWzhOFUJ2FsEA+6X3NuHvsDNA0boK2iaiU45J721qkxkd0KE7vpsaUxk9VfAE jbFm7EwWypt894KHqZaTBTjDRfbDhf2/nLsKWfjp3UDMIHwCK+Coy4qvG59UqItR52XE A4RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xZf4OdbV43HHtgf1qVIKge/GbJKtAf7d2TC+uXlE1iw=; b=S8hhzb4SQjTpxt0QTuE2AAkv2BmyfREHCq+HZp4ZBFE0JsBOMC6KLGVqxXBsLEQHtz dxNnUZ+XV0vHYxhbDgV7dmt6juaDLSKs+8EGFLBcgUvR2s0y8oObJI8QhsrzGLC9VDaV WvD2yZ9ADwRn1IeMQRq4Av5Umtr4Vbn2yHx1VQYkwHARLQ05n4IjxfW+Ec6o3DWGk5Nl QTpyGIv4g2XIP99UH4BYVzzoOSP22nF7pnj6kiZADnrf4X6hf2KJf65+H7rBc7rCbRmb bfF55V0w6rM1Pd9/5z6BRA7QPU/sm1WaLlON+ieHHNis8DuFIeFrZe1c8xNDFBge1JbB bxRw== X-Gm-Message-State: AJIora95lPejgmXQOIn0yHC3VB5VqQ8BZRMR2teU/cCrrc1jhIaW6FE5 GKieBmh1GL+GUxGvmHYTfnukjw== X-Google-Smtp-Source: AGRyM1vk2lUU2rIgm+Qs7fiV5lfej9Y3jJ3qYGukgFmUOo3/tcHiuWVrQUOzvf2yUdGjOtEdYb/yTw== X-Received: by 2002:a05:6512:1287:b0:489:e488:950f with SMTP id u7-20020a056512128700b00489e488950fmr8402948lfs.440.1658940436717; Wed, 27 Jul 2022 09:47:16 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:16 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 05/10] dt-bindings: iio: frequency: adf4371: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:41 +0200 Message-Id: <20220727164646.387541-6-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/iio/frequency/adf4371.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml b/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml index 6b3a611e1cf1..0144f74a4768 100644 --- a/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml +++ b/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml @@ -40,15 +40,16 @@ properties: output stage will shut down until the ADF4371/ADF4372 achieves lock as measured by the digital lock detect circuitry. - spi-max-frequency: true - required: - compatible - reg - clocks - clock-names -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | From patchwork Wed Jul 27 16:46:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930618 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4AD7C04A68 for ; Wed, 27 Jul 2022 17:30:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230309AbiG0RaL (ORCPT ); Wed, 27 Jul 2022 13:30:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242132AbiG0R1t (ORCPT ); Wed, 27 Jul 2022 13:27:49 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7A227E82D for ; Wed, 27 Jul 2022 09:47:24 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id t22so21550669lfg.1 for ; Wed, 27 Jul 2022 09:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G58v43xma03waMnam16LPp6PjErsC4YB3W0kFW2yXEw=; b=bkweZ8DUw8CXRKbjPLdIjIMR9jSuhPlbY/WgGBuPuZjvISu/X5g5hsJldTx/S+tux5 H1O6H4yiGvwQuw1wPyBDRmR+MHE/HKQu4JZEe78b2PiTONvXPu+p7gBmrVsgbfQx0OLH O0ebEpNNCLP2YOE3Q/zCZzt7+T0hlOie7x9iPFMjO58tEoMfwIBRoFxRzD0Tp0BsoA8b wDINxw4SiKwKwavER2Nl5vmkU5yVOBavA3s63FgBX7zfE0gBoV6tA1qNVfywm6nkWmJg P9EvVQodM6kgg1iGz1M3SEzo8hjH1ZxzrxKM2yn7qczRHbEy6cdzNrnmptoI5dit7JGU DpfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G58v43xma03waMnam16LPp6PjErsC4YB3W0kFW2yXEw=; b=g8Gw0vIXTW3vgoDDPQifJ8tLvFpy7O5r30A3Z0YtGF9RkZC+vGK4e2fnTR6leCHxIW emMv6CizQg5/D+U3l7jqYer5ENmZIj7WWSgWdtqZaVLC0INckGXEw4K3EtOjWlFlDD8d cTONFYd/KIpc8B1vIstqnh5AZz+2hCAmK2W0udlHWfjcYJBTYzdbOkz76C9lg+bNeg9L 86VtT0omu+NgM9dN7YBTFjW3x+63Lmwf8v3w7MJKqiTyIlrkbqrPZvgSOWhMsVUk2uve 1q0MKfajkdQowlkuNl/T+iuhCwvsvCqOlnbWiKKrpKEXadzGERGg13ukVpFoJaETiP3A 9+ew== X-Gm-Message-State: AJIora/uigWaL5fM1xCQ/MK4YDy4OMB36hpOyZlF6lima2zkKhsPAwY5 eYkDcpcHL5W7vmWFqvjfZpih8w== X-Google-Smtp-Source: AGRyM1vH0CUVOEcBUq1/Yiy2wWxdiPJq8QJMm8MMUeir/jyTAwdNpR1ErRGBl6KcNmi7ge05zM/W9Q== X-Received: by 2002:a05:6512:1393:b0:489:dd15:f04b with SMTP id p19-20020a056512139300b00489dd15f04bmr8180807lfa.284.1658940440119; Wed, 27 Jul 2022 09:47:20 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:19 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 06/10] dt-bindings: iio: health: ti,afe4403: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:42 +0200 Message-Id: <20220727164646.387541-7-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/iio/health/ti,afe4403.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml index d861526c5c42..6c5ad426a016 100644 --- a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml +++ b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml @@ -25,14 +25,15 @@ properties: reset-gpios: true - spi-max-frequency: true - -additionalProperties: false - required: - compatible - reg +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | #include From patchwork Wed Jul 27 16:46:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE8ABC3F6B0 for ; Wed, 27 Jul 2022 17:30:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239023AbiG0RaP (ORCPT ); Wed, 27 Jul 2022 13:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242176AbiG0R2a (ORCPT ); Wed, 27 Jul 2022 13:28:30 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB2927FE5A for ; Wed, 27 Jul 2022 09:47:28 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id a23so25593609lfm.10 for ; Wed, 27 Jul 2022 09:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4Tysa2646FPeIVNiHGi3W/H89t++BUP3ETBrFPRlVhE=; b=BMHaoQHWUjxOqin5iFDh5Q7ZstwBh4/d8Y0RCri+Lp/qeZ9UglnV/3vaEb7xZnVPs7 nNPVjzhy9HIqFwyCaQ2zqsLiGwdgEYxyajDMTqmr048CsEYUswMLP2ynE9LmG8AVqxST Bn7YOmAfl9evLu95wG/sZZ9apHwBeEJU2zwUAPJOkIq51QYdGeh/esSdG0FbfBbsAsZH HXrRqo4bZmHLxYEVN6Pj7f7i3G+viPpf5W6TnrBLXDEgLFR3Ho3A7MVIzWw6Il6UUopg IELKdLkADR/HNhuuBcuL+rDKVJiFVcyqhatpyczgqPKr9RK3IcjDpQARH6ukuwZfJEFq yz+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4Tysa2646FPeIVNiHGi3W/H89t++BUP3ETBrFPRlVhE=; b=uS0S7EQYUsVMGgQvDaoQdg8pvp/5+t/NMaYuBYBV8hZb338XzcUj3s/c2VJq5GAD6P OXUnHFb+UEg3UVHxfRjdcOB8ZhQReqyQb9gEBFHbUtAgQmrB7AZ+CC1yYMSUMVDOtnZJ +tY5spoA9jtbnEioMlfQ7WSvefpKJBMBs/Sm1ie0wuJw2WI/KYHiYWq1ZKWdjKaOV8Iq K0pNU6F3EDtwpG7+IMbeN/XCPiRdIjN6V9gDq/Fx0lEjliFSRRahZq8aZ6ZVnaSlF8ee zw4kzUOlc108VAPy2gJLr7+ULZDEIvnsEf/56VLvYF7OpsUpaRuSrzawGnhECcuL/gfs xtyw== X-Gm-Message-State: AJIora8VGyUBz7RzTZTdJJxCfYWHLAYxJrvePjeDEFZ5fW/7XxgTmZ8b /7hms9TqH1vcJ7STV6QWGbB1rw== X-Google-Smtp-Source: AGRyM1vmh7HmMwSNeSSIgsIVOXPC4LcHYD7jNf0qFvpii7Dtgi/92kOVE66rVVAg8/X6a0SRqhLSzA== X-Received: by 2002:a05:6512:39d5:b0:48a:bfe9:23ee with SMTP id k21-20020a05651239d500b0048abfe923eemr694931lfu.604.1658940443564; Wed, 27 Jul 2022 09:47:23 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:22 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 07/10] dt-bindings: iio: imu: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:43 +0200 Message-Id: <20220727164646.387541-8-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/iio/imu/adi,adis16460.yaml | 7 ++++--- .../devicetree/bindings/iio/imu/adi,adis16480.yaml | 9 +++++---- .../devicetree/bindings/iio/imu/bosch,bmi160.yaml | 7 ++++--- .../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 6 ++++-- .../devicetree/bindings/iio/imu/invensense,mpu6050.yaml | 5 ++--- .../devicetree/bindings/iio/imu/nxp,fxos8700.yaml | 7 ++++--- .../devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 9 +++++---- 7 files changed, 28 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml b/Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml index 340be256f283..d166dbca18c3 100644 --- a/Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml +++ b/Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml @@ -25,8 +25,6 @@ properties: spi-cpol: true - spi-max-frequency: true - interrupts: maxItems: 1 @@ -35,7 +33,10 @@ required: - reg - interrupts -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml b/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml index dd29dc6c4c19..56e0dc20f5e4 100644 --- a/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml +++ b/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml @@ -47,8 +47,6 @@ properties: - DIO3 - DIO4 - spi-max-frequency: true - spi-cpha: true spi-cpol: true @@ -96,8 +94,6 @@ properties: - DIO3 - DIO4 -additionalProperties: false - required: - compatible - reg @@ -106,6 +102,11 @@ required: - spi-cpol - spi-max-frequency +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | #include diff --git a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml index 6e73cd889b5c..a0760382548d 100644 --- a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml +++ b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml @@ -46,13 +46,14 @@ properties: mount-matrix: description: an optional 3x3 mounting rotation matrix - spi-max-frequency: true - required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml index 4c1c083d0e92..488349755c99 100644 --- a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml +++ b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml @@ -47,7 +47,6 @@ properties: vddio-supply: description: Regulator that provides power to the bus - spi-max-frequency: true spi-cpha: true spi-cpol: true @@ -56,7 +55,10 @@ required: - reg - interrupts -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml index 3ebc6526d82d..ec64d7877fe5 100644 --- a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml +++ b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml @@ -40,8 +40,6 @@ properties: interrupts: maxItems: 1 - spi-max-frequency: true - vdd-supply: true vddio-supply: true @@ -54,6 +52,7 @@ properties: These devices also support an auxiliary i2c bus via an i2c-gate. allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: not: properties: @@ -67,7 +66,7 @@ allOf: properties: i2c-gate: false -additionalProperties: false +unevaluatedProperties: false required: - compatible diff --git a/Documentation/devicetree/bindings/iio/imu/nxp,fxos8700.yaml b/Documentation/devicetree/bindings/iio/imu/nxp,fxos8700.yaml index 479e7065d4eb..beeaa3c902cd 100644 --- a/Documentation/devicetree/bindings/iio/imu/nxp,fxos8700.yaml +++ b/Documentation/devicetree/bindings/iio/imu/nxp,fxos8700.yaml @@ -36,13 +36,14 @@ properties: drive-open-drain: type: boolean - spi-max-frequency: true - required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml index 5d4839f00898..0ceb29fb01b7 100644 --- a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml +++ b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml @@ -45,8 +45,6 @@ properties: description: Supports up to 2 interrupt lines via the INT1 and INT2 pins. - spi-max-frequency: true - vdd-supply: description: if defined provides VDD power to the sensor. @@ -81,12 +79,15 @@ properties: wakeup-source: $ref: /schemas/types.yaml#/definitions/flag -additionalProperties: false - required: - compatible - reg +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | #include From patchwork Wed Jul 27 16:46:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06A93C04A68 for ; Wed, 27 Jul 2022 17:31:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242130AbiG0RbK (ORCPT ); Wed, 27 Jul 2022 13:31:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242263AbiG0R3L (ORCPT ); Wed, 27 Jul 2022 13:29:11 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FE0080485 for ; Wed, 27 Jul 2022 09:47:35 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id p22so10648798lji.10 for ; Wed, 27 Jul 2022 09:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7axPEVk6MWtPTP7h5E9Ae0SR4WCvVBdWSVGZwXrfCJc=; b=OXVXmyiSwBKGxExCjMfAYqoW/5KcBGPFCllunr4xkxrHjAZAfzmM6C5GvVNZ9WEQ5n Vd/L2eEK7/Jjeh65uCxfhFzTpwW/nfY41WJO2GEJ5FxJPrUbsJunJnUDZnHRyd13jXNV el6qv/PaSM+iuGypevpNuTYXrfdWlfqJ4+hT3YN3sngePZTynARw5jANlBUTqDrgrZuI lGTcnP7reAfuXpo7kE6zlfzjXf/fsCeGhInXq0FMW8slnZbx8Fip//DVdVpO9N5r9Ss6 ePb/gSBH8koPezr5mIrtzyAJSj95Ya4ZuV2zggUxbyOc9scukgioz7s73ng1wpBub0FS pIvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7axPEVk6MWtPTP7h5E9Ae0SR4WCvVBdWSVGZwXrfCJc=; b=praXT1PcdU9TTl2cMg0pU5bdpIMZ6we7xpLnKahT8f0J3/ZEQGvqjceYCX+DHj3o3C Qqme5oMRvIyeEVyEiHpawjc56n7lkgw57SQ2T4jQP1kwUC4FxdkU5nTzhXB2DgvbpOoT uhWFWFrPhoK7eRiCg4A8TYjtqY4PFdYqjMPk/t5if0r9RUp2XYv/V3DIhl6BDRRsprCO KM0XB+5aUwnwJPuzKlKUdMRwAclxnjAC9PMNEpc3R+uYS2bE1xgY6GQQJrj+8hBKfYd6 Yo7ORlBuEn3lT0+sN7wqPFsn5p63t4JdFJJ3zU5EwCuXrXOHXjdfzjiDtwZs1NAJ5rvH xihw== X-Gm-Message-State: AJIora+llSWqCeeHkswehyp46c2Srky6WXHig8QVZiWSM/OS2lFkn2iV 70PaxFXexQ8b1JqSV3E//VJHjw== X-Google-Smtp-Source: AGRyM1sKYUvvHKjGHjubByE9l1jd6M1xEA+oiFn/KZJEYN6GKSHQtVPNl1ZvwRL1PD+wISXUf38VUw== X-Received: by 2002:a2e:a99e:0:b0:25e:a54:8328 with SMTP id x30-20020a2ea99e000000b0025e0a548328mr4685386ljq.141.1658940447509; Wed, 27 Jul 2022 09:47:27 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:25 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 08/10] dt-bindings: iio: potentiometer: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:44 +0200 Message-Id: <20220727164646.387541-9-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski --- .../bindings/iio/potentiometer/microchip,mcp41010.yaml | 9 +++++---- .../bindings/iio/potentiometer/microchip,mcp4131.yaml | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml index 567697d996ec..87e88f2a9908 100644 --- a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml +++ b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml @@ -25,14 +25,15 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - -additionalProperties: false - required: - compatible - reg +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { diff --git a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml index 32e92bced81f..896fe0b5edcc 100644 --- a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml +++ b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml @@ -80,14 +80,15 @@ properties: reg: maxItems: 1 - spi-max-frequency: true - -additionalProperties: false - required: - compatible - reg +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { From patchwork Wed Jul 27 16:46:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930620 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1E96C19F2B for ; Wed, 27 Jul 2022 17:30:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237709AbiG0RaO (ORCPT ); Wed, 27 Jul 2022 13:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237050AbiG0R2m (ORCPT ); Wed, 27 Jul 2022 13:28:42 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DCE27FE6C for ; Wed, 27 Jul 2022 09:47:31 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id bf9so27844062lfb.13 for ; Wed, 27 Jul 2022 09:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZNmQiW5AvIOtEUDHlEIUtIO/nCYrI/d8smXZXTrIU/o=; b=iWVXqzqfgZWyU6q37aPpBdfPk83KO2tiGk/vS4ImIdjeT2Dl+ubQlKovcWSMO8KLi+ XwvXqv6Se2XkUBte+uexnIyqDWxxfM0u0eOWoES6PD0zssoj//+yD59C9yD0hTc0h9xd OJYba76JcO8JmYRV/v0dPrIFWkYQk785XpnZrV7QFo/tnpdo/SW9GYzql8UngmibcjR7 cJBtJKoQGp8m9zCsbIAFltb5r3tLwcBSLBei7BirzZAUDtF8jJpMjxo2m8OYcqfkXqoh RVXUhQDUyJMgPmr640Dn12uoRvcqGywVXK2mIhMMU7GyeDheyh8xdE88NXCTLjDQlvPY 1p9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZNmQiW5AvIOtEUDHlEIUtIO/nCYrI/d8smXZXTrIU/o=; b=b6tW53oDMaRNEvVUREfRtAuho+Wki6LDbdQEFj+nFhquGruiz/2YK7hOUnaBKg13G4 xMVBpFhM+51QmkEQ5VohfbpLOcx+Hf2Bck1JSxlkahRLbz7MOjd/A1BkekaTbH9fZMjC yb9Ij2ynZYNj0DrM20AfzhhkRVN0JlpMPyicu9nrQS319kdE711x9ZxTn0GLwIu8+FYz WoGlUq2enySS+pTsOGNC/XC1sWbRbH8gmSbHRNOQQudFsyvdZULbVkEzR1tDOWs74nhw 9LpFTYhlQSVwwvEIX2L9MVVq2d2TF836ZmntjKbpcbOtC2GJ2nm2OXq3Hfzr/ZXwNAzC 5EXg== X-Gm-Message-State: AJIora9/eR54ipqiR/15+L2VZUJCN67yE5/NfXXmjj8j//sLJe6d8ARB xZdm6RK3/P6V4vJ9KRdi02nezQ== X-Google-Smtp-Source: AGRyM1ut7IU0GDmY5J6kKoccIPiyd8sybZvYlRabx++YLduroVnAeRYMEgFsMozQNRD25CBNiFMpLA== X-Received: by 2002:a05:6512:c16:b0:48a:97b2:e060 with SMTP id z22-20020a0565120c1600b0048a97b2e060mr4471424lfu.660.1658940450562; Wed, 27 Jul 2022 09:47:30 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:29 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 09/10] dt-bindings: iio: samsung,sensorhub-rinato: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:45 +0200 Message-Id: <20220727164646.387541-10-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski --- .../bindings/iio/samsung,sensorhub-rinato.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml b/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml index a88b3b14d6bd..dd2ae2bd1ad7 100644 --- a/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml +++ b/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml @@ -40,10 +40,6 @@ properties: description: Reset the sensorhub. - spi-max-frequency: true - -additionalProperties: false - required: - compatible - reg @@ -52,6 +48,11 @@ required: - mcu-ap-gpios - mcu-reset-gpios +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + examples: - | spi { From patchwork Wed Jul 27 16:46:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12930619 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 789C0C19F2D for ; Wed, 27 Jul 2022 17:30:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234306AbiG0RaN (ORCPT ); Wed, 27 Jul 2022 13:30:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242306AbiG0R3X (ORCPT ); Wed, 27 Jul 2022 13:29:23 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC28A52DE7 for ; Wed, 27 Jul 2022 09:47:39 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id t22so21551490lfg.1 for ; Wed, 27 Jul 2022 09:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DTTVWNUuMuaI4chfKvwmUvgtvzhYatcrU+SN3O9eX+s=; b=U002gDRLMVsJcBk1u0QPgZOu1snf9GyRDIF0+hEXGZ3haziNjkH7VmHhe5k2dep76h jGP1rmKNRvmnY0TKJOym7pFkVHO0Kzpg5nM8r6n8X2eRaMlpLLp321HsxcZxZYeR2tKj dkCnVXuPkopn82sXC+6c6aJ3W9/+CnsLa768eW2cazuEiSffHnabzcZaJe/b1gW8rSDz 6YitIkc57NAJWyu483kFfVoK2QTJveFGqunRBSo1523GJGyLiiZzC/MHbCcu8HhYGvEw Ab5DHDdwaUDwHCPINisD+tdZt5JiZmV/9vcDZO8x4qnkGSl97nw9JO5myfTyQ1VFH15x OCNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DTTVWNUuMuaI4chfKvwmUvgtvzhYatcrU+SN3O9eX+s=; b=0V6+YtG0Z6ZAoURvo8jE9BjBwLQk9z0xQBNO2Xt1UW3eHVW0meMDk1uzKWObEPoY18 A/I/yQUtxjYeGpzK9v1b9PGsdNgzyAsSr0XMALP1xL4LxLmkla3WAvHu8UiMYgcJjXX7 CqkBafFGs5S5k6QMBWFi1laJOod0dDzMgFHP9wjG/hGiRlHfpt3D8CUqxP430KqvWCV/ Fpfvt2db3inJDvI3mnMvmeCvZXmh7EFicK3GHMvdS8LrXk0TjZmdBqsnIkTJtt771a1+ OMXYTZdPinpUEjJ/MQh4O81sNFXGeoy5HtH/VHgNWgoPEX6n8suRUELDETxOVSP9J/3W ARSg== X-Gm-Message-State: AJIora8GrtWKy+45ok4bNkLHDNH4XY+zwpxehwgNz2k2KAZa5EQj35oU 54m7+OfHyrS80h+aTRKj8U6YMw== X-Google-Smtp-Source: AGRyM1vVIiFk5cN8M18OeA3AFnnZUsvMne4m446kxamz2WkV0ZBhabaZIWjFAE7Y/F+ZoYUbqBF+nw== X-Received: by 2002:a05:6512:2350:b0:48a:794b:382 with SMTP id p16-20020a056512235000b0048a794b0382mr8070684lfu.185.1658940453508; Wed, 27 Jul 2022 09:47:33 -0700 (PDT) Received: from krzk-bin.lan (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id 18-20020ac25f52000000b0048910301774sm3375149lfz.307.2022.07.27.09.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 09:47:32 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Lucas Stankus , Puranjay Mohan , Cosmin Tanislav , Alexandru Tachici , Marcelo Schmitt , Marcus Folkesson , Kent Gustavsson , Tomislav Denis , Oleksij Rempel , kernel@pengutronix.de, Antoniu Miclaus , Ricardo Ribalda , Dragos Bogdan , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Stefan Popa , Linus Walleij , Stephan Gerhold , Mike Looijmans , Joachim Eastwood , Tomas Melin , Sean Nyekjaer , Beniamin Bia , Patrick Vasseur , Charles-Antoine Couret , Vladimir Barinov , Miquel Raynal , Philippe Reynes , Jacopo Mondi , Akinobu Mita , Alexandru Lazar , Oskar Andero , =?utf-8?q?M=C3=A5rten_Lindahl?= , Bogdan Pricop , Angelo Compagnucci , Matt Ranostay , Dan Murphy , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , Robert Jones , Chris Coffey , Slawomir Stepien , Sankar Velliangiri , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 10/10] dt-bindings: iio: temperature: use spi-peripheral-props.yaml Date: Wed, 27 Jul 2022 18:46:46 +0200 Message-Id: <20220727164646.387541-11-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> References: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski --- .../bindings/iio/temperature/maxim,max31855k.yaml | 4 ++-- .../devicetree/bindings/iio/temperature/maxim,max31856.yaml | 6 ++++-- .../devicetree/bindings/iio/temperature/maxim,max31865.yaml | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml b/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml index 9969bac66aa1..0805ed7e2113 100644 --- a/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml @@ -32,7 +32,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true spi-cpha: true required: @@ -40,6 +39,7 @@ required: - reg allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: properties: compatible: @@ -53,7 +53,7 @@ allOf: properties: spi-cpha: false -additionalProperties: false +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml b/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml index 873b34766676..228a94165487 100644 --- a/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml @@ -19,7 +19,6 @@ properties: reg: maxItems: 1 - spi-max-frequency: true spi-cpha: true thermocouple-type: @@ -34,7 +33,10 @@ required: - reg - spi-cpha -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/iio/temperature/maxim,max31865.yaml b/Documentation/devicetree/bindings/iio/temperature/maxim,max31865.yaml index aafb33b16549..a2823ed6867b 100644 --- a/Documentation/devicetree/bindings/iio/temperature/maxim,max31865.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/maxim,max31865.yaml @@ -25,7 +25,6 @@ properties: enables 3-wire RTD connection. Else 2-wire or 4-wire RTD connection. type: boolean - spi-max-frequency: true spi-cpha: true required: @@ -33,7 +32,10 @@ required: - reg - spi-cpha -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false examples: - |