[PATCH v5 1/2] dt-bindings: sound: Add generic serial MIDI device
Rob Herring
robh at kernel.org
Tue May 3 20:33:41 CEST 2022
On Mon, May 02, 2022 at 10:04:03AM -0500, Daniel Kaehn wrote:
> Adds dt-binding for a Generic MIDI Interface using a serial device.
>
> Signed-off-by: Daniel Kaehn <kaehndan at gmail.com>
> ---
> .../devicetree/bindings/sound/serialmidi.yaml | 46 +++++++++++++++++++
> 1 file changed, 46 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/serialmidi.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/serialmidi.yaml b/Documentation/devicetree/bindings/sound/serialmidi.yaml
> new file mode 100644
> index 000000000000..06a894e1b91d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/serialmidi.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/serialmidi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic Serial MIDI Interface
> +
> +maintainers:
> + - Daniel Kaehn <kaehndan at gmail.com>
> +
> +description:
> + Generic MIDI interface using a serial device. This denotes that a serial device is
> + dedicated to MIDI communication, either to an external MIDI device through a DIN5
> + or other connector, or to a known hardwired MIDI controller. This device must be a
> + child node of a serial node.
> +
> + Can only be set to use standard baud rates corresponding to supported rates of the
> + parent serial device. If the standard MIDI baud of 31.25 kBaud is needed
> + (as would be the case if interfacing with arbitrary external MIDI devices),
> + configure the clocks of the parent serial device so that a requested baud of 38.4 kBaud
> + resuts in the standard MIDI baud rate, and set the 'current-speed' property to 38400.
s/resuts/results/
> +
> +properties:
> + compatible:
> + const: serialmidi
serial-midi would be a bit more readable. (And then align the filename
with that.)
> +
> + current-speed:
> + $ref: /schemas/types.yaml#/definitions/uint32
Already has a type applied by serial.yaml, so you can drop.
> + description: Baudrate to set the serial port to when this MIDI device is opened.
> + If not specified, the parent serial device is allowed to use its default baud.
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + serial {
> + midi {
> + compatible = "serialmidi";
> + current-speed = <38400>;
> + };
> + };
> --
> 2.33.0
>
>
More information about the Alsa-devel
mailing list