media: sun6i-csi: Use runtime pm for clocks and reset
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fri, 26 Aug 2022 18:32:03 +0000 (20:32 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 09:21:45 +0000 (11:21 +0200)
commit69b80659a728b99b868518b975d00f25ea70ec21
tree906fcd23b8566650e4daff612d0cd4ae7fd22160
parentbc67ec9e1348d94ead4e4704ca79e7a4bc97fac3
media: sun6i-csi: Use runtime pm for clocks and reset

Wrap the clock and reset preparation into runtime pm functions
for better organization of the code. Also fix the clock and
reset enable order to first deassert reset, as recommended in
Allwinner literature.

Make the driver depend on PM while at it since runtime pm is
mandatory for the driver to work.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/sunxi/sun6i-csi/Kconfig
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c