[PATCH 1/2] ASoC: codecs: ak4619: Add optional PDN pin support

From: Alexander Koch

Date: Mon Sep 28 2026 - 07:55:15 EST


Add optional device tree binding that enables operation of the 'PDN' pin
during initialization:

codec@10 {
compatible = "asahi-kasei,ak4619";
reg = <0x10>;
pdn-gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; // <--
#sound-dai-cells = <0>;
};

If defined, PDN is set high during driver probe, followed by a 10 ms
delay as required before first register access [1].

If no 'pdn-gpios' property is defined, the behaviour is unchanged.

[1] AK4619 datasheet, sec. 2 'Power-up/down Sequence', page 39

Signed-off-by: Alexander Koch <mail@xxxxxxxxxxxxxxxxx>
---
sound/soc/codecs/ak4619.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/sound/soc/codecs/ak4619.c b/sound/soc/codecs/ak4619.c
index d9c9f6b20028..f3357c1ee907 100644
--- a/sound/soc/codecs/ak4619.c
+++ b/sound/soc/codecs/ak4619.c
@@ -152,6 +152,7 @@
struct ak4619_priv {
struct regmap *regmap;
struct snd_pcm_hw_constraint_list constraint;
+ struct gpio_desc *pdn_gpio;
int deemph_en;
unsigned int playback_rate;
unsigned int sysclk;
@@ -875,6 +876,12 @@ static int ak4619_i2c_probe(struct i2c_client *i2c)

i2c_set_clientdata(i2c, ak4619);

+ ak4619->pdn_gpio = devm_gpiod_get_optional(dev, "pdn", GPIOD_OUT_HIGH);
+ if (IS_ERR(ak4619->pdn_gpio))
+ return PTR_ERR(ak4619->pdn_gpio);
+ if (ak4619->pdn_gpio)
+ msleep(10);
+
ak4619->regmap = devm_regmap_init_i2c(i2c, &ak4619_regmap_cfg);
if (IS_ERR(ak4619->regmap)) {
ret = PTR_ERR(ak4619->regmap);
--
2.55.0