hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/base/regmap/internal.h
....@@ -1,13 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Register map access API internal header
34 *
45 * Copyright 2011 Wolfson Microelectronics plc
56 *
67 * 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.
118 */
129
1310 #ifndef _REGMAP_INTERNAL_H
....@@ -94,11 +91,13 @@
9491 bool (*readable_reg)(struct device *dev, unsigned int reg);
9592 bool (*volatile_reg)(struct device *dev, unsigned int reg);
9693 bool (*precious_reg)(struct device *dev, unsigned int reg);
94
+ bool (*writeable_noinc_reg)(struct device *dev, unsigned int reg);
9795 bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
9896 const struct regmap_access_table *wr_table;
9997 const struct regmap_access_table *rd_table;
10098 const struct regmap_access_table *volatile_table;
10199 const struct regmap_access_table *precious_table;
100
+ const struct regmap_access_table *wr_noinc_table;
102101 const struct regmap_access_table *rd_noinc_table;
103102
104103 int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
....@@ -149,7 +148,7 @@
149148
150149 /* if set, converts bulk read to single read */
151150 bool use_single_read;
152
- /* if set, converts bulk read to single read */
151
+ /* if set, converts bulk write to single write */
153152 bool use_single_write;
154153 /* if set, the device supports multi write mode */
155154 bool can_multi_write;
....@@ -162,6 +161,9 @@
162161 void *selector_work_buf; /* Scratch buffer used for selector */
163162
164163 struct hwspinlock *hwlock;
164
+
165
+ /* if set, the regmap core can sleep */
166
+ bool can_sleep;
165167 };
166168
167169 struct regcache_ops {
....@@ -183,6 +185,7 @@
183185 bool regmap_readable(struct regmap *map, unsigned int reg);
184186 bool regmap_volatile(struct regmap *map, unsigned int reg);
185187 bool regmap_precious(struct regmap *map, unsigned int reg);
188
+bool regmap_writeable_noinc(struct regmap *map, unsigned int reg);
186189 bool regmap_readable_noinc(struct regmap *map, unsigned int reg);
187190
188191 int _regmap_write(struct regmap *map, unsigned int reg,
....@@ -217,7 +220,7 @@
217220
218221 #ifdef CONFIG_DEBUG_FS
219222 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);
221224 extern void regmap_debugfs_exit(struct regmap *map);
222225
223226 static inline void regmap_debugfs_disable(struct regmap *map)
....@@ -227,7 +230,7 @@
227230
228231 #else
229232 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) { }
231234 static inline void regmap_debugfs_exit(struct regmap *map) { }
232235 static inline void regmap_debugfs_disable(struct regmap *map) { }
233236 #endif
....@@ -259,7 +262,7 @@
259262 int regcache_lookup_reg(struct regmap *map, unsigned int reg);
260263
261264 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);
263266
264267 void regmap_async_complete_cb(struct regmap_async *async, int ret);
265268