Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1340146 > unrolled thread

[PATCH] ASoC: rockchip: i2s: add default values for registers

Started bySugar Zhang <sugar.zhang@rock-chips.com>
First post2016-02-23 02:30 +0100
Last post2016-02-24 04:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ASoC: rockchip: i2s: add default values for registers Sugar Zhang <sugar.zhang@rock-chips.com> - 2016-02-23 02:30 +0100
    Re: [PATCH] ASoC: rockchip: i2s: add default values for registers Mark Brown <broonie@kernel.org> - 2016-02-24 04:40 +0100

#1340146 — [PATCH] ASoC: rockchip: i2s: add default values for registers

FromSugar Zhang <sugar.zhang@rock-chips.com>
Date2016-02-23 02:30 +0100
Subject[PATCH] ASoC: rockchip: i2s: add default values for registers
Message-ID<r59XC-6rQ-51@gated-at.bofh.it>
this patch add default values for registers according description from TRM.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
---

 sound/soc/rockchip/rockchip_i2s.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index 6561c4c..a0b0942 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -440,11 +440,21 @@ static bool rockchip_i2s_precious_reg(struct device *dev, unsigned int reg)
 	}
 }
 
+static const struct reg_default rockchip_i2s_reg_defaults[] = {
+	{0x00, 0x0000000f},
+	{0x04, 0x0000000f},
+	{0x08, 0x00071f1f},
+	{0x10, 0x001f0000},
+	{0x14, 0x01f00000},
+};
+
 static const struct regmap_config rockchip_i2s_regmap_config = {
 	.reg_bits = 32,
 	.reg_stride = 4,
 	.val_bits = 32,
 	.max_register = I2S_RXDR,
+	.reg_defaults = rockchip_i2s_reg_defaults,
+	.num_reg_defaults = ARRAY_SIZE(rockchip_i2s_reg_defaults),
 	.writeable_reg = rockchip_i2s_wr_reg,
 	.readable_reg = rockchip_i2s_rd_reg,
 	.volatile_reg = rockchip_i2s_volatile_reg,
-- 
1.9.1

[toc] | [next] | [standalone]


#1341272

FromMark Brown <broonie@kernel.org>
Date2016-02-24 04:40 +0100
Message-ID<r5ysW-6YK-7@gated-at.bofh.it>
In reply to#1340146

[Multipart message — attachments visible in raw view] — view raw

On Tue, Feb 23, 2016 at 09:19:22AM +0800, Sugar Zhang wrote:
> this patch add default values for registers according description from TRM.

This patch has already been applied, please send incremental changes if
any are required.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web