media: imx: imx8mq-mipi_csi2: fix system resume
authorMartin Kepplinger <martin.kepplinger@puri.sm>
Thu, 16 Dec 2021 09:03:36 +0000 (10:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:13 +0000 (14:23 +0200)
commite1854a6c3a68deb185d9c90d32f7ad495518e577
treeff98d77225b1085607ecf977e72252bbed14d58d
parent72d79cd3c3ad04b8fc67f4d34db7624f1193d495
media: imx: imx8mq-mipi_csi2: fix system resume

[ Upstream commit f0c2ba1ed4ad868331d8c6ea9119669a729b01a9 ]

during system resume, interconnect bandwidth would currently be requested
even though the device is runtime suspended. This leaves the system in an
unbalanced state.

Fix that by only doing that in runtimem pm and splitting up runtime and
system suspend to be a more readable:
imx8mq_mipi_csi_pm_*() does the generic things called from system- and
runtime functions that each do specific things on top.

Fixes: f33fd8d77dd0 ("media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller")
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/imx/imx8mq-mipi-csi2.c