From d2a5884a64161b524cc6749ee11b95d252e497f3 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sun, 27 Jan 2013 10:49:05 -0800 Subject: 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 Signed-off-by: Mark Brown --- drivers/base/regmap/internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/base/regmap/internal.h') diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index 51f0574..b55fde5 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; -- cgit v1.1