From: Peng Fan <peng.fan@nxp.com>
To: Ulf Hansson <ulf.hansson@linaro.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Pavel Machek <pavel@kernel.org>,
Peter Chen <peter.chen@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Xu Yang <xu.yang_2@nxp.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, imx@lists.linux.dev,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Peng Fan <peng.fan@nxp.com>
Subject: [PATCH v3 2/4] usb: chipidea: core: detach power domain for ci_hdrc platform device
Date: Tue, 02 Sep 2025 11:33:01 +0800 [thread overview]
Message-ID: <20250902-pm-v3-2-ffadbb454cdc@nxp.com> (raw)
In-Reply-To: <20250902-pm-v3-0-ffadbb454cdc@nxp.com>
From: Xu Yang <xu.yang_2@nxp.com>
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.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
drivers/usb/chipidea/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 694b4a8e4e1d8583dcbf4a42f8c2dfd785d5745c..70597f40b9997a9766934c67bbbed38e96c210f8 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -27,6 +27,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
#include <linux/pinctrl/consumer.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
@@ -915,6 +916,8 @@ struct platform_device *ci_hdrc_add_device(struct device *dev,
if (ret)
goto err;
+ dev_pm_domain_detach(&pdev->dev, false);
+
return pdev;
err:
--
2.37.1
next prev parent reply other threads:[~2025-09-02 3:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 3:32 [PATCH v3 0/4] pmdomain: core: Introduce device_set/get_out_band_wakeup and use it in usb Peng Fan
2025-09-02 3:33 ` [PATCH v3 1/4] pmdomain: core: Introduce device_set/get_out_band_wakeup() Peng Fan
2025-09-02 8:53 ` Xu Yang
2025-09-02 3:33 ` Peng Fan [this message]
2025-09-02 8:54 ` [PATCH v3 2/4] usb: chipidea: core: detach power domain for ci_hdrc platform device Xu Yang
2025-09-02 3:33 ` [PATCH v3 3/4] usb: chipidea: ci_hdrc_imx: Set out of band wakeup for i.MX95 Peng Fan
2025-09-02 8:55 ` Xu Yang
2025-09-02 3:33 ` [PATCH v3 4/4] usb: dwc3: imx8mp: " Peng Fan
2025-09-02 8:56 ` Xu Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250902-pm-v3-2-ffadbb454cdc@nxp.com \
--to=peng.fan@nxp.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=arm-scmi@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=lenb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=peter.chen@kernel.org \
--cc=rafael@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=xu.yang_2@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).