* [PATCH] ASoC: dt-bindings: sound: asahi-kasei,ak5386: Convert DT schema
@ 2026-05-24 16:01 Manish Baing
2026-05-24 16:17 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Manish Baing @ 2026-05-24 16:01 UTC (permalink / raw)
To: lgirdwood, broonie, robh, krzk+dt, conor+dt, zonque
Cc: linux-sound, devicetree, linux-kernel, manishbaing2789
Convert the Asahi Kasei AK5386 ADC binding from text format
to YAML schema.
Signed-off-by: Manish Baing <manishbaing2789@gmail.com>
---
.../devicetree/bindings/sound/ak5386.txt | 23 ----------
.../bindings/sound/asahi-kasei,ak5386.yaml | 44 +++++++++++++++++++
2 files changed, 44 insertions(+), 23 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/ak5386.txt
create mode 100644 Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml
diff --git a/Documentation/devicetree/bindings/sound/ak5386.txt b/Documentation/devicetree/bindings/sound/ak5386.txt
deleted file mode 100644
index ec3df3abba0c..000000000000
--- a/Documentation/devicetree/bindings/sound/ak5386.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-AK5386 Single-ended 24-Bit 192kHz delta-sigma ADC
-
-This device has no control interface.
-
-Required properties:
-
- - compatible : "asahi-kasei,ak5386"
-
-Optional properties:
-
- - reset-gpio : a GPIO spec for the reset/power down pin.
- If specified, it will be deasserted at probe time.
- - va-supply : a regulator spec, providing 5.0V
- - vd-supply : a regulator spec, providing 3.3V
-
-Example:
-
-spdif: ak5386@0 {
- compatible = "asahi-kasei,ak5386";
- reset-gpio = <&gpio0 23>;
- va-supply = <&vdd_5v0_reg>;
- vd-supply = <&vdd_3v3_reg>;
-};
diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml
new file mode 100644
index 000000000000..df896f3a5e08
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/asahi-kasei,ak5386.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Asahi Kasei AK5386 ADC
+
+maintainers:
+ - Daniel Mack <zonque@gmail.com>
+
+description:
+ The Asahi Kasei AK5386 is a single-ended 24-Bit 192kHz delta-sigma
+ analog-to-digital converter (ADC).This device has no control interface.
+
+properties:
+ compatible:
+ const: asahi-kasei,ak5386
+
+ reset-gpios:
+ maxItems: 1
+ description: A GPIO spec for the reset/power down pin.
+
+ va-supply:
+ description: Power supply for the analog section.
+
+ vd-supply:
+ description: Power supply for the digital section.
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ adc {
+ compatible = "asahi-kasei,ak5386";
+ reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+ va-supply = <&vdd_5v0_reg>;
+ vd-supply = <&vdd_3v3_reg>;
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: dt-bindings: sound: asahi-kasei,ak5386: Convert DT schema
2026-05-24 16:01 [PATCH] ASoC: dt-bindings: sound: asahi-kasei,ak5386: Convert DT schema Manish Baing
@ 2026-05-24 16:17 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-05-24 16:17 UTC (permalink / raw)
To: Manish Baing; +Cc: conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The schema uses `additionalProperties: false` but omits a reference to `dai-common.yaml#` and the `#sound-dai-cells` property, which will cause validation failures for valid audio configurations.
- [Medium] The new schema breaks backward compatibility by rejecting the legacy `reset-gpio` property that was documented in the original text binding.
--
commit 53f12bd4c4466e68926d73a25cd532a103036343
Author: Manish Baing <manishbaing2789@gmail.com>
ASoC: dt-bindings: sound: asahi-kasei,ak5386: Convert DT schema
This commit converts the Asahi Kasei AK5386 ADC binding from the legacy
text format to the YAML schema format.
> diff --git a/Documentation/devicetree/bindings/sound/ak5386.txt b/Documentation/devicetree/bindings/sound/ak5386.txt
> deleted file mode 100644
> --- a/Documentation/devicetree/bindings/sound/ak5386.txt
> +++ /dev/null
[ ... ]
> -Optional properties:
> -
> - - reset-gpio : a GPIO spec for the reset/power down pin.
> - If specified, it will be deasserted at probe time.
[ ... ]
> diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml
[ ... ]
> +properties:
> + compatible:
> + const: asahi-kasei,ak5386
> +
> + reset-gpios:
> + maxItems: 1
> + description: A GPIO spec for the reset/power down pin.
[Severity: Medium]
Does this break backward compatibility with existing device trees?
The original text binding explicitly documented the reset pin as
reset-gpio (singular), and existing device trees may be using that
property.
Since the driver uses devm_gpiod_get_optional() which handles the legacy
-gpio suffix automatically, the driver still works, but the new schema
will reject it due to additionalProperties: false.
Should the legacy reset-gpio property be defined here, perhaps marked as
deprecated, to maintain DT ABI backwards compatibility?
> +
> + va-supply:
> + description: Power supply for the analog section.
> +
> + vd-supply:
> + description: Power supply for the digital section.
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
[Severity: Medium]
Will this reject valid audio configurations?
The AK5386 functions as an audio codec and Digital Audio Interface (DAI)
provider. Standard ASoC generic sound cards require the codec node to have
the #sound-dai-cells property to resolve the codec phandle.
Because the schema enforces additionalProperties: false without defining
#sound-dai-cells or referencing dai-common.yaml#, it seems dtbs_check
will fail on valid device trees.
Should this include a reference to dai-common.yaml# and use
unevaluatedProperties: false instead?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260524160158.109983-1-manishbaing2789@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-24 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-24 16:01 [PATCH] ASoC: dt-bindings: sound: asahi-kasei,ak5386: Convert DT schema Manish Baing
2026-05-24 16:17 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox