From: Sugar Zhang Date: Fri, 19 Feb 2016 02:10:07 +0000 (+0800) Subject: ASoC: rockchip: i2s: add default values for registers X-Git-Tag: firefly_0821_release~3380 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=85333f45a432ebd2497515123c370e5c90eead87;p=firefly-linux-kernel-4.4.55.git ASoC: rockchip: i2s: add default values for registers this patch add default values for registers according description from TRM. Change-Id: I683b30483b9c1db08a202983f7055092db4cad2e Signed-off-by: Sugar Zhang --- diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 58ee64594f07..d12f188c4fcf 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -435,11 +435,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,