.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Register map access API internal header |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2011 Wolfson Microelectronics plc |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #ifndef _REGMAP_INTERNAL_H |
---|
.. | .. |
---|
94 | 91 | bool (*readable_reg)(struct device *dev, unsigned int reg); |
---|
95 | 92 | bool (*volatile_reg)(struct device *dev, unsigned int reg); |
---|
96 | 93 | bool (*precious_reg)(struct device *dev, unsigned int reg); |
---|
| 94 | + bool (*writeable_noinc_reg)(struct device *dev, unsigned int reg); |
---|
97 | 95 | bool (*readable_noinc_reg)(struct device *dev, unsigned int reg); |
---|
98 | 96 | const struct regmap_access_table *wr_table; |
---|
99 | 97 | const struct regmap_access_table *rd_table; |
---|
100 | 98 | const struct regmap_access_table *volatile_table; |
---|
101 | 99 | const struct regmap_access_table *precious_table; |
---|
| 100 | + const struct regmap_access_table *wr_noinc_table; |
---|
102 | 101 | const struct regmap_access_table *rd_noinc_table; |
---|
103 | 102 | |
---|
104 | 103 | int (*reg_read)(void *context, unsigned int reg, unsigned int *val); |
---|
.. | .. |
---|
149 | 148 | |
---|
150 | 149 | /* if set, converts bulk read to single read */ |
---|
151 | 150 | bool use_single_read; |
---|
152 | | - /* if set, converts bulk read to single read */ |
---|
| 151 | + /* if set, converts bulk write to single write */ |
---|
153 | 152 | bool use_single_write; |
---|
154 | 153 | /* if set, the device supports multi write mode */ |
---|
155 | 154 | bool can_multi_write; |
---|
.. | .. |
---|
162 | 161 | void *selector_work_buf; /* Scratch buffer used for selector */ |
---|
163 | 162 | |
---|
164 | 163 | struct hwspinlock *hwlock; |
---|
| 164 | + |
---|
| 165 | + /* if set, the regmap core can sleep */ |
---|
| 166 | + bool can_sleep; |
---|
165 | 167 | }; |
---|
166 | 168 | |
---|
167 | 169 | struct regcache_ops { |
---|
.. | .. |
---|
183 | 185 | bool regmap_readable(struct regmap *map, unsigned int reg); |
---|
184 | 186 | bool regmap_volatile(struct regmap *map, unsigned int reg); |
---|
185 | 187 | bool regmap_precious(struct regmap *map, unsigned int reg); |
---|
| 188 | +bool regmap_writeable_noinc(struct regmap *map, unsigned int reg); |
---|
186 | 189 | bool regmap_readable_noinc(struct regmap *map, unsigned int reg); |
---|
187 | 190 | |
---|
188 | 191 | int _regmap_write(struct regmap *map, unsigned int reg, |
---|
.. | .. |
---|
217 | 220 | |
---|
218 | 221 | #ifdef CONFIG_DEBUG_FS |
---|
219 | 222 | extern void regmap_debugfs_initcall(void); |
---|
220 | | -extern void regmap_debugfs_init(struct regmap *map, const char *name); |
---|
| 223 | +extern void regmap_debugfs_init(struct regmap *map); |
---|
221 | 224 | extern void regmap_debugfs_exit(struct regmap *map); |
---|
222 | 225 | |
---|
223 | 226 | static inline void regmap_debugfs_disable(struct regmap *map) |
---|
.. | .. |
---|
227 | 230 | |
---|
228 | 231 | #else |
---|
229 | 232 | static inline void regmap_debugfs_initcall(void) { } |
---|
230 | | -static inline void regmap_debugfs_init(struct regmap *map, const char *name) { } |
---|
| 233 | +static inline void regmap_debugfs_init(struct regmap *map) { } |
---|
231 | 234 | static inline void regmap_debugfs_exit(struct regmap *map) { } |
---|
232 | 235 | static inline void regmap_debugfs_disable(struct regmap *map) { } |
---|
233 | 236 | #endif |
---|
.. | .. |
---|
259 | 262 | int regcache_lookup_reg(struct regmap *map, unsigned int reg); |
---|
260 | 263 | |
---|
261 | 264 | int _regmap_raw_write(struct regmap *map, unsigned int reg, |
---|
262 | | - const void *val, size_t val_len); |
---|
| 265 | + const void *val, size_t val_len, bool noinc); |
---|
263 | 266 | |
---|
264 | 267 | void regmap_async_complete_cb(struct regmap_async *async, int ret); |
---|
265 | 268 | |
---|