ASoC: pcm1681: Fix max_register setting

This change “ASoC: pcm1681: Fix max_register setting” (commit 64256ac) in Linux kernel is authored by Axel Lin <axel.lin [at]> on Sat Oct 12 17:24:25 2013 +0800.

Description of "ASoC: pcm1681: Fix max_register setting"

The change “ASoC: pcm1681: Fix max_register setting” introduces changes as follows.

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.

Signed-off-by: Axel Lin <>
Signed-off-by: Mark Brown <>

Linux kernel releases containing commit 64256ac

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "ASoC: pcm1681: Fix max_register setting"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 sound/soc/codecs/pcm1681.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
index 651ce0923675..c91eba504f92 100644
--- a/sound/soc/codecs/pcm1681.c
+++ b/sound/soc/codecs/pcm1681.c
@@ -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,

The commit for this change in Linux stable tree is 64256ac (patch).

Last modified: 2020/02/10