Changeset 718
- Timestamp:
- Sep 2, 2022, 4:26:36 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-next
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/include/linux/device.h
r716 r718 92 92 static inline const char *dev_name(const struct device *dev) 93 93 { 94 #if 0 94 95 /* Use the init name until the kobject becomes available */ 95 96 if (dev->init_name) … … 97 98 98 99 return kobject_name(&dev->kobj); 100 #else 101 return "uniaud32"; 102 #endif 99 103 } 100 104 … … 218 222 typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data); 219 223 224 #define NUMA_NO_NODE (-1) 225 #if 0 220 226 extern void *devres_alloc_node(dr_release_t release, size_t size, gfp_t gfp, 221 227 int nid); 222 #define NUMA_NO_NODE (-1)223 228 static inline void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp) 224 229 { 225 230 return devres_alloc_node(release, size, gfp, NUMA_NO_NODE); 226 231 } 227 232 #else 233 void *__devres_alloc_node(dr_release_t release, size_t size, gfp_t gfp, 234 int nid, const char *name); 235 #define devres_alloc(release, size, gfp) \ 236 __devres_alloc_node(release, size, gfp, NUMA_NO_NODE, #release) 237 #endif 228 238 /** 229 239 * struct class - device classes … … 290 300 /* debugging and troubleshooting/diagnostic helpers. */ 291 301 extern const char *dev_driver_string(const struct device *dev); 292 #define devm_kzalloc(A, B, C) kzalloc(B, C) 293 #define devm_kmalloc(A, B, C) kmalloc(B, C) 294 #define devm_kcalloc(A, B, C, D) kmalloc(B, C) 295 #define devm_kmalloc_array(A, B, C, D) kmalloc_array(B, C, D) 296 302 void *devm_kmalloc(struct device *dev, size_t size, gfp_t gfp); 303 304 static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp) 305 { 306 return devm_kmalloc(dev, size, gfp | __GFP_ZERO); 307 } 308 309 static inline void *devm_kmalloc_array(struct device *dev, 310 size_t n, size_t size, gfp_t flags) 311 { 312 // size_t bytes; 313 314 // if (unlikely(check_mul_overflow(n, size, &bytes))) 315 // return NULL; 316 317 return devm_kmalloc(dev, n * size, flags); 318 } 319 static inline void *devm_kcalloc(struct device *dev, 320 size_t n, size_t size, gfp_t flags) 321 { 322 return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO); 323 } 297 324 298 325 /* allows to add/remove a custom action to devres stack */ 299 326 int devm_add_action(struct device *dev, void (*action)(void *), void *data); 300 327 void devm_remove_action(struct device *dev, void (*action)(void *), void *data); 328 329 static inline int dev_to_node(struct device *dev) 330 { 331 return NUMA_NO_NODE; 332 } 301 333 #endif /* _LINUX_DEVICE_H */ 302 334 -
GPL/branches/uniaud32-next/include/linux/interrupt.h
r710 r718 154 154 155 155 static inline void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id) {} 156 #define devm_request_irq(A, B, C, D, E, F) request_irq(B, C, D, E, F)157 156 157 extern int __must_check 158 devm_request_threaded_irq(struct device *dev, unsigned int irq, 159 irq_handler_t handler, irq_handler_t thread_fn, 160 unsigned long irqflags, const char *devname, 161 void *dev_id); 162 163 static inline int __must_check 164 devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler, 165 unsigned long irqflags, const char *devname, void *dev_id) 166 { 167 return devm_request_threaded_irq(dev, irq, handler, NULL, irqflags, 168 devname, dev_id); 169 } 158 170 #endif -
GPL/branches/uniaud32-next/include/linux/io.h
r710 r718 7 7 #include <linux/err.h> 8 8 9 #define devm_ioremap(A, B, C) ioremap(B, C)10 9 #endif /* _LINUX_IO_H */ -
GPL/branches/uniaud32-next/include/linux/ioport.h
r710 r718 111 111 extern int autoirq_report(int waittime); 112 112 113 #define devm_request_region(A, B, C, D) request_region(B, C, D) 113 extern struct resource * __devm_request_region(struct device *dev, 114 struct resource *parent, resource_size_t start, 115 resource_size_t n, const char *name); 116 117 #define devm_request_region(dev,start,n,name) \ 118 __devm_request_region(dev, &ioport_resource, (start), (n), (name)) 114 119 #endif /* _LINUX_IOPORT_H */ -
GPL/branches/uniaud32-next/include/linux/types.h
r655 r718 135 135 unsigned long name[((bits)+BITS_PER_LONG-1)/BITS_PER_LONG] 136 136 137 typedef u32 phys_addr_t; 138 typedef phys_addr_t resource_size_t; 139 137 140 #endif /* _LINUX_TYPES_H */ -
GPL/branches/uniaud32-next/lib32/devres.c
r716 r718 13 13 #include <linux/gfp.h> 14 14 #include <linux/errno.h> 15 #include <asm/io.h> 15 16 16 17 struct devres_node { 17 18 struct list_head entry; 18 19 dr_release_t release; 19 #ifdef CONFIG_DEBUG_DEVRES20 20 const char *name; 21 21 size_t size; 22 #endif23 22 }; 24 23 … … 26 25 struct devres_node node; 27 26 /* -- 3 pointers */ 28 u nsigned long longdata[]; /* guarantee ull alignment */27 u8 data[]; /* guarantee ull alignment */ 29 28 }; 30 29 … … 36 35 }; 37 36 37 static void set_node_dbginfo(struct devres_node *node, const char *name, 38 size_t size) 39 { 40 node->name = name; 41 node->size = size; 42 } 43 38 44 #define devres_log(dev, node, op) do {} while (0) 39 45 … … 83 89 BUG_ON(!list_empty(&node->entry)); 84 90 //#ifndef TARGET_OS2 85 /* Traps here on OS/2 */ 91 /* Traps here on OS/2 - release builds on non-HDA hardware only */ 92 rprintf(("add_dr")); 86 93 list_add_tail(&node->entry, &dev->devres_head); 94 rprintf(("add_dr2")); 87 95 //#endif 88 96 } … … 99 107 void devres_add(struct device *dev, void *res) 100 108 { 101 /* Traps here on OS/2 */102 109 struct devres *dr = container_of(res, struct devres, data); 103 110 unsigned long flags; 111 104 112 spin_lock_irqsave(&dev->devres_lock, flags); 105 113 add_dr(dev, &dr->node); … … 108 116 109 117 /** 110 * devres_alloc- Allocate device resource data118 * __devres_alloc_node - Allocate device resource data 111 119 * @release: Release function devres will be associated with 112 120 * @size: Allocation size 113 121 * @gfp: Allocation flags 114 122 * @nid: NUMA node 123 * @name: Name of the resource 115 124 * 116 125 * Allocate devres of @size bytes. The allocated area is zeroed, then … … 121 130 * Pointer to allocated devres on success, NULL on failure. 122 131 */ 123 void * devres_alloc_node(dr_release_t release, size_t size, gfp_t gfp, int nid) 132 void *__devres_alloc_node(dr_release_t release, size_t size, gfp_t gfp, int nid, 133 const char *name) 124 134 { 125 135 struct devres *dr; 126 136 127 137 dr = alloc_dr(release, size, gfp | __GFP_ZERO, nid); 138 if (unlikely(!dr)) 139 return NULL; 140 set_node_dbginfo(&dr->node, name, size); 128 141 return dr->data; 129 142 } … … 145 158 } 146 159 160 #if 0 //2022-09-02 147 161 static int remove_nodes(struct device *dev, 148 162 struct list_head *first, struct list_head *end, … … 257 271 flags); 258 272 } 273 #endif 259 274 260 275 static struct devres *find_dr(struct device *dev, dr_release_t release, … … 305 320 } 306 321 322 /* 323 * Custom devres actions allow inserting a simple function call 324 * into the teadown sequence. 325 */ 326 327 struct action_devres { 328 void *data; 329 void (*action)(void *); 330 }; 331 332 static void devm_action_release(struct device *dev, void *res) 333 { 334 struct action_devres *devres = res; 335 336 devres->action(devres->data); 337 } 338 307 339 /** 308 340 * devm_add_action() - add a custom action to list of managed resources … … 316 348 int devm_add_action(struct device *dev, void (*action)(void *), void *data) 317 349 { 350 struct action_devres *devres; 351 352 devres = devres_alloc(devm_action_release, 353 sizeof(struct action_devres), GFP_KERNEL); 354 if (!devres) 355 return -ENOMEM; 356 357 devres->data = data; 358 devres->action = action; 359 360 devres_add(dev, devres); 361 318 362 return 0; 319 363 } … … 331 375 { 332 376 } 377 378 /* 379 * Managed kmalloc/kfree 380 */ 381 static void devm_kmalloc_release(struct device *dev, void *res) 382 { 383 /* noop */ 384 } 385 386 static int devm_kmalloc_match(struct device *dev, void *res, void *data) 387 { 388 return res == data; 389 } 390 391 /** 392 * devm_kmalloc - Resource-managed kmalloc 393 * @dev: Device to allocate memory for 394 * @size: Allocation size 395 * @gfp: Allocation gfp flags 396 * 397 * Managed kmalloc. Memory allocated with this function is 398 * automatically freed on driver detach. Like all other devres 399 * resources, guaranteed alignment is unsigned long long. 400 * 401 * RETURNS: 402 * Pointer to allocated memory on success, NULL on failure. 403 */ 404 void *devm_kmalloc(struct device *dev, size_t size, gfp_t gfp) 405 { 406 struct devres *dr; 407 408 if (unlikely(!size)) 409 return ZERO_SIZE_PTR; 410 411 /* use raw alloc_dr for kmalloc caller tracing */ 412 dr = alloc_dr(devm_kmalloc_release, size, gfp, dev_to_node(dev)); 413 if (unlikely(!dr)) 414 return NULL; 415 416 /* 417 * This is named devm_kzalloc_release for historical reasons 418 * The initial implementation did not support kmalloc, only kzalloc 419 */ 420 set_node_dbginfo(&dr->node, "devm_kzalloc_release", size); 421 devres_add(dev, dr->data); 422 return dr->data; 423 } 424 EXPORT_SYMBOL_GPL(devm_kmalloc); 425 426 enum devm_ioremap_type { 427 DEVM_IOREMAP = 0, 428 DEVM_IOREMAP_UC, 429 DEVM_IOREMAP_WC, 430 DEVM_IOREMAP_NP, 431 }; 432 433 void devm_ioremap_release(struct device *dev, void *res) 434 { 435 iounmap(*(void __iomem **)res); 436 } 437 438 static int devm_ioremap_match(struct device *dev, void *res, void *match_data) 439 { 440 return *(void **)res == match_data; 441 } 442 443 static void *__devm_ioremap(struct device *dev, resource_size_t offset, 444 resource_size_t size, 445 enum devm_ioremap_type type) 446 { 447 void __iomem **ptr, *addr = NULL; 448 449 ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL); 450 if (!ptr) 451 return NULL; 452 453 switch (type) { 454 case DEVM_IOREMAP: 455 addr = ioremap(offset, size); 456 break; 457 #if 0 458 case DEVM_IOREMAP_UC: 459 addr = ioremap_uc(offset, size); 460 break; 461 case DEVM_IOREMAP_WC: 462 addr = ioremap_wc(offset, size); 463 break; 464 case DEVM_IOREMAP_NP: 465 addr = ioremap_np(offset, size); 466 break; 467 #endif 468 } 469 470 if (addr) { 471 *ptr = addr; 472 devres_add(dev, ptr); 473 } else 474 devres_free(ptr); 475 476 return addr; 477 } 478 479 /** 480 * devm_ioremap - Managed ioremap() 481 * @dev: Generic device to remap IO address for 482 * @offset: Resource address to map 483 * @size: Size of map 484 * 485 * Managed ioremap(). Map is automatically unmapped on driver detach. 486 */ 487 void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, 488 resource_size_t size) 489 { 490 return __devm_ioremap(dev, offset, size, DEVM_IOREMAP); 491 } 492 EXPORT_SYMBOL(devm_ioremap); -
GPL/branches/uniaud32-next/lib32/driver.c
r716 r718 613 613 else if (drv->remove) 614 614 drv->remove(dev); 615 devres_release_all(dev);615 // devres_release_all(dev); 616 616 dev->driver = NULL; 617 617 klist_remove(&dev->p->knode_driver); -
GPL/branches/uniaud32-next/lib32/drivers_base.c
r625 r718 173 173 */ 174 174 drv = dev->driver; 175 #if 0 175 176 return drv ? drv->name : 176 177 (dev->bus ? dev->bus->name : 177 178 (dev->class ? dev->class->name : "")); 179 #else 180 return "uniaud32"; 181 #endif 178 182 } -
GPL/branches/uniaud32-next/lib32/irq.c
r604 r718 249 249 //****************************************************************************** 250 250 251 /* 252 * Device resource management aware IRQ request/free implementation. 253 */ 254 struct irq_devres { 255 unsigned int irq; 256 void *dev_id; 257 }; 258 259 static void devm_irq_release(struct device *dev, void *res) 260 { 261 struct irq_devres *this = res; 262 263 free_irq(this->irq, this->dev_id); 264 } 265 266 /** 267 * devm_request_threaded_irq - allocate an interrupt line for a managed device 268 * @dev: device to request interrupt for 269 * @irq: Interrupt line to allocate 270 * @handler: Function to be called when the IRQ occurs 271 * @thread_fn: function to be called in a threaded interrupt context. NULL 272 * for devices which handle everything in @handler 273 * @irqflags: Interrupt type flags 274 * @devname: An ascii name for the claiming device, dev_name(dev) if NULL 275 * @dev_id: A cookie passed back to the handler function 276 * 277 * Except for the extra @dev argument, this function takes the 278 * same arguments and performs the same function as 279 * request_threaded_irq(). IRQs requested with this function will be 280 * automatically freed on driver detach. 281 * 282 * If an IRQ allocated with this function needs to be freed 283 * separately, devm_free_irq() must be used. 284 */ 285 int devm_request_threaded_irq(struct device *dev, unsigned int irq, 286 irq_handler_t handler, irq_handler_t thread_fn, 287 unsigned long irqflags, const char *devname, 288 void *dev_id) 289 { 290 struct irq_devres *dr; 291 int rc; 292 293 dr = devres_alloc(devm_irq_release, sizeof(struct irq_devres), 294 GFP_KERNEL); 295 if (!dr) 296 return -ENOMEM; 297 298 if (!devname) 299 devname = dev_name(dev); 300 301 rc = request_irq(irq, handler, irqflags, devname, 302 dev_id); 303 if (rc) { 304 devres_free(dr); 305 return rc; 306 } 307 308 dr->irq = irq; 309 dr->dev_id = dev_id; 310 devres_add(dev, dr); 311 312 return 0; 313 } -
GPL/branches/uniaud32-next/lib32/pci.c
r713 r718 1180 1180 } 1181 1181 1182 struct region_devres { 1183 struct resource *parent; 1184 resource_size_t start; 1185 resource_size_t n; 1186 }; 1187 1188 static void devm_region_release(struct device *dev, void *res) 1189 { 1190 struct region_devres *this = res; 1191 1192 __release_region(this->parent, this->start, this->n); 1193 } 1194 1195 struct resource * 1196 __devm_request_region(struct device *dev, struct resource *parent, 1197 resource_size_t start, resource_size_t n, const char *name) 1198 { 1199 struct region_devres *dr = NULL; 1200 struct resource *res; 1201 1202 dr = devres_alloc(devm_region_release, sizeof(struct region_devres), 1203 GFP_KERNEL); 1204 if (!dr) 1205 return NULL; 1206 1207 dr->parent = parent; 1208 dr->start = start; 1209 dr->n = n; 1210 1211 res = __request_region(parent, start, n, name); 1212 if (res) 1213 devres_add(dev, dr); 1214 else 1215 devres_free(dr); 1216 1217 return res; 1218 } 1219 EXPORT_SYMBOL(__devm_request_region); -
GPL/branches/uniaud32-next/lib32/regcache.c
r652 r718 22 22 #include "internal.h" 23 23 24 staticconst struct regcache_ops *cache_types[] = {24 /*static*/ const struct regcache_ops *cache_types[] = { 25 25 ®cache_rbtree_ops, 26 26 #if IS_ENABLED(CONFIG_REGCACHE_COMPRESSED) … … 30 30 }; 31 31 32 staticint regcache_hw_init(struct regmap *map)32 /*static*/ int regcache_hw_init(struct regmap *map) 33 33 { 34 34 int i, j; … … 283 283 } 284 284 285 staticbool regcache_reg_needs_sync(struct regmap *map, unsigned int reg,285 /*static*/ bool regcache_reg_needs_sync(struct regmap *map, unsigned int reg, 286 286 unsigned int val) 287 287 { … … 299 299 } 300 300 301 staticint regcache_default_sync(struct regmap *map, unsigned int min,301 /*static*/ int regcache_default_sync(struct regmap *map, unsigned int min, 302 302 unsigned int max) 303 303 { … … 649 649 } 650 650 651 staticint regcache_default_cmp(const void *a, const void *b)651 /*static*/ int regcache_default_cmp(const void *a, const void *b) 652 652 { 653 653 const struct reg_default *_a = a; … … 674 674 } 675 675 676 staticbool regcache_reg_present(unsigned long *cache_present, unsigned int idx)676 /*static*/ bool regcache_reg_present(unsigned long *cache_present, unsigned int idx) 677 677 { 678 678 if (!cache_present) … … 682 682 } 683 683 684 staticint regcache_sync_block_single(struct regmap *map, void *block,684 /*static*/ int regcache_sync_block_single(struct regmap *map, void *block, 685 685 unsigned long *cache_present, 686 686 unsigned int block_base, … … 718 718 } 719 719 720 staticint regcache_sync_block_raw_flush(struct regmap *map, const void **data,720 /*static*/ int regcache_sync_block_raw_flush(struct regmap *map, const void **data, 721 721 unsigned int base, unsigned int cur) 722 722 { … … 746 746 } 747 747 748 staticint regcache_sync_block_raw(struct regmap *map, void *block,748 /*static*/ int regcache_sync_block_raw(struct regmap *map, void *block, 749 749 unsigned long *cache_present, 750 750 unsigned int block_base, unsigned int start, -
GPL/branches/uniaud32-next/lib32/regmap.c
r654 r718 45 45 46 46 #ifdef LOG_DEVICE 47 staticinline bool regmap_should_log(struct regmap *map)47 /*static*/ inline bool regmap_should_log(struct regmap *map) 48 48 { 49 49 return (map->dev && strcmp(dev_name(map->dev), LOG_DEVICE) == 0); 50 50 } 51 51 #else 52 staticinline bool regmap_should_log(struct regmap *map) { return false; }53 #endif 54 55 56 staticint _regmap_update_bits(struct regmap *map, unsigned int reg,52 /*static*/ inline bool regmap_should_log(struct regmap *map) { return false; } 53 #endif 54 55 56 /*static*/ int _regmap_update_bits(struct regmap *map, unsigned int reg, 57 57 unsigned int mask, unsigned int val, 58 58 bool *change, bool force_write); 59 59 60 staticint _regmap_bus_reg_read(void *context, unsigned int reg,60 /*static*/ int _regmap_bus_reg_read(void *context, unsigned int reg, 61 61 unsigned int *val); 62 staticint _regmap_bus_read(void *context, unsigned int reg,62 /*static*/ int _regmap_bus_read(void *context, unsigned int reg, 63 63 unsigned int *val); 64 staticint _regmap_bus_formatted_write(void *context, unsigned int reg,64 /*static*/ int _regmap_bus_formatted_write(void *context, unsigned int reg, 65 65 unsigned int val); 66 staticint _regmap_bus_reg_write(void *context, unsigned int reg,66 /*static*/ int _regmap_bus_reg_write(void *context, unsigned int reg, 67 67 unsigned int val); 68 staticint _regmap_bus_raw_write(void *context, unsigned int reg,68 /*static*/ int _regmap_bus_raw_write(void *context, unsigned int reg, 69 69 unsigned int val); 70 70 … … 209 209 } 210 210 211 staticbool regmap_volatile_range(struct regmap *map, unsigned int reg,211 /*static*/ bool regmap_volatile_range(struct regmap *map, unsigned int reg, 212 212 size_t num) 213 213 { … … 221 221 } 222 222 223 staticvoid regmap_format_12_20_write(struct regmap *map,223 /*static*/ void regmap_format_12_20_write(struct regmap *map, 224 224 unsigned int reg, unsigned int val) 225 225 { … … 233 233 234 234 235 staticvoid regmap_format_2_6_write(struct regmap *map,235 /*static*/ void regmap_format_2_6_write(struct regmap *map, 236 236 unsigned int reg, unsigned int val) 237 237 { … … 241 241 } 242 242 243 staticvoid regmap_format_4_12_write(struct regmap *map,243 /*static*/ void regmap_format_4_12_write(struct regmap *map, 244 244 unsigned int reg, unsigned int val) 245 245 { … … 248 248 } 249 249 250 staticvoid regmap_format_7_9_write(struct regmap *map,250 /*static*/ void regmap_format_7_9_write(struct regmap *map, 251 251 unsigned int reg, unsigned int val) 252 252 { … … 255 255 } 256 256 257 staticvoid regmap_format_10_14_write(struct regmap *map,257 /*static*/ void regmap_format_10_14_write(struct regmap *map, 258 258 unsigned int reg, unsigned int val) 259 259 { … … 265 265 } 266 266 267 staticvoid regmap_format_8(void *buf, unsigned int val, unsigned int shift)267 /*static*/ void regmap_format_8(void *buf, unsigned int val, unsigned int shift) 268 268 { 269 269 u8 *b = buf; … … 272 272 } 273 273 274 staticvoid regmap_format_16_be(void *buf, unsigned int val, unsigned int shift)274 /*static*/ void regmap_format_16_be(void *buf, unsigned int val, unsigned int shift) 275 275 { 276 276 put_unaligned_be16(val << shift, buf); 277 277 } 278 278 279 staticvoid regmap_format_16_le(void *buf, unsigned int val, unsigned int shift)279 /*static*/ void regmap_format_16_le(void *buf, unsigned int val, unsigned int shift) 280 280 { 281 281 put_unaligned_le16(val << shift, buf); 282 282 } 283 283 284 staticvoid regmap_format_16_native(void *buf, unsigned int val,284 /*static*/ void regmap_format_16_native(void *buf, unsigned int val, 285 285 unsigned int shift) 286 286 { … … 290 290 } 291 291 292 staticvoid regmap_format_24(void *buf, unsigned int val, unsigned int shift)292 /*static*/ void regmap_format_24(void *buf, unsigned int val, unsigned int shift) 293 293 { 294 294 u8 *b = buf; … … 301 301 } 302 302 303 staticvoid regmap_format_32_be(void *buf, unsigned int val, unsigned int shift)303 /*static*/ void regmap_format_32_be(void *buf, unsigned int val, unsigned int shift) 304 304 { 305 305 put_unaligned_be32(val << shift, buf); 306 306 } 307 307 308 staticvoid regmap_format_32_le(void *buf, unsigned int val, unsigned int shift)308 /*static*/ void regmap_format_32_le(void *buf, unsigned int val, unsigned int shift) 309 309 { 310 310 put_unaligned_le32(val << shift, buf); 311 311 } 312 312 313 staticvoid regmap_format_32_native(void *buf, unsigned int val,313 /*static*/ void regmap_format_32_native(void *buf, unsigned int val, 314 314 unsigned int shift) 315 315 { … … 320 320 321 321 #ifdef CONFIG_64BIT 322 staticvoid regmap_format_64_be(void *buf, unsigned int val, unsigned int shift)322 /*static*/ void regmap_format_64_be(void *buf, unsigned int val, unsigned int shift) 323 323 { 324 324 put_unaligned_be64((u64) val << shift, buf); 325 325 } 326 326 327 staticvoid regmap_format_64_le(void *buf, unsigned int val, unsigned int shift)327 /*static*/ void regmap_format_64_le(void *buf, unsigned int val, unsigned int shift) 328 328 { 329 329 put_unaligned_le64((u64) val << shift, buf); 330 330 } 331 331 332 staticvoid regmap_format_64_native(void *buf, unsigned int val,332 /*static*/ void regmap_format_64_native(void *buf, unsigned int val, 333 333 unsigned int shift) 334 334 { … … 339 339 #endif 340 340 341 staticvoid regmap_parse_inplace_noop(void *buf)342 { 343 } 344 345 staticunsigned int regmap_parse_8(const void *buf)341 /*static*/ void regmap_parse_inplace_noop(void *buf) 342 { 343 } 344 345 /*static*/ unsigned int regmap_parse_8(const void *buf) 346 346 { 347 347 const u8 *b = buf; … … 350 350 } 351 351 352 staticunsigned int regmap_parse_16_be(const void *buf)352 /*static*/ unsigned int regmap_parse_16_be(const void *buf) 353 353 { 354 354 return get_unaligned_be16(buf); 355 355 } 356 356 357 staticunsigned int regmap_parse_16_le(const void *buf)357 /*static*/ unsigned int regmap_parse_16_le(const void *buf) 358 358 { 359 359 return get_unaligned_le16(buf); 360 360 } 361 361 362 staticvoid regmap_parse_16_be_inplace(void *buf)362 /*static*/ void regmap_parse_16_be_inplace(void *buf) 363 363 { 364 364 u16 v = get_unaligned_be16(buf); … … 367 367 } 368 368 369 staticvoid regmap_parse_16_le_inplace(void *buf)369 /*static*/ void regmap_parse_16_le_inplace(void *buf) 370 370 { 371 371 u16 v = get_unaligned_le16(buf); … … 374 374 } 375 375 376 staticunsigned int regmap_parse_16_native(const void *buf)376 /*static*/ unsigned int regmap_parse_16_native(const void *buf) 377 377 { 378 378 u16 v; … … 382 382 } 383 383 384 staticunsigned int regmap_parse_24(const void *buf)384 /*static*/ unsigned int regmap_parse_24(const void *buf) 385 385 { 386 386 const u8 *b = buf; … … 392 392 } 393 393 394 staticunsigned int regmap_parse_32_be(const void *buf)394 /*static*/ unsigned int regmap_parse_32_be(const void *buf) 395 395 { 396 396 return get_unaligned_be32(buf); 397 397 } 398 398 399 staticunsigned int regmap_parse_32_le(const void *buf)399 /*static*/ unsigned int regmap_parse_32_le(const void *buf) 400 400 { 401 401 return get_unaligned_le32(buf); 402 402 } 403 403 404 staticvoid regmap_parse_32_be_inplace(void *buf)404 /*static*/ void regmap_parse_32_be_inplace(void *buf) 405 405 { 406 406 u32 v = get_unaligned_be32(buf); … … 409 409 } 410 410 411 staticvoid regmap_parse_32_le_inplace(void *buf)411 /*static*/ void regmap_parse_32_le_inplace(void *buf) 412 412 { 413 413 u32 v = get_unaligned_le32(buf); … … 416 416 } 417 417 418 staticunsigned int regmap_parse_32_native(const void *buf)418 /*static*/ unsigned int regmap_parse_32_native(const void *buf) 419 419 { 420 420 u32 v; … … 425 425 426 426 #ifdef CONFIG_64BIT 427 staticunsigned int regmap_parse_64_be(const void *buf)427 /*static*/ unsigned int regmap_parse_64_be(const void *buf) 428 428 { 429 429 return get_unaligned_be64(buf); 430 430 } 431 431 432 staticunsigned int regmap_parse_64_le(const void *buf)432 /*static*/ unsigned int regmap_parse_64_le(const void *buf) 433 433 { 434 434 return get_unaligned_le64(buf); 435 435 } 436 436 437 staticvoid regmap_parse_64_be_inplace(void *buf)437 /*static*/ void regmap_parse_64_be_inplace(void *buf) 438 438 { 439 439 u64 v = get_unaligned_be64(buf); … … 442 442 } 443 443 444 staticvoid regmap_parse_64_le_inplace(void *buf)444 /*static*/ void regmap_parse_64_le_inplace(void *buf) 445 445 { 446 446 u64 v = get_unaligned_le64(buf); … … 449 449 } 450 450 451 staticunsigned int regmap_parse_64_native(const void *buf)451 /*static*/ unsigned int regmap_parse_64_native(const void *buf) 452 452 { 453 453 u64 v; … … 458 458 #endif 459 459 460 staticvoid regmap_lock_hwlock(void *__map)460 /*static*/ void regmap_lock_hwlock(void *__map) 461 461 { 462 462 #ifndef TARGET_OS2 … … 467 467 } 468 468 469 staticvoid regmap_lock_hwlock_irq(void *__map)469 /*static*/ void regmap_lock_hwlock_irq(void *__map) 470 470 { 471 471 #ifndef TARGET_OS2 … … 476 476 } 477 477 478 staticvoid regmap_lock_hwlock_irqsave(void *__map)478 /*static*/ void regmap_lock_hwlock_irqsave(void *__map) 479 479 { 480 480 #ifndef TARGET_OS2 … … 486 486 } 487 487 488 staticvoid regmap_unlock_hwlock(void *__map)488 /*static*/ void regmap_unlock_hwlock(void *__map) 489 489 { 490 490 #ifndef TARGET_OS2 … … 495 495 } 496 496 497 staticvoid regmap_unlock_hwlock_irq(void *__map)497 /*static*/ void regmap_unlock_hwlock_irq(void *__map) 498 498 { 499 499 #ifndef TARGET_OS2 … … 504 504 } 505 505 506 staticvoid regmap_unlock_hwlock_irqrestore(void *__map)506 /*static*/ void regmap_unlock_hwlock_irqrestore(void *__map) 507 507 { 508 508 #ifndef TARGET_OS2 … … 513 513 } 514 514 515 staticvoid regmap_lock_unlock_none(void *__map)516 { 517 518 } 519 520 staticvoid regmap_lock_mutex(void *__map)515 /*static*/ void regmap_lock_unlock_none(void *__map) 516 { 517 518 } 519 520 /*static*/ void regmap_lock_mutex(void *__map) 521 521 { 522 522 struct regmap *map = __map; … … 524 524 } 525 525 526 staticvoid regmap_unlock_mutex(void *__map)526 /*static*/ void regmap_unlock_mutex(void *__map) 527 527 { 528 528 struct regmap *map = __map; … … 530 530 } 531 531 532 staticvoid regmap_lock_spinlock(void *__map)532 /*static*/ void regmap_lock_spinlock(void *__map) 533 533 __acquires(&map->spinlock) 534 534 { … … 540 540 } 541 541 542 staticvoid regmap_unlock_spinlock(void *__map)542 /*static*/ void regmap_unlock_spinlock(void *__map) 543 543 __releases(&map->spinlock) 544 544 { … … 547 547 } 548 548 549 staticvoid dev_get_regmap_release(struct device *dev, void *res)549 /*static*/ void dev_get_regmap_release(struct device *dev, void *res) 550 550 { 551 551 /* … … 556 556 } 557 557 558 staticbool _regmap_range_add(struct regmap *map,558 /*static*/ bool _regmap_range_add(struct regmap *map, 559 559 struct regmap_range_node *data) 560 560 { … … 581 581 } 582 582 583 staticstruct regmap_range_node *_regmap_range_lookup(struct regmap *map,583 /*static*/ struct regmap_range_node *_regmap_range_lookup(struct regmap *map, 584 584 unsigned int reg) 585 585 { … … 601 601 } 602 602 603 staticvoid regmap_range_exit(struct regmap *map)603 /*static*/ void regmap_range_exit(struct regmap *map) 604 604 { 605 605 struct rb_node *next; … … 617 617 } 618 618 619 staticint regmap_set_name(struct regmap *map, const struct regmap_config *config)619 /*static*/ int regmap_set_name(struct regmap *map, const struct regmap_config *config) 620 620 { 621 621 if (config->name) { … … 652 652 return ret; 653 653 654 regmap_debugfs_exit(map); 654 655 regmap_debugfs_init(map); 655 656 … … 667 668 EXPORT_SYMBOL_GPL(regmap_attach_dev); 668 669 669 staticenum regmap_endian regmap_get_reg_endian(const struct regmap_bus *bus,670 /*static*/ enum regmap_endian regmap_get_reg_endian(const struct regmap_bus *bus, 670 671 const struct regmap_config *config) 671 672 { … … 1251 1252 1252 1253 #ifndef TARGET_OS2 1253 staticvoid devm_regmap_release(struct device *dev, void *res)1254 /*static*/ void devm_regmap_release(struct device *dev, void *res) 1254 1255 { 1255 1256 regmap_exit(*(struct regmap **)res); … … 1283 1284 #endif 1284 1285 1285 staticvoid regmap_field_init(struct regmap_field *rm_field,1286 /*static*/ void regmap_field_init(struct regmap_field *rm_field, 1286 1287 struct regmap *regmap, struct reg_field reg_field) 1287 1288 { … … 1561 1562 EXPORT_SYMBOL_GPL(regmap_exit); 1562 1563 1563 staticint dev_get_regmap_match(struct device *dev, void *res, void *data)1564 /*static*/ int dev_get_regmap_match(struct device *dev, void *res, void *data) 1564 1565 { 1565 1566 struct regmap **r = res; … … 1612 1613 EXPORT_SYMBOL_GPL(regmap_get_device); 1613 1614 1614 staticint _regmap_select_page(struct regmap *map, unsigned int *reg,1615 /*static*/ int _regmap_select_page(struct regmap *map, unsigned int *reg, 1615 1616 struct regmap_range_node *range, 1616 1617 unsigned int val_num) … … 1660 1661 } 1661 1662 1662 staticvoid regmap_set_work_buf_flag_mask(struct regmap *map, int max_bytes,1663 /*static*/ void regmap_set_work_buf_flag_mask(struct regmap *map, int max_bytes, 1663 1664 unsigned long mask) 1664 1665 { … … 1675 1676 } 1676 1677 1677 staticint _regmap_raw_write_impl(struct regmap *map, unsigned int reg,1678 /*static*/ int _regmap_raw_write_impl(struct regmap *map, unsigned int reg, 1678 1679 const void *val, size_t val_len, bool noinc) 1679 1680 { … … 1902 1903 EXPORT_SYMBOL_GPL(regmap_get_raw_write_max); 1903 1904 1904 staticint _regmap_bus_formatted_write(void *context, unsigned int reg,1905 /*static*/ int _regmap_bus_formatted_write(void *context, unsigned int reg, 1905 1906 unsigned int val) 1906 1907 { … … 1926 1927 } 1927 1928 1928 staticint _regmap_bus_reg_write(void *context, unsigned int reg,1929 /*static*/ int _regmap_bus_reg_write(void *context, unsigned int reg, 1929 1930 unsigned int val) 1930 1931 { … … 1934 1935 } 1935 1936 1936 staticint _regmap_bus_raw_write(void *context, unsigned int reg,1937 /*static*/ int _regmap_bus_raw_write(void *context, unsigned int reg, 1937 1938 unsigned int val) 1938 1939 { … … 1951 1952 } 1952 1953 1953 staticinline void *_regmap_map_get_context(struct regmap *map)1954 /*static*/ inline void *_regmap_map_get_context(struct regmap *map) 1954 1955 { 1955 1956 return (map->bus) ? map : map->bus_context; … … 2325 2326 * relative. The page register has been written if that was necessary. 2326 2327 */ 2327 staticint _regmap_raw_multi_reg_write(struct regmap *map,2328 /*static*/ int _regmap_raw_multi_reg_write(struct regmap *map, 2328 2329 const struct reg_sequence *regs, 2329 2330 size_t num_regs) … … 2374 2375 } 2375 2376 2376 staticunsigned int _regmap_register_page(struct regmap *map,2377 /*static*/ unsigned int _regmap_register_page(struct regmap *map, 2377 2378 unsigned int reg, 2378 2379 struct regmap_range_node *range) … … 2383 2384 } 2384 2385 2385 staticint _regmap_range_multi_paged_reg_write(struct regmap *map,2386 /*static*/ int _regmap_range_multi_paged_reg_write(struct regmap *map, 2386 2387 struct reg_sequence *regs, 2387 2388 size_t num_regs) … … 2466 2467 } 2467 2468 2468 staticint _regmap_multi_reg_write(struct regmap *map,2469 /*static*/ int _regmap_multi_reg_write(struct regmap *map, 2469 2470 const struct reg_sequence *regs, 2470 2471 size_t num_regs) … … 2667 2668 EXPORT_SYMBOL_GPL(regmap_raw_write_async); 2668 2669 2669 staticint _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,2670 /*static*/ int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val, 2670 2671 unsigned int val_len, bool noinc) 2671 2672 { … … 2697 2698 } 2698 2699 2699 staticint _regmap_bus_reg_read(void *context, unsigned int reg,2700 /*static*/ int _regmap_bus_reg_read(void *context, unsigned int reg, 2700 2701 unsigned int *val) 2701 2702 { … … 2705 2706 } 2706 2707 2707 staticint _regmap_bus_read(void *context, unsigned int reg,2708 /*static*/ int _regmap_bus_read(void *context, unsigned int reg, 2708 2709 unsigned int *val) 2709 2710 { … … 2723 2724 } 2724 2725 2725 staticint _regmap_read(struct regmap *map, unsigned int reg,2726 /*static*/ int _regmap_read(struct regmap *map, unsigned int reg, 2726 2727 unsigned int *val) 2727 2728 { … … 3064 3065 EXPORT_SYMBOL_GPL(regmap_bulk_read); 3065 3066 3066 staticint _regmap_update_bits(struct regmap *map, unsigned int reg,3067 /*static*/ int _regmap_update_bits(struct regmap *map, unsigned int reg, 3067 3068 unsigned int mask, unsigned int val, 3068 3069 bool *change, bool force_write) … … 3181 3182 3182 3183 #ifndef TARGET_OS2 3183 staticint regmap_async_is_done(struct regmap *map)3184 /*static*/ int regmap_async_is_done(struct regmap *map) 3184 3185 { 3185 3186 unsigned long flags; … … 3345 3346 EXPORT_SYMBOL_GPL(regmap_parse_val); 3346 3347 3347 staticint __init regmap_initcall(void)3348 /*static*/ int __init regmap_initcall(void) 3348 3349 { 3349 3350 regmap_debugfs_initcall();
Note:
See TracChangeset
for help on using the changeset viewer.