MLK-20343 usb: chipidea: udc: using structure ci_hdrc device for runtime PM
authorPeter Chen <peter.chen@nxp.com>
Wed, 14 Nov 2018 08:43:52 +0000 (16:43 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit6f4f1feb0cd9206b9ce84bb5974e41a99594700d
tree231c56ef378ae09204542f654b01094e2198decf
parent97592983d456dcaf97b904287c4f358849958fd7
MLK-20343 usb: chipidea: udc: using structure ci_hdrc device for runtime PM

At current code, it doesn't maintain ci->gadget.dev's runtime PM
status well. Eg, after system resume, call pm_runtime_put_sync for
ci->dev will cause ci->dev's runtime suspend is called if its
power.usage is 0 even the power.usage is 1 for its child ci->gadget.dev.
at that time. It causes the oops this ticket describes that visiting
clock without AHB clock.

To fix this issue, we use ci_hdrc device instead of ci->gadget.dev
for runtime PM APIs at udc driver, in the way, we handle runtime
PM APIs for single device structure.

Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
(cherry picked from commit d436b3a0a81b073b195d0ad29e7a4f39a1a532f3)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
drivers/usb/chipidea/udc.c