diff mbox series

[v2,2/6] ASoC: dt-bindings: midas-audio: Add separate compatible for tab3 audio

Message ID 20240725-midas-audio-tab3-v2-2-dbc055c27879@gmail.com (mailing list archive)
State New
Headers show
Series ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes | expand

Commit Message

Artur Weber July 25, 2024, 10:40 a.m. UTC
Unlike the Midas, the Galaxy Tab 3 8.0 does not have a main/sub mic
bias regulator, but it does have a separate headset mic bias regulator.

Add a new compatible for the Tab 3's audio and declare required
regulators separately based on the provided compatible.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
 .../bindings/sound/samsung,midas-audio.yaml        | 30 +++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
index 5483421a6fd3..cb6105a6b216 100644
--- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
+++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
@@ -11,7 +11,11 @@  maintainers:
 
 properties:
   compatible:
-    const: samsung,midas-audio
+    oneOf:
+      - const: samsung,midas-audio
+      - items:
+          - const: samsung,tab3-audio
+          - const: samsung,midas-audio
 
   cpu:
     type: object
@@ -96,8 +100,6 @@  required:
   - cpu
   - codec
   - audio-routing
-  - mic-bias-supply
-  - submic-bias-supply
 
 allOf:
   - $ref: sound-card-common.yaml#
@@ -125,6 +127,28 @@  allOf:
       required:
         - samsung,headset-button-threshold-microvolt
 
+  - if:
+      properties:
+        compatible:
+          const: samsung,midas-audio
+
+    then:
+      required:
+        - mic-bias-supply
+        - submic-bias-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,tab3-audio
+
+    then:
+      required:
+        - headset-mic-bias-supply
+        - headset-detect-gpios
+        - headset-key-gpios
+
 unevaluatedProperties: false
 
 examples: