usb: cdns3: imx: Rework system PM to avoid duplicated operations
authorShenwei Wang <shenwei.wang@nxp.com>
Tue, 23 May 2023 18:44:12 +0000 (13:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 May 2023 14:53:48 +0000 (15:53 +0100)
commitdb3c4e366287cc2ed7b15e74a85bc5a12f5be4b8
tree01b1f96c0043f0a5132ed71f41255a852b39408a
parent622cc875dd2b1e560235e85726c818e58d3541ef
usb: cdns3: imx: Rework system PM to avoid duplicated operations

The current implementation uses the same callbacks for system PM and
runtime PM suspend/resume without any state checking. This can cause the
clocks to be prepared/unprepared twice, leading to kernel warning issues.

This patch resolves the double prepare/unprepare issues by separating the
runtime PM and system PM handling.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
Link: https://lore.kernel.org/r/20230523184412.204582-1-shenwei.wang@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdns3-imx.c