diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regmap.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index b7e95bf942c9..28dde941c783 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -127,7 +127,18 @@ typedef void (*regmap_unlock)(void *); | |||
127 | * @lock_arg: this field is passed as the only argument of lock/unlock | 127 | * @lock_arg: this field is passed as the only argument of lock/unlock |
128 | * functions (ignored in case regular lock/unlock functions | 128 | * functions (ignored in case regular lock/unlock functions |
129 | * are not overridden). | 129 | * are not overridden). |
130 | * | 130 | * @reg_read: Optional callback that if filled will be used to perform |
131 | * all the reads from the registers. Should only be provided for | ||
132 | * devices whos read operation cannot be represented as a simple read | ||
133 | * operation on a bus such as SPI, I2C, etc. Most of the devices do | ||
134 | * not need this. | ||
135 | * @reg_write: Same as above for writing. | ||
136 | * @fast_io: Register IO is fast. Use a spinlock instead of a mutex | ||
137 | * to perform locking. This field is ignored if custom lock/unlock | ||
138 | * functions are used (see fields lock/unlock of struct regmap_config). | ||
139 | * This field is a duplicate of a similar file in | ||
140 | * 'struct regmap_bus' and serves exact same purpose. | ||
141 | * Use it only for "no-bus" cases. | ||
131 | * @max_register: Optional, specifies the maximum valid register index. | 142 | * @max_register: Optional, specifies the maximum valid register index. |
132 | * @wr_table: Optional, points to a struct regmap_access_table specifying | 143 | * @wr_table: Optional, points to a struct regmap_access_table specifying |
133 | * valid ranges for write access. | 144 | * valid ranges for write access. |
@@ -177,6 +188,11 @@ struct regmap_config { | |||
177 | regmap_unlock unlock; | 188 | regmap_unlock unlock; |
178 | void *lock_arg; | 189 | void *lock_arg; |
179 | 190 | ||
191 | int (*reg_read)(void *context, unsigned int reg, unsigned int *val); | ||
192 | int (*reg_write)(void *context, unsigned int reg, unsigned int val); | ||
193 | |||
194 | bool fast_io; | ||
195 | |||
180 | unsigned int max_register; | 196 | unsigned int max_register; |
181 | const struct regmap_access_table *wr_table; | 197 | const struct regmap_access_table *wr_table; |
182 | const struct regmap_access_table *rd_table; | 198 | const struct regmap_access_table *rd_table; |