ASoC: dt-bindings: Convert Simple Amplifier binding to a schema
Simple audio amplifiers are supported by Linux with a matching device tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema. Cc: alsa-devel@alsa-project.org Cc: Jerome Brunet <jbrunet@baylibre.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20210901091852.479202-5-maxime@cerno.tech Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1c02b74ba2
commit
50a41ce8c5
|
@ -1,17 +0,0 @@
|
|||
Simple Amplifier Audio Driver
|
||||
|
||||
Required properties:
|
||||
- compatible : "dioo,dio2125" or "simple-audio-amplifier"
|
||||
|
||||
Optional properties:
|
||||
- enable-gpios : the gpio connected to the enable pin of the simple amplifier
|
||||
- VCC-supply : power supply for the device, as covered
|
||||
in Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
|
||||
Example:
|
||||
|
||||
amp: analog-amplifier {
|
||||
compatible = "simple-audio-amplifier";
|
||||
VCC-supply = <®ulator>;
|
||||
enable-gpios = <&gpio GPIOH_3 0>;
|
||||
};
|
|
@ -0,0 +1,45 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/simple-audio-amplifier.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Simple Audio Amplifier Device Tree Bindings
|
||||
|
||||
maintainers:
|
||||
- Jerome Brunet <jbrunet@baylibre.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- dioo,dio2125
|
||||
- simple-audio-amplifier
|
||||
|
||||
enable-gpios:
|
||||
maxItems: 1
|
||||
|
||||
VCC-supply:
|
||||
description: >
|
||||
power supply for the device
|
||||
|
||||
sound-name-prefix:
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
description: >
|
||||
See ./name-prefix.txt
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/meson8-gpio.h>
|
||||
|
||||
analog-amplifier {
|
||||
compatible = "simple-audio-amplifier";
|
||||
VCC-supply = <®ulator>;
|
||||
enable-gpios = <&gpio GPIOH_3 0>;
|
||||
};
|
||||
|
||||
...
|
Loading…
Reference in New Issue