From: "karthik.s" <karthik.s@oss.qualcomm.com>
To: Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
"karthik.s" <karthik.s@oss.qualcomm.com>
Subject: [PATCH v2] ASoC: codecs: wcd937x: Add conditional regulator control for wcd937x
Date: Thu, 2 Apr 2026 12:52:56 +0530 [thread overview]
Message-ID: <20260402072256.2811085-1-karthik.s@oss.qualcomm.com> (raw)
Add has_always_on_supplies for managing regulators. Indicates that the
codec power supplies are provided by the board as always-on rails and
are not switchable by the codec or its associated regulators. This implies
that the codec supply regulators are always enabled by the system and
must not be requested or enabled by the codec driver.
Signed-off-by: karthik.s <karthik.s@oss.qualcomm.com>
---
.../devicetree/bindings/sound/qcom,wcd937x.yaml | 8 ++++++++
sound/soc/codecs/wcd937x.c | 13 +++++++++----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml
index f94203798f24..38b3452788e9 100644
--- a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml
@@ -28,6 +28,14 @@ properties:
vdd-px-supply:
description: A reference to the 1.8V I/O supply
+ qcom,always-on-supply:
+ type: boolean
+ description: Indicates that the codec power supplies are provided by the board
+ as always-on rails and are not switchable by the codec or its
+ associated regulators. This implies that the codec supply regulators
+ are always enabled by the system and must not be requested or enabled
+ by the codec driver.
+
required:
- compatible
- vdd-px-supply
diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c
index 10a2d598caa7..1514ceb7d790 100644
--- a/sound/soc/codecs/wcd937x.c
+++ b/sound/soc/codecs/wcd937x.c
@@ -100,6 +100,7 @@ struct wcd937x_priv {
int aux_pdm_wd_int;
bool comp1_enable;
bool comp2_enable;
+ bool has_always_on_supplies;
struct gpio_desc *us_euro_gpio;
struct gpio_desc *reset_gpio;
@@ -2907,10 +2908,14 @@ static int wcd937x_probe(struct platform_device *pdev)
cfg = &wcd937x->mbhc_cfg;
cfg->swap_gnd_mic = wcd937x_swap_gnd_mic;
- ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(wcd937x_supplies),
- wcd937x_supplies);
- if (ret)
- return dev_err_probe(dev, ret, "Failed to get and enable supplies\n");
+ wcd937x->has_always_on_supplies = of_property_read_bool(dev->of_node,
+ "qcom,always-on-supply");
+ if (!wcd937x->has_always_on_supplies) {
+ ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(wcd937x_supplies),
+ wcd937x_supplies);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to get and enable supplies\n");
+ }
ret = wcd_dt_parse_micbias_info(&wcd937x->common);
if (ret)
--
2.34.1
next reply other threads:[~2026-04-02 7:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 7:22 karthik.s [this message]
2026-04-02 7:30 ` [PATCH v2] ASoC: codecs: wcd937x: Add conditional regulator control for wcd937x Krzysztof Kozlowski
[not found] ` <CAPg2bp0DeOcQB-=VJDC5SSiFLLFL6PBPJUBHXSOP9EJZA3+bqw@mail.gmail.com>
2026-04-02 7:50 ` Krzysztof Kozlowski
2026-04-06 9:52 ` Karthik S
2026-04-02 8:29 ` Rob Herring (Arm)
2026-04-06 9:58 ` Karthik S
2026-04-02 11:23 ` Mark Brown
2026-04-10 5:40 ` Karthik S
2026-04-10 10:25 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2026-04-08 2:53 kernel test robot
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=20260402072256.2811085-1-karthik.s@oss.qualcomm.com \
--to=karthik.s@oss.qualcomm.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.