diff --git a/sound/soc/rockchip/rockchip_spdifrx.c b/sound/soc/rockchip/rockchip_spdifrx.c index d5e7455c809a..0e457232116d 100644 --- a/sound/soc/rockchip/rockchip_spdifrx.c +++ b/sound/soc/rockchip/rockchip_spdifrx.c @@ -216,6 +216,7 @@ static bool rk_spdifrx_volatile_reg(struct device *dev, unsigned int reg) case SPDIFRX_FIFOCTRL: case SPDIFRX_INTSR: case SPDIFRX_INTCLR: + case SPDIFRX_SMPDR: case SPDIFRX_BURSTINFO: return true; default: @@ -223,6 +224,16 @@ static bool rk_spdifrx_volatile_reg(struct device *dev, unsigned int reg) } } +static bool rk_spdifrx_precious_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case SPDIFRX_SMPDR: + return true; + default: + return false; + } +} + static const struct regmap_config rk_spdifrx_regmap_config = { .reg_bits = 32, .reg_stride = 4, @@ -231,6 +242,7 @@ static const struct regmap_config rk_spdifrx_regmap_config = { .writeable_reg = rk_spdifrx_wr_reg, .readable_reg = rk_spdifrx_rd_reg, .volatile_reg = rk_spdifrx_volatile_reg, + .precious_reg = rk_spdifrx_precious_reg, .cache_type = REGCACHE_FLAT, };