Re: [PATCH v4] xhci: tegra: USB2 pad power controls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
> 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: signature.asc
Description: PGP signature


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux