From patchwork Tue Aug 16 12:43:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12944862 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 85CDEC25B0E for ; Tue, 16 Aug 2022 12:45:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234762AbiHPMpL (ORCPT ); Tue, 16 Aug 2022 08:45:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235502AbiHPMol (ORCPT ); Tue, 16 Aug 2022 08:44:41 -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 967BC31214 for ; Tue, 16 Aug 2022 05:44:00 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id d14so14726387lfl.13 for ; Tue, 16 Aug 2022 05:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=CXWLPPyHffdUKuA6Nm8ApG3LHh3g7wZtkqYdznNRN8w=; b=AACz0m1AQALNunroOyLPkD+7qM2UR2daldpDp2VErgcmy7kc0LM2QrgVdUc1hqkIfJ r2J01qTMkw4MZbzewnJN5xM7Q3kmGIWU9eNWzz/OR9OQYRTYX+sQMckF3qyIWBTbejTE Hbp96ucsxSLX3WLtuF9WLrrRj6sJVMzp4AFS1AgMTaaf4ZoQaKIqo0rFAvaMwzBs7WqG MRCBxqDqn5lQnGk2rDC1cMjLyHl1CCTRT+akfuSkXjorW4DgagoayvqjdsYWOU80/Toj o9kSmy2zptlTUUWDhLtiZwEeWhAY8uf3gg2VTSvnhi+Ww1RtX9oMSjLdcfuRhqeSwtZS lh4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=CXWLPPyHffdUKuA6Nm8ApG3LHh3g7wZtkqYdznNRN8w=; b=Wq5V0oTTBvbPVPaqpxuQ5n7Mvtc+bjHOOqgGLzZy1Be8cVRlsOH0o5mzVX+pO1R0K5 gvLLHpPm1VJrYWdMbVsEcs6BW0eh6rjWUl6fGlNOV1ZWwBDwzzadc+0iPouRgGomKMjQ oi5H+A7obTQyOT2fYcnp9DpNk1x5jyYBDxzmYTtMc+7mWvLDqOx8MZDE2AWaeN8ROt3C bl08fsncI2Q8OZwmxwTMwLg8x5hRrhAp8B46vKy6fXzuFqEj8tE5rdd+qfMMqFBtHp/D JIXDSX4r8E/SNNxBla+CtB7rujwDtWuStcvfIrPIMmvYpr3hyK7jJBRfb/O4NvTJCMU5 MeaQ== X-Gm-Message-State: ACgBeo2J9zYrWxbk7oqMqv+fF5L9UoiNs1I+p1suEeJNDnDbSQ/brvLo FmWj8k0Wm112dva0CacCLVoFOw== X-Google-Smtp-Source: AA6agR6okIUsd0Dorj2iqDsr4LYXY9JJLftQminZIbQ8fg7f3rePXVY3Jusz4bxIRsstLq4R3qRGoA== X-Received: by 2002:a05:6512:1689:b0:492:8e9f:fe79 with SMTP id bu9-20020a056512168900b004928e9ffe79mr2904579lfb.478.1660653832955; Tue, 16 Aug 2022 05:43:52 -0700 (PDT) Received: from krzk-bin.. (d15l54g8c71znbtrbzt-4.rev.dnainternet.fi. [2001:14bb:ae:539c:1782:dd68:b0c1:c1a4]) by smtp.gmail.com with ESMTPSA id k14-20020ac257ce000000b0048ae4cf8a2csm1374331lfo.258.2022.08.16.05.43.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 05:43:52 -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 , Tomas Melin , Sean Nyekjaer , 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?= , Angelo Compagnucci , Matt Ranostay , Andrew Davis , Gregory Clement , Phil Reid , Michael Welling , Lukas Wunner , 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 v3 07/10] dt-bindings: iio: imu: use spi-peripheral-props.yaml Date: Tue, 16 Aug 2022 15:43:18 +0300 Message-Id: <20220816124321.67817-8-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220816124321.67817-1-krzysztof.kozlowski@linaro.org> References: <20220816124321.67817-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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 0203b83b8587..24416b59b782 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