From: Thierry Reding <thierry.reding@gmail.com>
To: Jim Lin <jilin@nvidia.com>
Cc: gregkh@linuxfoundation.org, jonathanh@nvidia.com,
mathias.nyman@intel.com, linux-usb@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] xhci: tegra: USB2 pad power controls
Date: Mon, 17 Oct 2022 14:43:51 +0200 [thread overview]
Message-ID: <Y01OBzmcwKxbw1yx@orome> (raw)
In-Reply-To: <20221017122531.9923-1-jilin@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]
On Mon, Oct 17, 2022 at 08:25:31PM +0800, Jim Lin wrote:
> Program USB2 pad PD controls during port connect/disconnect, port
> suspend/resume, and test mode, to reduce power consumption on
> disconnect or suspend.
>
> Signed-off-by: Jim Lin <jilin@nvidia.com>
> ---
> v2: Fix issue that wrong tegra->phys[] may be accessed on tegra124
> v3: No change on copyright
> v4: Remove hcd_to_tegra_xusb() function which is used only once.
>
> drivers/usb/host/xhci-tegra.c | 134 +++++++++++++++++++++++++++++++++-
> 1 file changed, 133 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
[...]
> @@ -2444,6 +2574,8 @@ static const struct xhci_driver_overrides tegra_xhci_overrides __initconst = {
> static int __init tegra_xusb_init(void)
> {
> xhci_init_driver(&tegra_xhci_hc_driver, &tegra_xhci_overrides);
> + original_xhci_hub_control = tegra_xhci_hc_driver.hub_control;
> + tegra_xhci_hc_driver.hub_control = tegra_xhci_hub_control;
This whole business seems a bit exotic to me. Perhaps a better solution
would be to EXPORT_SYMBOL_GPL(xhci_hub_control) and then call that
directly where needed instead of this indirection? At the same time, it
might be a good idea to add a new hub_control to xhci_driver_overrides
so that this can be automatically set within xhci_init_driver() rather
than having to be done explicitly.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-10-17 12:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 12:25 [PATCH v4] xhci: tegra: USB2 pad power controls Jim Lin
2022-10-17 12:43 ` Thierry Reding [this message]
2022-10-17 14:14 ` Greg KH
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=Y01OBzmcwKxbw1yx@orome \
--to=thierry.reding@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jilin@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.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