Commit 2d90ecd
ASoC: rockchip: i2s: Use managed hclk and runtime PM cleanup
The Rockchip I2S driver mixes devm-managed probe resources with manual
runtime PM and hclk cleanup. This leaves the remove path doing runtime PM
shutdown and clock disable before devm-managed ASoC and PCM resources are
released.
Keep the bus clock enabled for the device lifetime with
devm_clk_get_enabled(), and move the runtime PM teardown into devres so the
unwind order matches the managed registrations. This also removes the
remove callback, which only existed for cleanup.
Use a devm action for the final runtime suspend and register it before the
managed runtime PM action, so teardown disables runtime PM before forcing
the device into the suspended state.
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260521-asoc-rockchip-i2s-devm-cleanup-v1-1-9319bd781393@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent cab82ca commit 2d90ecd
1 file changed
Lines changed: 26 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
667 | 675 | | |
668 | 676 | | |
669 | 677 | | |
| |||
758 | 766 | | |
759 | 767 | | |
760 | 768 | | |
761 | | - | |
| 769 | + | |
762 | 770 | | |
763 | 771 | | |
764 | 772 | | |
765 | 773 | | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | 774 | | |
772 | 775 | | |
773 | 776 | | |
774 | 777 | | |
775 | | - | |
776 | | - | |
| 778 | + | |
777 | 779 | | |
778 | 780 | | |
779 | 781 | | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
| 782 | + | |
| 783 | + | |
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
790 | | - | |
791 | | - | |
| 790 | + | |
792 | 791 | | |
793 | 792 | | |
794 | 793 | | |
| |||
799 | 798 | | |
800 | 799 | | |
801 | 800 | | |
802 | | - | |
803 | | - | |
| 801 | + | |
804 | 802 | | |
805 | 803 | | |
806 | 804 | | |
| |||
811 | 809 | | |
812 | 810 | | |
813 | 811 | | |
814 | | - | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
815 | 820 | | |
816 | 821 | | |
817 | 822 | | |
818 | | - | |
| 823 | + | |
819 | 824 | | |
820 | 825 | | |
821 | 826 | | |
822 | 827 | | |
823 | | - | |
| 828 | + | |
824 | 829 | | |
825 | 830 | | |
826 | 831 | | |
827 | 832 | | |
828 | 833 | | |
829 | 834 | | |
830 | 835 | | |
831 | | - | |
| 836 | + | |
832 | 837 | | |
833 | 838 | | |
834 | 839 | | |
835 | 840 | | |
836 | 841 | | |
837 | | - | |
| 842 | + | |
838 | 843 | | |
839 | 844 | | |
840 | 845 | | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | 846 | | |
862 | 847 | | |
863 | 848 | | |
| |||
866 | 851 | | |
867 | 852 | | |
868 | 853 | | |
869 | | - | |
870 | 854 | | |
871 | 855 | | |
872 | 856 | | |
| |||
0 commit comments