From: Peter Chen <peter.chen@nxp.com>
To: "mathias.nyman@intel.com" <mathias.nyman@intel.com>,
"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [RESEND PATCH 5/7] usb: host: xhci-plat: initialize device wakeup default enabled
Date: Fri, 14 Aug 2020 06:25:04 +0000 [thread overview]
Message-ID: <20200814062412.GC22554@b29397-desktop> (raw)
In-Reply-To: <20200813033741.13982-6-peter.chen@nxp.com>
On 20-08-13 11:37:39, Peter Chen wrote:
> It initializes the controller wakeup setting as default enabled
> unless the user changes it, whether the controller responds
> the wakeup event depends on roothub's wakeup setting since the
> wakeup occurs at the bus not the controller itself.
>
> With this change, the controller uses this driver could have
> wakeup capability due to device_may_wakeup(dev) at xhci_plat_suspend
> is default true; without this change, this value is always false.
>
> Reviewed-by: Jun Li <jun.li@nxp.com>
> Suggested-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/usb/host/xhci-plat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
> index 14ff65a387e8..0ef28b2caea3 100644
> --- a/drivers/usb/host/xhci-plat.c
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -287,7 +287,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
> *priv = *priv_match;
> }
>
> - device_wakeup_enable(hcd->self.controller);
> + device_init_wakeup(hcd->self.controller, true);
Hi Alan,
We may can't set the wakeup enabled as default value since it will
affect the parent's wakeup setting. See function:
dpm_propagate_wakeup_to_parent at drivers/base/power/main.c.
The parent's wakeup_path is set as true during the system
system routine, then the power domain for the parent will not be
off (See genpd_finish_suspend) after system suspend, it does not
meet design expectation. The expectation is the device's power
domain is only on if the device as wakeup source.
Even with host-only use case, the thing is the same. If wakeup enabled
as default, the related power domain will be on during the system
suspend no matter the wakeup is really wanted.
Do you agree I set the wakeup default value as disabled?
--
Thanks,
Peter Chen
next prev parent reply other threads:[~2020-08-14 6:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 3:37 [RESEND PATCH 0/7] usb: host: xhci: some changes for xhci-plat.c Peter Chen
2020-08-13 3:37 ` [RESEND PATCH 1/7] usb: host: xhci-plat: add platform data support Peter Chen
2020-08-13 3:37 ` [RESEND PATCH 2/7] usb: host: xhci-plat: add .suspend_quirk for struct xhci_plat_priv Peter Chen
2020-08-13 3:37 ` [RESEND PATCH 3/7] usb: host: xhci-plat: delete the unnecessary code Peter Chen
2020-08-13 3:37 ` [RESEND PATCH 4/7] usb: host: xhci-plat: add priv quirk for skip PHY initialization Peter Chen
2020-08-13 3:37 ` [RESEND PATCH 5/7] usb: host: xhci-plat: initialize device wakeup default enabled Peter Chen
2020-08-14 6:25 ` Peter Chen [this message]
2020-08-14 14:57 ` stern
2020-08-13 3:37 ` [RESEND PATCH 6/7] usb: host: xhci-plat: improve the comments for xhci_plat_suspend Peter Chen
2020-08-13 3:37 ` [RESEND PATCH 7/7] usb: host: xhci: avoid calling contineous two times for xhci_suspend Peter Chen
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=20200814062412.GC22554@b29397-desktop \
--to=peter.chen@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-imx@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=stern@rowland.harvard.edu \
/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