summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regcache.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-17 15:58:25 -0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-17 16:26:50 -0800
commit7d5e525b9ceda0e3b85da0acdaa2de19fea51edc (patch)
tree22291170c9f95d3decce9eebfc8f2df5ce674014 /drivers/base/regmap/regcache.c
parent9cde5fcd435fd929db7b0b486efb435cdb1ddca4 (diff)
regmap: Implement support for 32 bit registers and values
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r--drivers/base/regmap/regcache.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 7e18d1e70f12..69d4c9c5a4a8 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -372,6 +372,13 @@ bool regcache_set_val(void *base, unsigned int idx,
cache[idx] = val;
break;
}
+ case 4: {
+ u32 *cache = base;
+ if (cache[idx] == val)
+ return true;
+ cache[idx] = val;
+ break;
+ }
default:
BUG();
}
@@ -393,6 +400,10 @@ unsigned int regcache_get_val(const void *base, unsigned int idx,
const u16 *cache = base;
return cache[idx];
}
+ case 4: {
+ const u32 *cache = base;
+ return cache[idx];
+ }
default:
BUG();
}