.../devicetree/bindings/sound/qcom,wcd937x.yaml | 6 ++++++ sound/soc/codecs/wcd937x.c | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-)
Add has_always_on_supplies for managing regulators. Indicates 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 | 6 ++++++
sound/soc/codecs/wcd937x.c | 13 +++++++++----
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml
index f94203798f24..d89fff1f7171 100644
--- a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml
@@ -28,6 +28,12 @@ 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 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
On Thu, Apr 02, 2026 at 12:38:54PM +0530, karthik.s wrote: > Add has_always_on_supplies for managing regulators. Indicates that > the codec supply regulators are always enabled by the system and > must not be requested or enabled by the codec driver. > + qcom,always-on-supply: > + type: boolean > + description: Indicates that the codec supply regulators are always enabled > + by the system and must not be requested or enabled by the codec > + driver. > + Why would we want that? The regulator core already has perfectly good support for always on supplies.
On 02/04/2026 09:08, karthik.s wrote: > Add has_always_on_supplies for managing regulators. Indicates 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> Please configure your Git. > --- > .../devicetree/bindings/sound/qcom,wcd937x.yaml | 6 ++++++ > sound/soc/codecs/wcd937x.c | 13 +++++++++---- Please run scripts/checkpatch.pl on the patches and fix reported warnings. After that, run also 'scripts/checkpatch.pl --strict' on the patches and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear. > 2 files changed, 15 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml > index f94203798f24..d89fff1f7171 100644 > --- a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml > +++ b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml > @@ -28,6 +28,12 @@ properties: > vdd-px-supply: > description: A reference to the 1.8V I/O supply > > + qcom,always-on-supply: You described the desired Linux feature or behavior, not the actual hardware. The bindings are about the latter, so instead you need to rephrase the property and its description to match actual hardware capabilities/features/configuration etc. Best regards, Krzysztof
Hi @Krzysztof, On 4/2/2026 12:43 PM, Krzysztof Kozlowski wrote: > On 02/04/2026 09:08, karthik.s wrote: >> Add has_always_on_supplies for managing regulators. Indicates 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> > Please configure your Git. > I have configured Git as you suggested : user.name = Karthik S user.email = karthik.s@oss.qualcomm.com >> --- >> .../devicetree/bindings/sound/qcom,wcd937x.yaml | 6 ++++++ >> sound/soc/codecs/wcd937x.c | 13 +++++++++---- > Please run scripts/checkpatch.pl on the patches and fix reported > warnings. After that, run also 'scripts/checkpatch.pl --strict' on the > patches and (probably) fix more warnings. Some warnings can be ignored, > especially from --strict run, but the code here looks like it needs a > fix. Feel free to get in touch if the warning is not clear. > I have run the scripts/checkpatch.pl and fixed all warnings/errors indicated. >> 2 files changed, 15 insertions(+), 4 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml >> index f94203798f24..d89fff1f7171 100644 >> --- a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml >> +++ b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml >> @@ -28,6 +28,12 @@ properties: >> vdd-px-supply: >> description: A reference to the 1.8V I/O supply >> >> + qcom,always-on-supply: > You described the desired Linux feature or behavior, not the actual > hardware. The bindings are about the latter, so instead you need to > rephrase the property and its description to match actual hardware > capabilities/features/configuration etc. Current description in dt-binding: Indicates that the codec supply regulators are always enabled by the system and must not be requested or enabled by the codec driver. new description in dt-binding: implies that the codec supply Vdd is on always on rails off the board/hardware and must not be requested or enabled by the codec driver. please let us know if you are okay with above changes Thanks and Regards, Karthik S
On 10/04/2026 07:38, Karthik S wrote: >>> >>> diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml >>> index f94203798f24..d89fff1f7171 100644 >>> --- a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml >>> +++ b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml >>> @@ -28,6 +28,12 @@ properties: >>> vdd-px-supply: >>> description: A reference to the 1.8V I/O supply >>> >>> + qcom,always-on-supply: >> You described the desired Linux feature or behavior, not the actual >> hardware. The bindings are about the latter, so instead you need to >> rephrase the property and its description to match actual hardware >> capabilities/features/configuration etc. > > Current description in dt-binding: > Indicates that the codec supply regulators are always enabled by the > system and must not be requested or enabled by the codec driver. > > new description in dt-binding: > implies that the codec supply Vdd is on always on rails off the > board/hardware and must not be requested or enabled by the codec driver. Still driver stuff. But another point is that kernel handles well always on rails, so this property is completely redundant. Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.