Skip to contentSkip to conversation

ASoC: tlv320aic31xx: place codec into reset state initially

PATCH In review Peter S. Housel 3 participants 4 messages Aug 4, 2014 – Sep 2, 2014 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: tlv320aic31xx: place codec into reset state initially

Previously the driver would only place the TLV320AIC31XX into reset using the gpio reset line when at least one of the power supply regulators was disabled, so that if these supplies were always enabled no reset would ever occur. This change resets the codec state at probe time so that the initial register cache values are correct.

---
 sound/soc/codecs/tlv320aic31xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tlv320aic31xx.c +1 -1
index 0f64c78..89a4daf 100644
@@ -1194,7 +1194,7 @@ static int aic31xx_device_init(struct aic31xx_priv *aic31xx)
 	if (aic31xx->pdata.gpio_reset) {
 		ret = devm_gpio_request_one(aic31xx->dev,
 					    aic31xx->pdata.gpio_reset,
-					    GPIOF_OUT_INIT_HIGH,
+					    GPIOF_OUT_INIT_LOW,
 					    "aic31xx-reset-pin");
 		if (ret < 0) {
 			dev_err(aic31xx->dev, "not able to acquire gpio\n");
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 17 lines · Peter S. Housel

Previously the driver would only place the TLV320AIC31XX into reset using the gpio reset line when at least one of the power supply regulators was disabled, so that if these supplies were always enabled no reset would ever occur. This change resets the codec state at probe time so that the initial register cache values are correct.

---
  sound/soc/codecs/tlv320aic31xx.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tlv320aic31xx.c +0 -0
index 0f64c78..89a4daf 100644

sound/soc/codecs/tlv320aic31xx.c static int aic31xx_device_init(struct aic31xx_priv *aic31xx) · line 1200

Quoted 8 lines
sound/soc/codecs/tlv320aic31xx.c +1 -1
@@ -1194,7 +1194,7 @@ static int aic31xx_device_init(struct aic31xx_priv *aic31xx)
  	if (aic31xx->pdata.gpio_reset) {
  		ret = devm_gpio_request_one(aic31xx->dev,
  					    aic31xx->pdata.gpio_reset,
-					    GPIOF_OUT_INIT_HIGH,
+					    GPIOF_OUT_INIT_LOW,
  					    "aic31xx-reset-pin");
  		if (ret < 0) {
  			dev_err(aic31xx->dev, "not able to acquire gpio\n");

Oops, aic3111 and friends indeed have an active low reset line. The line was not behind a gpio on my board.

A message that is not in the archive (sent off-list or not yet received): avb91o01X1j0zgo01vbBxr

#3 lore raw

Ping...

Thanks,
-Peter-

Quoted 35 lines · Jyri Sarha
Quoted 24 lines · Peter S. Housel

Previously the driver would only place the TLV320AIC31XX into reset using the gpio reset line when at least one of the power supply regulators was disabled, so that if these supplies were always enabled no reset would ever occur. This change resets the codec state at probe time so that the initial register cache values are correct.

---
  sound/soc/codecs/tlv320aic31xx.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tlv320aic31xx.c +1 -1
index 0f64c78..89a4daf 100644
@@ -1194,7 +1194,7 @@ static int aic31xx_device_init(struct 
 aic31xx_priv *aic31xx)
      if (aic31xx->pdata.gpio_reset) {
          ret = devm_gpio_request_one(aic31xx->dev,
                          aic31xx->pdata.gpio_reset,
-                        GPIOF_OUT_INIT_HIGH,
+                        GPIOF_OUT_INIT_LOW,
                          "aic31xx-reset-pin");
          if (ret < 0) {
Quoted 2 lines
              dev_err(aic31xx->dev, "not able to acquire gpio\n");

Oops, aic3111 and friends indeed have an active low reset line. The line was not behind a gpio on my board.

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

maintainer
#4 lore raw
Quoted 1 line · Peter S. Housel

Ping...

Don't top post and don't send content free pings. If you think a patch should be applied please send it to the maintainers as covered in SubmittingPatches.