Changeset 718 for GPL/branches/uniaud32-next/lib32/regmap.c
- Timestamp:
- Sep 2, 2022, 4:26:36 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.