1 #ifndef __LINUX_REGMAP_H
2 #define __LINUX_REGMAP_H
16 #include <linux/list.h>
17 #include <linux/rbtree.h>
24 struct regmap_range_cfg;
50 REGMAP_ENDIAN_DEFAULT = 0,
107 struct regmap_config {
120 unsigned int max_register;
122 unsigned int num_reg_defaults;
124 const void *reg_defaults_raw;
125 unsigned int num_reg_defaults_raw;
132 enum regmap_endian reg_format_endian;
133 enum regmap_endian val_format_endian;
135 const struct regmap_range_cfg *ranges;
136 unsigned int n_ranges;
155 struct regmap_range_cfg {
157 unsigned int range_min;
158 unsigned int range_max;
161 unsigned int selector_reg;
162 unsigned int selector_mask;
166 unsigned int window_start;
167 unsigned int window_len;
172 typedef int (*regmap_hw_gather_write)(
void *
context,
173 const void *
reg,
size_t reg_len,
174 const void *
val,
size_t val_len);
176 const void *reg_buf,
size_t reg_size,
177 void *val_buf,
size_t val_size);
178 typedef void (*regmap_hw_free_context)(
void *
context);
201 regmap_hw_write
write;
202 regmap_hw_gather_write gather_write;
204 regmap_hw_free_context free_context;
206 enum regmap_endian reg_format_endian_default;
207 enum regmap_endian val_format_endian_default;
211 const struct regmap_bus *
bus,
213 const struct regmap_config *
config);
215 const struct regmap_config *
config);
217 const struct regmap_config *
config);
220 const struct regmap_config *
config);
223 const struct regmap_bus *
bus,
225 const struct regmap_config *
config);
227 const struct regmap_config *
config);
229 const struct regmap_config *
config);
232 const struct regmap_config *
config);
236 const struct regmap_config *
config);
240 const void *
val,
size_t val_len);
245 void *
val,
size_t val_len);
249 unsigned int mask,
unsigned int val);
251 unsigned int mask,
unsigned int val,
272 unsigned int reg_offset;
295 struct regmap_irq_chip {
298 unsigned int status_base;
299 unsigned int mask_base;
300 unsigned int ack_base;
301 unsigned int wake_base;
302 unsigned int irq_reg_stride;
303 unsigned int mask_invert;
308 const struct regmap_irq *irqs;
338 const void *
val,
size_t val_len)
345 const void *
val,
size_t val_count)
359 void *
val,
size_t val_len)
366 void *
val,
size_t val_count)
373 unsigned int mask,
unsigned int val)
381 unsigned int mask,
unsigned int val,