[PATCH 6/6] ASoC: cs53l30: Mark chip ID registers as volatile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark the chip ID registers as volatile, the current code does work as
without a default value regmap will read from the hardware the first
time, however, this makes it more explicit that this register should be
read from the hardware.

Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
---
 sound/soc/codecs/cs53l30.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c
index cb47fb5..b4f0a43 100644
--- a/sound/soc/codecs/cs53l30.c
+++ b/sound/soc/codecs/cs53l30.c
@@ -89,10 +89,16 @@ static const struct reg_default cs53l30_reg_defaults[] = {
 
 static bool cs53l30_volatile_register(struct device *dev, unsigned int reg)
 {
-	if (reg == CS53L30_IS)
+	switch (reg) {
+	case CS53L30_DEVID_AB:
+	case CS53L30_DEVID_CD:
+	case CS53L30_DEVID_E:
+	case CS53L30_REVID:
+	case CS53L30_IS:
 		return true;
-	else
+	default:
 		return false;
+	}
 }
 
 static bool cs53l30_writeable_register(struct device *dev, unsigned int reg)
-- 
2.1.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux