summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/internal.h
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2013-01-27 19:49:05 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-29 04:42:49 +0100
commitd2a5884a64161b524cc6749ee11b95d252e497f3 (patch)
treecf94ee33306a752e68977324e9b990538b44f8ab /drivers/base/regmap/internal.h
parentregmap: Add provisions to have user-defined write operation (diff)
downloadlinux-d2a5884a64161b524cc6749ee11b95d252e497f3.tar.xz
linux-d2a5884a64161b524cc6749ee11b95d252e497f3.zip
regmap: Add "no-bus" option for regmap API
This commit adds provision for "no-bus" usage of the regmap API. In this configuration user can provide API with two callbacks 'reg_read' and 'reg_write' which are to be called when reads and writes to one of device's registers is performed. This is useful for devices that expose registers but whose register access sequence does not fit the 'bus' abstraction. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r--drivers/base/regmap/internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index 51f057405647..b55fde5d216a 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -77,6 +77,8 @@ struct regmap {
int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
int (*reg_write)(void *context, unsigned int reg, unsigned int val);
+ bool defer_caching;
+
u8 read_flag_mask;
u8 write_flag_mask;