ASoC: rockchip: i2s: add default values for registers
authorSugar Zhang <sugar.zhang@rock-chips.com>
Mon, 22 Feb 2016 07:56:54 +0000 (15:56 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 22 Feb 2016 11:04:45 +0000 (20:04 +0900)
this patch add default values for registers according description from TRM.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_i2s.c

index 531a6d201d2e08f18cf838cac660200471a1a3f4..2f8e20416bd3aa08bf9178949c010905472a2414 100644 (file)
@@ -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,