lkml.org 
[lkml]   [2022]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-10-17 14:45    [W:0.041 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site