Commit dc6ce56
power: supply: ab8500: Use iio_read_channel_processed_scale()
Instead of rescaling current or voltage channels after the fact, use the
dedicated scaling API. This should reduce any inaccuracies resulting from
the scaling.
This is also slightly more efficient as it saves a function call and a
multiplication.
Signed-off-by: Christophe JAILLET <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/5668d73b92eb6318c7f094a9a8fa914c909485ca.1719037737.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sebastian Reichel <[email protected]>1 parent 3288757 commit dc6ce56
1 file changed
+16
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
498 | | - | |
499 | | - | |
| 500 | + | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
| |||
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
544 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
545 | 548 | | |
546 | 549 | | |
547 | 550 | | |
548 | 551 | | |
549 | 552 | | |
550 | 553 | | |
551 | 554 | | |
552 | | - | |
553 | | - | |
| 555 | + | |
554 | 556 | | |
555 | 557 | | |
556 | 558 | | |
| |||
566 | 568 | | |
567 | 569 | | |
568 | 570 | | |
569 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
570 | 574 | | |
571 | 575 | | |
572 | 576 | | |
573 | 577 | | |
574 | 578 | | |
575 | 579 | | |
576 | 580 | | |
577 | | - | |
578 | | - | |
| 581 | + | |
579 | 582 | | |
580 | 583 | | |
581 | 584 | | |
| |||
591 | 594 | | |
592 | 595 | | |
593 | 596 | | |
594 | | - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
595 | 600 | | |
596 | 601 | | |
597 | 602 | | |
598 | 603 | | |
599 | 604 | | |
600 | 605 | | |
601 | 606 | | |
602 | | - | |
603 | | - | |
| 607 | + | |
604 | 608 | | |
605 | 609 | | |
606 | 610 | | |
| |||
0 commit comments