summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-01-14 23:11:17 +0300
committerMark Brown <broonie@kernel.org>2026-01-14 23:11:17 +0300
commit6e22f08989f9bebd9c0c5e982165164e75091e7f (patch)
tree6cc216619fc2382ba5d1362a7a77103c27e8f0dc
parent10303b32519f52a5afd40593a507543143c8ec6a (diff)
parent519d0a6b2ca5a891340b6c24a4c40545f518e1a8 (diff)
downloadlinux-6e22f08989f9bebd9c0c5e982165164e75091e7f.tar.xz
ASoC: codecs: aw88261: add dvdd-supply property
Merge series from Bharadwaj Raju <bharadwaj.raju@machinesoul.in>: The AW88261 has a DVDD chip which needs to be powered on for it to function correctly. The property for this was missing, so this patchset adds the dvdd-supply property which enables a regulator to be bound to it in a device tree.
-rw-r--r--Documentation/devicetree/bindings/sound/awinic,aw88395.yaml13
-rw-r--r--sound/soc/codecs/aw88261.c5
2 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml b/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml
index bb92d6ca3144..994d68c074a9 100644
--- a/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml
+++ b/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml
@@ -33,6 +33,8 @@ properties:
reset-gpios:
maxItems: 1
+ dvdd-supply: true
+
awinic,audio-channel:
description:
It is used to distinguish multiple PA devices, so that different
@@ -65,6 +67,17 @@ allOf:
then:
properties:
reset-gpios: false
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: awinic,aw88261
+ then:
+ required:
+ - dvdd-supply
+ else:
+ properties:
+ dvdd-supply: false
unevaluatedProperties: false
diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c
index 810c90f5e783..29b3fc8a1ea4 100644
--- a/sound/soc/codecs/aw88261.c
+++ b/sound/soc/codecs/aw88261.c
@@ -11,6 +11,7 @@
#include <linux/i2c.h>
#include <linux/firmware.h>
#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
#include <sound/soc.h>
#include "aw88261.h"
#include "aw88395/aw88395_data_type.h"
@@ -1190,6 +1191,10 @@ static int aw88261_init(struct aw88261 *aw88261, struct i2c_client *i2c, struct
unsigned int chip_id;
int ret;
+ ret = devm_regulator_get_enable(&i2c->dev, "dvdd");
+ if (ret)
+ return dev_err_probe(&i2c->dev, ret, "Failed to enable dvdd supply\n");
+
/* read chip id */
ret = regmap_read(regmap, AW88261_ID_REG, &chip_id);
if (ret) {