diff options
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r-- | include/linux/regmap.h | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 690276a642cf..1e4ec2b6c2ea 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -25,7 +25,7 @@ enum regcache_type { | |||
25 | REGCACHE_NONE, | 25 | REGCACHE_NONE, |
26 | REGCACHE_INDEXED, | 26 | REGCACHE_INDEXED, |
27 | REGCACHE_RBTREE, | 27 | REGCACHE_RBTREE, |
28 | REGCACHE_LZO | 28 | REGCACHE_COMPRESSED |
29 | }; | 29 | }; |
30 | 30 | ||
31 | /** | 31 | /** |
@@ -143,5 +143,53 @@ int regmap_update_bits(struct regmap *map, unsigned int reg, | |||
143 | int regcache_sync(struct regmap *map); | 143 | int regcache_sync(struct regmap *map); |
144 | void regcache_cache_only(struct regmap *map, bool enable); | 144 | void regcache_cache_only(struct regmap *map, bool enable); |
145 | void regcache_cache_bypass(struct regmap *map, bool enable); | 145 | void regcache_cache_bypass(struct regmap *map, bool enable); |
146 | void regcache_mark_dirty(struct regmap *map); | ||
147 | |||
148 | /** | ||
149 | * Description of an IRQ for the generic regmap irq_chip. | ||
150 | * | ||
151 | * @reg_offset: Offset of the status/mask register within the bank | ||
152 | * @mask: Mask used to flag/control the register. | ||
153 | */ | ||
154 | struct regmap_irq { | ||
155 | unsigned int reg_offset; | ||
156 | unsigned int mask; | ||
157 | }; | ||
158 | |||
159 | /** | ||
160 | * Description of a generic regmap irq_chip. This is not intended to | ||
161 | * handle every possible interrupt controller, but it should handle a | ||
162 | * substantial proportion of those that are found in the wild. | ||
163 | * | ||
164 | * @name: Descriptive name for IRQ controller. | ||
165 | * | ||
166 | * @status_base: Base status register address. | ||
167 | * @mask_base: Base mask register address. | ||
168 | * @ack_base: Base ack address. If zero then the chip is clear on read. | ||
169 | * | ||
170 | * @num_regs: Number of registers in each control bank. | ||
171 | * @irqs: Descriptors for individual IRQs. Interrupt numbers are | ||
172 | * assigned based on the index in the array of the interrupt. | ||
173 | * @num_irqs: Number of descriptors. | ||
174 | */ | ||
175 | struct regmap_irq_chip { | ||
176 | const char *name; | ||
177 | |||
178 | unsigned int status_base; | ||
179 | unsigned int mask_base; | ||
180 | unsigned int ack_base; | ||
181 | |||
182 | int num_regs; | ||
183 | |||
184 | const struct regmap_irq *irqs; | ||
185 | int num_irqs; | ||
186 | }; | ||
187 | |||
188 | struct regmap_irq_chip_data; | ||
189 | |||
190 | int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags, | ||
191 | int irq_base, struct regmap_irq_chip *chip, | ||
192 | struct regmap_irq_chip_data **data); | ||
193 | void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data); | ||
146 | 194 | ||
147 | #endif | 195 | #endif |