linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artur Weber <aweber.kernel@gmail.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-sound@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	 Artur Weber <aweber.kernel@gmail.com>
Subject: [PATCH 2/6] ASoC: dt-bindings: midas-audio: Add separate compatible for tab3 audio
Date: Tue, 16 Jul 2024 21:36:06 +0200	[thread overview]
Message-ID: <20240716-midas-audio-tab3-v1-2-a53ea075af5a@gmail.com> (raw)
In-Reply-To: <20240716-midas-audio-tab3-v1-0-a53ea075af5a@gmail.com>

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.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
 .../bindings/sound/samsung,midas-audio.yaml        | 30 +++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
index e7af3c09de38..fd9eb054a278 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:

-- 
2.45.2



  parent reply	other threads:[~2024-07-16 19:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16 19:36 [PATCH 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Artur Weber
2024-07-16 19:36 ` [PATCH 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det Artur Weber
2024-07-22  7:45   ` Krzysztof Kozlowski
2024-07-16 19:36 ` Artur Weber [this message]
2024-07-22  7:53   ` [PATCH 2/6] ASoC: dt-bindings: midas-audio: Add separate compatible for tab3 audio Krzysztof Kozlowski
2024-07-16 19:36 ` [PATCH 3/6] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection Artur Weber
2024-07-16 19:36 ` [PATCH 4/6] ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config Artur Weber
2024-07-16 19:36 ` [PATCH 5/6] ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec Artur Weber
2024-07-16 19:36 ` [PATCH 6/6] ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators Artur Weber
2024-07-22  7:56   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240716-midas-audio-tab3-v1-2-a53ea075af5a@gmail.com \
    --to=aweber.kernel@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).