diff mbox series

[1/3] dt-bindings: sound: Add the Renesas X9250 potentiometers

Message ID 20230203111422.142479-2-herve.codina@bootlin.com (mailing list archive)
State New, archived
Headers show
Series Add the Renesas X9250 potentiometers ASoC support | expand

Commit Message

Herve Codina Feb. 3, 2023, 11:14 a.m. UTC
The Renesas X9250 is a quad digitally controlled potentiometers.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 .../bindings/sound/renesas,x9250.yaml         | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/renesas,x9250.yaml

Comments

Rob Herring Feb. 3, 2023, 10:08 p.m. UTC | #1
On Fri, Feb 03, 2023 at 12:14:20PM +0100, Herve Codina wrote:
> The Renesas X9250 is a quad digitally controlled potentiometers.
> 
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> ---
>  .../bindings/sound/renesas,x9250.yaml         | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/renesas,x9250.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/renesas,x9250.yaml b/Documentation/devicetree/bindings/sound/renesas,x9250.yaml
> new file mode 100644
> index 000000000000..ad29ef465a18
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/renesas,x9250.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/renesas,x9250.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas X9250 quad potentiometers
> +
> +maintainers:
> +  - Herve Codina <herve.codina@bootlin.com>
> +
> +description: |
> +  The Renesas X9250 is a quad digitally controlled potentiometers.

...is a chip with quad...

> +
> +  In the audio path, it can be present on amplifiers designs and it can be used
> +  in ALSA as an auxiliary audio device to control these amplifiers.

ALSA? Linux details should not be in bindings.

> +
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml
> +  - $ref: dai-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: renesas,x9250
> +
> +  reg:
> +    description:
> +      SPI device address.
> +    maxItems: 1
> +
> +  spi-max-frequency:
> +    maximum: 2000000
> +
> +patternProperties:
> +  "^renesas,cmd[0-3]-invert$":
> +    description:
> +      The related command is inverted meaning that the minimum command value
> +      set the wiper to Rh and the maximum command value set the wiper to Rl.
> +      Without this property, the minimum command value set the wiper to Rl and
> +      the maximum to Rh.
> +    type: boolean
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        x9250@0 {
> +            compatible = "renesas,x9250";
> +            reg = <0>;
> +            spi-max-frequency = <2000000>;
> +            renesas,cmd3-invert;
> +        };
> +    };
> -- 
> 2.39.0
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/renesas,x9250.yaml b/Documentation/devicetree/bindings/sound/renesas,x9250.yaml
new file mode 100644
index 000000000000..ad29ef465a18
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/renesas,x9250.yaml
@@ -0,0 +1,60 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/renesas,x9250.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas X9250 quad potentiometers
+
+maintainers:
+  - Herve Codina <herve.codina@bootlin.com>
+
+description: |
+  The Renesas X9250 is a quad digitally controlled potentiometers.
+
+  In the audio path, it can be present on amplifiers designs and it can be used
+  in ALSA as an auxiliary audio device to control these amplifiers.
+
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: renesas,x9250
+
+  reg:
+    description:
+      SPI device address.
+    maxItems: 1
+
+  spi-max-frequency:
+    maximum: 2000000
+
+patternProperties:
+  "^renesas,cmd[0-3]-invert$":
+    description:
+      The related command is inverted meaning that the minimum command value
+      set the wiper to Rh and the maximum command value set the wiper to Rl.
+      Without this property, the minimum command value set the wiper to Rl and
+      the maximum to Rh.
+    type: boolean
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        x9250@0 {
+            compatible = "renesas,x9250";
+            reg = <0>;
+            spi-max-frequency = <2000000>;
+            renesas,cmd3-invert;
+        };
+    };