aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm5102-tables.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-11 02:51:39 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2013-02-13 18:22:45 -0500
commit025d982079502b1d6c7c428504eb64c5059a2e80 (patch)
treef6e83de7a0dcb26708db5db7f284d608df11c72e /drivers/mfd/wm5102-tables.c
parent0101e53cbb1c653738de8dfddc80c0faa5a4fd39 (diff)
mfd: wm5102: Mark only extant DSP registers volatile
Since regmap sometimes uses volatile as a proxy for readable simply having a blanket condition can mark too many registers as readable. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm5102-tables.c')
-rw-r--r--drivers/mfd/wm5102-tables.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c
index 1133a64c2dc9..ee0a109f5ce9 100644
--- a/drivers/mfd/wm5102-tables.c
+++ b/drivers/mfd/wm5102-tables.c
@@ -1831,9 +1831,6 @@ static bool wm5102_readable_register(struct device *dev, unsigned int reg)
1831 1831
1832static bool wm5102_volatile_register(struct device *dev, unsigned int reg) 1832static bool wm5102_volatile_register(struct device *dev, unsigned int reg)
1833{ 1833{
1834 if (reg > 0xffff)
1835 return true;
1836
1837 switch (reg) { 1834 switch (reg) {
1838 case ARIZONA_SOFTWARE_RESET: 1835 case ARIZONA_SOFTWARE_RESET:
1839 case ARIZONA_DEVICE_REVISION: 1836 case ARIZONA_DEVICE_REVISION:
@@ -1878,7 +1875,13 @@ static bool wm5102_volatile_register(struct device *dev, unsigned int reg)
1878 case ARIZONA_MIC_DETECT_3: 1875 case ARIZONA_MIC_DETECT_3:
1879 return true; 1876 return true;
1880 default: 1877 default:
1881 return false; 1878 if ((reg >= 0x100000 && reg < 0x106000) ||
1879 (reg >= 0x180000 && reg < 0x180800) ||
1880 (reg >= 0x190000 && reg < 0x194800) ||
1881 (reg >= 0x1a8000 && reg < 0x1a9800))
1882 return true;
1883 else
1884 return false;
1882 } 1885 }
1883} 1886}
1884 1887