aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-14 12:11:09 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-14 12:11:09 -0500
commita2b37efc4e2aa76a5be29bbde8a2cd1c9c9066bc (patch)
tree0be4360b343ab037666d9b1d4ca326ef59e9615d /include/linux
parenta31f68497e07f5fec7155bc07dc633fc6eaa0adb (diff)
parentd2a5884a64161b524cc6749ee11b95d252e497f3 (diff)
Merge remote-tracking branch 'regmap/topic/no-bus' into regmap-next
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/regmap.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 017b3bd085a2..bf77dfdabef9 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -128,7 +128,18 @@ typedef void (*regmap_unlock)(void *);
128 * @lock_arg: this field is passed as the only argument of lock/unlock 128 * @lock_arg: this field is passed as the only argument of lock/unlock
129 * functions (ignored in case regular lock/unlock functions 129 * functions (ignored in case regular lock/unlock functions
130 * are not overridden). 130 * are not overridden).
131 * 131 * @reg_read: Optional callback that if filled will be used to perform
132 * all the reads from the registers. Should only be provided for
133 * devices whos read operation cannot be represented as a simple read
134 * operation on a bus such as SPI, I2C, etc. Most of the devices do
135 * not need this.
136 * @reg_write: Same as above for writing.
137 * @fast_io: Register IO is fast. Use a spinlock instead of a mutex
138 * to perform locking. This field is ignored if custom lock/unlock
139 * functions are used (see fields lock/unlock of struct regmap_config).
140 * This field is a duplicate of a similar file in
141 * 'struct regmap_bus' and serves exact same purpose.
142 * Use it only for "no-bus" cases.
132 * @max_register: Optional, specifies the maximum valid register index. 143 * @max_register: Optional, specifies the maximum valid register index.
133 * @wr_table: Optional, points to a struct regmap_access_table specifying 144 * @wr_table: Optional, points to a struct regmap_access_table specifying
134 * valid ranges for write access. 145 * valid ranges for write access.
@@ -178,6 +189,11 @@ struct regmap_config {
178 regmap_unlock unlock; 189 regmap_unlock unlock;
179 void *lock_arg; 190 void *lock_arg;
180 191
192 int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
193 int (*reg_write)(void *context, unsigned int reg, unsigned int val);
194
195 bool fast_io;
196
181 unsigned int max_register; 197 unsigned int max_register;
182 const struct regmap_access_table *wr_table; 198 const struct regmap_access_table *wr_table;
183 const struct regmap_access_table *rd_table; 199 const struct regmap_access_table *rd_table;