[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y01OBzmcwKxbw1yx@orome>
Date: Mon, 17 Oct 2022 14:43:51 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Jim Lin <jilin@...dia.com>
Cc: gregkh@...uxfoundation.org, jonathanh@...dia.com,
mathias.nyman@...el.com, linux-usb@...r.kernel.org,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] xhci: tegra: USB2 pad power controls
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@...dia.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
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists