Skip to contentSkip to conversation

ASoC: codec tlv320aic32x4 fixes

PATCH Applied Markus Pargmann 2 participants 10 messages Jan 11, 2014 – Jan 15, 2014

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

cover ASoC: codec tlv320aic32x4 fixes

Hi,

Here are two fixes for the tlv320aic32x4 codec. The first patch fixes a regmap bug introduced in 3.13. The second is not as important, it adds the codec to the compatible list in the binding documentation.

Regards,

Markus

Markus Pargmann (2):
ASoC: codec: tlv320aic32x4: Fix regmap range config
ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible

 Documentation/devicetree/bindings/sound/tlv320aic3x.txt | 1 +
 sound/soc/codecs/tlv320aic32x4.c                        | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.5.2
#1 lore raw

PATCH 1/2 ASoC: codec: tlv320aic32x4: Fix regmap range config

This codec driver fails to probe because it has a higher regmap range_max value than max_register. This patch sets the range_max to the max_register value as described in the for struct regmap_range_cfg:
"@range_max: Address of the highest register in virtual range."

---
 sound/soc/codecs/tlv320aic32x4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tlv320aic32x4.c +1 -1
index 18cdcca..6941fa9 100644
@@ -268,7 +268,7 @@ static const struct regmap_range_cfg aic32x4_regmap_pages[] = {
 		.window_start = 0,
 		.window_len = 128,
 		.range_min = AIC32X4_PAGE1,
-		.range_max = AIC32X4_PAGE1 + 127,
+		.range_max = AIC32X4_RMICPGAVOL,
 	},
 };
 
Signature · 1 line
1.8.5.2
maintainer Applied
#2 lore raw

Re: [PATCH 1/2] ASoC: codec: tlv320aic32x4: Fix regmap range config

Quoted 4 lines · Markus Pargmann

This codec driver fails to probe because it has a higher regmap range_max value than max_register. This patch sets the range_max to the max_register value as described in the for struct regmap_range_cfg:
"@range_max: Address of the highest register in virtual range."

Applied, thanks.

#3 lore raw

PATCH 2/2 ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible

In reply to Markus Pargmann

Add tlv320aic32x4 to the compatible list in the binding documentation.

---
 Documentation/devicetree/bindings/sound/tlv320aic3x.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/sound/tlv320aic3x.txt +1 -0
index 5e6040c..9d8ea14 100644
@@ -6,6 +6,7 @@ Required properties:
 
 - compatible - "string" - One of:
     "ti,tlv320aic3x" - Generic TLV320AIC3x device
+    "ti,tlv320aic32x4" - TLV320AIC32x4
     "ti,tlv320aic33" - TLV320AIC33
     "ti,tlv320aic3007" - TLV320AIC3007
     "ti,tlv320aic3106" - TLV320AIC3106
Signature · 1 line
1.8.5.2
maintainer Applied
#4 lore raw

Re: [PATCH 2/2] ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible

Quoted 6 lines · Markus Pargmann

Add tlv320aic32x4 to the compatible list in the binding documentation.

---
 Documentation/devicetree/bindings/sound/tlv320aic3x.txt | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks but you should really also add this compatible string to the driver.

#5 lore raw

Re: [PATCH 2/2] ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible

Hi,

Quoted 10 lines · Mark Brown
Quoted 6 lines · Markus Pargmann

Add tlv320aic32x4 to the compatible list in the binding documentation.

---
 Documentation/devicetree/bindings/sound/tlv320aic3x.txt | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks but you should really also add this compatible string to the driver.

Oh, I didn't notice that the 320aic3x driver actually has of_device_ids. I was using the 320aic3x4 driver which only defines i2c_device_id but it still matches with the compatible fields from my devicetree.

So perhaps it is better to drop this patch as it is no explicit compatible in the driver?

Thanks,

Markus

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
maintainer
#6 lore raw

Re: [PATCH 2/2] ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible

Quoted 11 lines · Markus Pargmann
Quoted 2 lines · Mark Brown

Applied, thanks but you should really also add this compatible string to the driver.

Oh, I didn't notice that the 320aic3x driver actually has of_device_ids. I was using the 320aic3x4 driver which only defines i2c_device_id but it still matches with the compatible fields from my devicetree.

So perhaps it is better to drop this patch as it is no explicit compatible in the driver?

Or you could add the compatible string to the driver as I suggested... I don't see any reason for the device not to have a compatible string?

#7 lore raw

Re: [PATCH 2/2] ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible

Hi,

Quoted 10 lines · Mark Brown
Quoted 8 lines · Markus Pargmann
Quoted 2 lines · Mark Brown

Applied, thanks but you should really also add this compatible string to the driver.

Oh, I didn't notice that the 320aic3x driver actually has of_device_ids. I was using the 320aic3x4 driver which only defines i2c_device_id but it still matches with the compatible fields from my devicetree.

Quoted 5 lines
Quoted 2 lines

So perhaps it is better to drop this patch as it is no explicit compatible in the driver?

Or you could add the compatible string to the driver as I suggested... I don't see any reason for the device not to have a compatible string?

The codec is not working here at the moment, so I can't test if the aic3204 codec is really working with the aic3x driver.

Regards,

Markus

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
maintainer
#8 lore raw

Re: [PATCH 2/2] ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible

Quoted 7 lines · Markus Pargmann
Quoted 2 lines · Mark Brown

Or you could add the compatible string to the driver as I suggested... I don't see any reason for the device not to have a compatible string?

The codec is not working here at the moment, so I can't test if the aic3204 codec is really working with the aic3x driver.

Why would you add the compatible string to the aic3x driver, there is a separate driver for this chip?

#9 lore raw

Re: [PATCH 2/2] ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible

Quoted 11 lines · Mark Brown
Quoted 7 lines · Markus Pargmann
Quoted 2 lines · Mark Brown

Or you could add the compatible string to the driver as I suggested... I don't see any reason for the device not to have a compatible string?

The codec is not working here at the moment, so I can't test if the aic3204 codec is really working with the aic3x driver.

Why would you add the compatible string to the aic3x driver, there is a separate driver for this chip?

Right, was confused a little. I will add proper bindings for aic32x4 as soon as I have everything up and running.

Thanks,

Markus

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |