Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: dt-bindings: maxim,max98357a: Convert to DT schema

Convert the Maxim Integrated MAX98357A/MAX98360A amplifier bindings to
DT schema. Add missing properties ('#sound-dai-cells' and
'sound-name-prefix' from common DAI properties).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221203160442.69594-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
8a5a0558 58ae9a2a

+52 -28
-28
Documentation/devicetree/bindings/sound/max98357a.txt
··· 1 - Maxim MAX98357A/MAX98360A audio DAC 2 - 3 - This node models the Maxim MAX98357A/MAX98360A DAC. 4 - 5 - Required properties: 6 - - compatible : "maxim,max98357a" for MAX98357A. 7 - "maxim,max98360a" for MAX98360A. 8 - 9 - Optional properties: 10 - - sdmode-gpios : GPIO specifier for the chip's SD_MODE pin. 11 - If this option is not specified then driver does not manage 12 - the pin state (e.g. chip is always on). 13 - - sdmode-delay : specify delay time for SD_MODE pin. 14 - If this option is specified, which means it's required i2s clocks 15 - ready before SD_MODE is unmuted in order to avoid the speaker pop noise. 16 - It's observed that 5ms is sufficient. 17 - 18 - Example: 19 - 20 - max98357a { 21 - compatible = "maxim,max98357a"; 22 - sdmode-gpios = <&qcom_pinmux 25 0>; 23 - }; 24 - 25 - max98360a { 26 - compatible = "maxim,max98360a"; 27 - sdmode-gpios = <&qcom_pinmux 25 0>; 28 - };
+52
Documentation/devicetree/bindings/sound/maxim,max98357a.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/sound/maxim,max98357a.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim Integrated MAX98357A/MAX98360A amplifier 8 + 9 + maintainers: 10 + - Tzung-Bi Shih <tzungbi@kernel.org> 11 + 12 + description: 13 + Maxim Integrated MAX98357A/MAX98360A is a digital pulse-code modulation (PCM) 14 + input Class D amplifier. 15 + 16 + allOf: 17 + - $ref: dai-common.yaml# 18 + 19 + properties: 20 + compatible: 21 + enum: 22 + - maxim,max98357a 23 + - maxim,max98360a 24 + 25 + '#sound-dai-cells': 26 + const: 0 27 + 28 + sdmode-gpios: 29 + maxItems: 1 30 + description: 31 + Chip's SD_MODE pin. If missing the chip is always on. 32 + 33 + sdmode-delay: 34 + $ref: /schemas/types.yaml#/definitions/uint32 35 + description: 36 + Delay time for SD_MODE pin changes intended to make I2S clocks ready 37 + before SD_MODE is unmuted in order to avoid the speaker pop noise. 38 + 39 + required: 40 + - compatible 41 + 42 + unevaluatedProperties: false 43 + 44 + examples: 45 + - | 46 + #include <dt-bindings/gpio/gpio.h> 47 + 48 + amplifier { 49 + compatible = "maxim,max98360a"; 50 + #sound-dai-cells = <0>; 51 + sdmode-gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>; 52 + };