Skip to content

Commit

Permalink
ASoC: dt-bindings: Convert dmic-codec to DT schema
Browse files Browse the repository at this point in the history
Convert the dmic-codec binding to DT schema format.

The '#sound-dai-cells' and 'sound-name-prefix' properties were not
documented, but are in use, so add them.

Reviewed-by: Arnaud Pouliquen <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
robherring authored and broonie committed Oct 24, 2022
1 parent b700672 commit 8da313a
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 22 deletions.
55 changes: 55 additions & 0 deletions Documentation/devicetree/bindings/sound/dmic-codec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/dmic-codec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Generic PDM Digital microphone (DMIC) codec

maintainers:
- Arnaud Pouliquen <[email protected]>

allOf:
- $ref: name-prefix.yaml#

properties:
compatible:
const: dmic-codec

'#sound-dai-cells':
const: 0

dmicen-gpios:
description: GPIO specifier for DMIC to control start and stop
maxItems: 1

num-channels:
description: Number of microphones on this DAI
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 8
default: 8

modeswitch-delay-ms:
description: Delay (in ms) to complete DMIC mode switch

wakeup-delay-ms:
description: Delay (in ms) after enabling the DMIC

required:
- compatible

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
dmic {
compatible = "dmic-codec";
dmicen-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
num-channels = <1>;
wakeup-delay-ms = <50>;
modeswitch-delay-ms = <35>;
};
...
22 changes: 0 additions & 22 deletions Documentation/devicetree/bindings/sound/dmic.txt

This file was deleted.

0 comments on commit 8da313a

Please sign in to comment.