Changeset 724
- Timestamp:
- Sep 4, 2022, 11:22:12 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-next/lib32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/lib32/regcache.c
r721 r724 22 22 #include "internal.h" 23 23 24 /*static*/const 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 /*static*/int 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 /*static*/bool 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 /*static*/int 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 /*static*/int 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 /*static*/bool 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 /*static*/int 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 /*static*/int 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 /*static*/int 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
r721 r724 45 45 46 46 #ifdef LOG_DEVICE 47 /*static*/inline 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 /*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,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 /*static*/int _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 /*static*/int _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 /*static*/int _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 /*static*/int _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 /*static*/int _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 /*static*/bool 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void regmap_parse_inplace_noop(void *buf)342 { 343 } 344 345 /*static*/unsigned 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 /*static*/unsigned 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 /*static*/unsigned 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 /*static*/void 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 /*static*/void 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 /*static*/unsigned 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 /*static*/unsigned 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 /*static*/unsigned 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 /*static*/unsigned 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 /*static*/void 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 /*static*/void 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 /*static*/unsigned 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 /*static*/unsigned 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 /*static*/unsigned 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 /*static*/void 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 /*static*/void 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 /*static*/unsigned 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void regmap_lock_unlock_none(void *__map)516 { 517 518 } 519 520 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/void 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 /*static*/bool _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 /*static*/struct 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 /*static*/void 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 /*static*/int 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) { … … 668 668 EXPORT_SYMBOL_GPL(regmap_attach_dev); 669 669 670 /*static*/enum 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, 671 671 const struct regmap_config *config) 672 672 { … … 1252 1252 1253 1253 #ifndef TARGET_OS2 1254 /*static*/void devm_regmap_release(struct device *dev, void *res)1254 static void devm_regmap_release(struct device *dev, void *res) 1255 1255 { 1256 1256 regmap_exit(*(struct regmap **)res); … … 1284 1284 #endif 1285 1285 1286 /*static*/void regmap_field_init(struct regmap_field *rm_field,1286 static void regmap_field_init(struct regmap_field *rm_field, 1287 1287 struct regmap *regmap, struct reg_field reg_field) 1288 1288 { … … 1562 1562 EXPORT_SYMBOL_GPL(regmap_exit); 1563 1563 1564 /*static*/int 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) 1565 1565 { 1566 1566 struct regmap **r = res; … … 1613 1613 EXPORT_SYMBOL_GPL(regmap_get_device); 1614 1614 1615 /*static*/int _regmap_select_page(struct regmap *map, unsigned int *reg,1615 static int _regmap_select_page(struct regmap *map, unsigned int *reg, 1616 1616 struct regmap_range_node *range, 1617 1617 unsigned int val_num) … … 1661 1661 } 1662 1662 1663 /*static*/void 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, 1664 1664 unsigned long mask) 1665 1665 { … … 1676 1676 } 1677 1677 1678 /*static*/int _regmap_raw_write_impl(struct regmap *map, unsigned int reg,1678 static int _regmap_raw_write_impl(struct regmap *map, unsigned int reg, 1679 1679 const void *val, size_t val_len, bool noinc) 1680 1680 { … … 1903 1903 EXPORT_SYMBOL_GPL(regmap_get_raw_write_max); 1904 1904 1905 /*static*/int _regmap_bus_formatted_write(void *context, unsigned int reg,1905 static int _regmap_bus_formatted_write(void *context, unsigned int reg, 1906 1906 unsigned int val) 1907 1907 { … … 1927 1927 } 1928 1928 1929 /*static*/int _regmap_bus_reg_write(void *context, unsigned int reg,1929 static int _regmap_bus_reg_write(void *context, unsigned int reg, 1930 1930 unsigned int val) 1931 1931 { … … 1935 1935 } 1936 1936 1937 /*static*/int _regmap_bus_raw_write(void *context, unsigned int reg,1937 static int _regmap_bus_raw_write(void *context, unsigned int reg, 1938 1938 unsigned int val) 1939 1939 { … … 1952 1952 } 1953 1953 1954 /*static*/inline void *_regmap_map_get_context(struct regmap *map)1954 static inline void *_regmap_map_get_context(struct regmap *map) 1955 1955 { 1956 1956 return (map->bus) ? map : map->bus_context; … … 2326 2326 * relative. The page register has been written if that was necessary. 2327 2327 */ 2328 /*static*/int _regmap_raw_multi_reg_write(struct regmap *map,2328 static int _regmap_raw_multi_reg_write(struct regmap *map, 2329 2329 const struct reg_sequence *regs, 2330 2330 size_t num_regs) … … 2375 2375 } 2376 2376 2377 /*static*/unsigned int _regmap_register_page(struct regmap *map,2377 static unsigned int _regmap_register_page(struct regmap *map, 2378 2378 unsigned int reg, 2379 2379 struct regmap_range_node *range) … … 2384 2384 } 2385 2385 2386 /*static*/int _regmap_range_multi_paged_reg_write(struct regmap *map,2386 static int _regmap_range_multi_paged_reg_write(struct regmap *map, 2387 2387 struct reg_sequence *regs, 2388 2388 size_t num_regs) … … 2467 2467 } 2468 2468 2469 /*static*/int _regmap_multi_reg_write(struct regmap *map,2469 static int _regmap_multi_reg_write(struct regmap *map, 2470 2470 const struct reg_sequence *regs, 2471 2471 size_t num_regs) … … 2668 2668 EXPORT_SYMBOL_GPL(regmap_raw_write_async); 2669 2669 2670 /*static*/int _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, 2671 2671 unsigned int val_len, bool noinc) 2672 2672 { … … 2698 2698 } 2699 2699 2700 /*static*/int _regmap_bus_reg_read(void *context, unsigned int reg,2700 static int _regmap_bus_reg_read(void *context, unsigned int reg, 2701 2701 unsigned int *val) 2702 2702 { … … 2706 2706 } 2707 2707 2708 /*static*/int _regmap_bus_read(void *context, unsigned int reg,2708 static int _regmap_bus_read(void *context, unsigned int reg, 2709 2709 unsigned int *val) 2710 2710 { … … 2724 2724 } 2725 2725 2726 /*static*/int _regmap_read(struct regmap *map, unsigned int reg,2726 static int _regmap_read(struct regmap *map, unsigned int reg, 2727 2727 unsigned int *val) 2728 2728 { … … 3065 3065 EXPORT_SYMBOL_GPL(regmap_bulk_read); 3066 3066 3067 /*static*/int _regmap_update_bits(struct regmap *map, unsigned int reg,3067 static int _regmap_update_bits(struct regmap *map, unsigned int reg, 3068 3068 unsigned int mask, unsigned int val, 3069 3069 bool *change, bool force_write) … … 3182 3182 3183 3183 #ifndef TARGET_OS2 3184 /*static*/int regmap_async_is_done(struct regmap *map)3184 static int regmap_async_is_done(struct regmap *map) 3185 3185 { 3186 3186 unsigned long flags; … … 3346 3346 EXPORT_SYMBOL_GPL(regmap_parse_val); 3347 3347 3348 /*static*/int __init regmap_initcall(void)3348 static int __init regmap_initcall(void) 3349 3349 { 3350 3350 regmap_debugfs_initcall();
Note:
See TracChangeset
for help on using the changeset viewer.