Skip to contentSkip to conversation

ASoC: pcm1681: Fix max_register setting

PATCH Applied Axel Lin 2 participants 4 messages Oct 12, 2013 – Oct 14, 2013

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 ASoC: pcm1681: Fix max_register setting

According to the datasheet, the max_register is 13h. ARRAY_SIZE(pcm1681_reg_defaults) + 1 is 18 which is wrong.

---
 sound/soc/codecs/pcm1681.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/pcm1681.c +1 -1
index 651ce09..c91eba5 100644
@@ -270,7 +270,7 @@ MODULE_DEVICE_TABLE(of, pcm1681_dt_ids);
 static const struct regmap_config pcm1681_regmap = {
 	.reg_bits		= 8,
 	.val_bits		= 8,
-	.max_register		= ARRAY_SIZE(pcm1681_reg_defaults) + 1,
+	.max_register		= 0x13,
 	.reg_defaults		= pcm1681_reg_defaults,
 	.num_reg_defaults	= ARRAY_SIZE(pcm1681_reg_defaults),
 	.writeable_reg		= pcm1681_writeable_reg,
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH 2/2 ASoC: pcm1792a: Fix max_register setting

According to the datasheet, the max_register is register 23.

---
 sound/soc/codecs/pcm1792a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/pcm1792a.c +1 -1
index 2a8eccf..7613181 100644
@@ -188,7 +188,7 @@ MODULE_DEVICE_TABLE(of, pcm1792a_of_match);
 static const struct regmap_config pcm1792a_regmap = {
 	.reg_bits		= 8,
 	.val_bits		= 8,
-	.max_register		= 24,
+	.max_register		= 23,
 	.reg_defaults		= pcm1792a_reg_defaults,
 	.num_reg_defaults	= ARRAY_SIZE(pcm1792a_reg_defaults),
 	.writeable_reg		= pcm1792a_writeable_reg,
Signature · 1 line
1.8.1.2
maintainer Applied
#3 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

According to the datasheet, the max_register is 13h. ARRAY_SIZE(pcm1681_reg_defaults) + 1 is 18 which is wrong.

Applied, thanks.

maintainer Applied
#2 lore raw

Re: [PATCH 2/2] ASoC: pcm1792a: Fix max_register setting

In reply to Axel Lin
Quoted 1 line · Axel Lin

According to the datasheet, the max_register is register 23.

Applied, thanks.