mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ASoC: rockchip: spdifrx: Mark SPDIFRX_SMPDR as volatile and precious
This patch marks SPDIFRX_SMPDR as precious to avoid being read outside a call from the driver, such as regmap debugfs. Change-Id: Icc5398e0e192b86e191770b9ebd1251f97e6a048 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user