Skip to content

Commit dfdcfc1

Browse files
Xu YangUlf Hansson
authored andcommitted
usb: chipidea: core: detach power domain for ci_hdrc platform device
When add a platform device by calling ci_hdrc_add_device(), this device will reuse OF node of its parent device. If power-domains property is provided in the OF node, both two platform devices will be attached to the same power domain. This should be unnecessary and may bring other inconsistent behavior. For example, to support wakeup capability, these two platform device need different power domain state. The parent device need NOT power domain on for out-band interrupt, but the ci_hdrc device need power domain on for in-band interrupt. The i.MX95 Soc support out-band wakeup interrupt, the user need to enable wakeup for the parent device, but if the user also enable wakeup for ci_hdrc device, the power domain will keep at on state finally. To exclude such inconsistent behavior and simplify the power management, detach power domain for ci_hdrc platform device. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Peter Chen <peter.chen@kernel.org> Tested-by: Xu Yang <xu.yang_2@nxp.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 3b7685d commit dfdcfc1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/usb/chipidea/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/kernel.h>
2828
#include <linux/slab.h>
2929
#include <linux/pm_runtime.h>
30+
#include <linux/pm_domain.h>
3031
#include <linux/pinctrl/consumer.h>
3132
#include <linux/usb/ch9.h>
3233
#include <linux/usb/gadget.h>
@@ -915,6 +916,8 @@ struct platform_device *ci_hdrc_add_device(struct device *dev,
915916
if (ret)
916917
goto err;
917918

919+
dev_pm_domain_detach(&pdev->dev, false);
920+
918921
return pdev;
919922

920923
err:

0 commit comments

Comments
 (0)