* [PATCH] ASoC: dt-bindings: ssm2602: convert to dt schema
@ 2024-05-11 21:47 Xiaxi Shen
2024-05-11 23:26 ` Rob Herring (Arm)
0 siblings, 1 reply; 2+ messages in thread
From: Xiaxi Shen @ 2024-05-11 21:47 UTC (permalink / raw)
To: devicetree, linux-kernel, linux-sound
Cc: shenxiaxi26, lgirdwood, broonie, robh, krzk+dt, conor+dt,
javier.carrasco.cruz, skhan
Convert adi,ssm2602 binding to DT schema
The original adi,ssm2602.txt contains bindings for 3 devices
SSM2602, SSM2603 and SSM2604. Since they share something
in common. So I created one single yaml and name it 260x instead.
Let me know if you think it should be done in another way.
It passed dt_binding_check and dtbs_check.
Signed-off-by: Xiaxi Shen <shenxiaxi26@gmail.com>
---
.../devicetree/bindings/sound/adi,ssm2602.txt | 19 -------
.../bindings/sound/adi,ssm260x.yaml | 50 +++++++++++++++++++
2 files changed, 50 insertions(+), 19 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/adi,ssm2602.txt
create mode 100644 Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
diff --git a/Documentation/devicetree/bindings/sound/adi,ssm2602.txt b/Documentation/devicetree/bindings/sound/adi,ssm2602.txt
deleted file mode 100644
index 3b3302fe399b..000000000000
--- a/Documentation/devicetree/bindings/sound/adi,ssm2602.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Analog Devices SSM2602, SSM2603 and SSM2604 I2S audio CODEC devices
-
-SSM2602 support both I2C and SPI as the configuration interface,
-the selection is made by the MODE strap-in pin.
-SSM2603 and SSM2604 only support I2C as the configuration interface.
-
-Required properties:
-
- - compatible : One of "adi,ssm2602", "adi,ssm2603" or "adi,ssm2604"
-
- - reg : the I2C address of the device for I2C, the chip select
- number for SPI.
-
- Example:
-
- ssm2602: ssm2602@1a {
- compatible = "adi,ssm2602";
- reg = <0x1a>;
- };
diff --git a/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml b/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
new file mode 100644
index 000000000000..f465f9168a0a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/adi,ssm2602.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices SSM2602, SSM2603 and SSM2604 I2S audio CODEC devices
+
+description:
+ SSM2602 support both I2C and SPI as the configuration interface,
+
+ the selection is made by the MODE strap-in pin.
+
+ SSM2603 and SSM2604 only support I2C as the configuration interface.
+
+maintainers:
+ - Liam Girdwood <lgirdwood@gmail.com>
+ - Mark Brown <broonie@kernel.org>
+ - Rob Herring <robh@kernel.org>
+ - Krzysztof Kozlowski <krzk+dt@kernel.org>
+ - Conor Dooley <conor+dt@kernel.org>
+
+properties:
+ compatible:
+ description: One of "adi,ssm2602", "adi,ssm2603" or "adi,ssm2604"
+ enum:
+ - adi,ssm2602
+ - adi,ssm2603
+ - adi,ssm2604
+
+ reg:
+ description: the I2C address of the device for I2C, the chip select number for SPI.
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ssm2602@1a {
+ compatible = "adi,ssm2602";
+ reg = <0x1a>;
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: ssm2602: convert to dt schema
2024-05-11 21:47 [PATCH] ASoC: dt-bindings: ssm2602: convert to dt schema Xiaxi Shen
@ 2024-05-11 23:26 ` Rob Herring (Arm)
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring (Arm) @ 2024-05-11 23:26 UTC (permalink / raw)
To: Xiaxi Shen
Cc: skhan, lgirdwood, devicetree, linux-sound, broonie,
javier.carrasco.cruz, linux-kernel, krzk+dt, conor+dt
On Sat, 11 May 2024 14:47:39 -0700, Xiaxi Shen wrote:
> Convert adi,ssm2602 binding to DT schema
>
> The original adi,ssm2602.txt contains bindings for 3 devices
> SSM2602, SSM2603 and SSM2604. Since they share something
> in common. So I created one single yaml and name it 260x instead.
> Let me know if you think it should be done in another way.
>
> It passed dt_binding_check and dtbs_check.
>
> Signed-off-by: Xiaxi Shen <shenxiaxi26@gmail.com>
> ---
> .../devicetree/bindings/sound/adi,ssm2602.txt | 19 -------
> .../bindings/sound/adi,ssm260x.yaml | 50 +++++++++++++++++++
> 2 files changed, 50 insertions(+), 19 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/adi,ssm2602.txt
> create mode 100644 Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
$id: http://devicetree.org/schemas/sound/adi,ssm2602.yaml
file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240511214739.242950-1-shenxiaxi26@gmail.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-11 23:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-11 21:47 [PATCH] ASoC: dt-bindings: ssm2602: convert to dt schema Xiaxi Shen
2024-05-11 23:26 ` Rob Herring (Arm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox