Commit 7ea43be
iio: adc: ingenic-adc: refactor ingenic_adc_read_chan_info_raw()
Extract the sample logic from ingenic_adc_read_chan_info_raw() into
a new helper function __ingenic_adc_read_chan() to improve code
readability and modularity.
The helper handles the mutex-protected section for sampling channels,
while the main function manages mutex and clock enabling/disabling.
Signed-off-by: Felipe Ribeiro de Souza <felipers@ime.usp.br>
Co-developed-by: Lucas Ivars Cadima Ciziks <lucas@ciziks.com>
Signed-off-by: Lucas Ivars Cadima Ciziks <lucas@ciziks.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>1 parent a3c9f67 commit 7ea43be
1 file changed
Lines changed: 24 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
632 | | - | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
633 | 633 | | |
634 | 634 | | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | 635 | | |
644 | | - | |
645 | | - | |
646 | 636 | | |
647 | 637 | | |
648 | 638 | | |
| |||
661 | 651 | | |
662 | 652 | | |
663 | 653 | | |
664 | | - | |
| 654 | + | |
665 | 655 | | |
666 | 656 | | |
667 | 657 | | |
| |||
674 | 664 | | |
675 | 665 | | |
676 | 666 | | |
677 | | - | |
678 | | - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
679 | 686 | | |
| 687 | + | |
680 | 688 | | |
681 | 689 | | |
682 | 690 | | |
| |||
0 commit comments