summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r--drivers/base/regmap/internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index 6d40935..95d46a5 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -189,6 +189,13 @@ int regcache_write(struct regmap *map,
unsigned int reg, unsigned int value);
int regcache_sync(struct regmap *map);
+static inline const void *regcache_get_val_addr(struct regmap *map,
+ const void *base,
+ unsigned int idx)
+{
+ return base + (map->cache_word_size * idx);
+}
+
unsigned int regcache_get_val(struct regmap *map, const void *base,
unsigned int idx);
bool regcache_set_val(struct regmap *map, void *base, unsigned int idx,
OpenPOWER on IntegriCloud