From: Jim Lin <jilin@nvidia.com>
To: <mathias.nyman@intel.com>, <gregkh@linuxfoundation.org>,
<thierry.reding@gmail.com>, <jonathanh@nvidia.com>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-tegra@vger.kernel.org>, <jilin@nvidia.com>
Subject: [PATCH v5 2/3] xhci: Add hub_control to xhci_driver_overrides
Date: Thu, 27 Oct 2022 21:31:26 +0800 [thread overview]
Message-ID: <20221027133127.27592-3-jilin@nvidia.com> (raw)
In-Reply-To: <20221027133127.27592-1-jilin@nvidia.com>
Add hub_control to "struct xhci_driver_overrides".
Add hub_control to xhci_init_driver() for platform xhci driver to
override it for local feature.
Signed-off-by: Jim Lin <jilin@nvidia.com>
---
v5: new change
drivers/usb/host/xhci.c | 2 ++
drivers/usb/host/xhci.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 902f410874e8..3c7bf0a0e0b4 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -5461,6 +5461,8 @@ void xhci_init_driver(struct hc_driver *drv,
drv->check_bandwidth = over->check_bandwidth;
if (over->reset_bandwidth)
drv->reset_bandwidth = over->reset_bandwidth;
+ if (over->hub_control)
+ drv->hub_control = over->hub_control;
}
}
EXPORT_SYMBOL_GPL(xhci_init_driver);
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 5a75fe563123..f5a17c75c144 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1943,6 +1943,8 @@ struct xhci_driver_overrides {
struct usb_host_endpoint *ep);
int (*check_bandwidth)(struct usb_hcd *, struct usb_device *);
void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
+ int (*hub_control)(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
+ u16 wIndex, char *buf, u16 wLength);
};
#define XHCI_CFC_DELAY 10
--
2.17.1
next prev parent reply other threads:[~2022-10-27 13:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 13:31 [PATCH v5 0/3] xhci: tegra: USB2 pad power controls Jim Lin
2022-10-27 13:31 ` [PATCH v5 1/3] xhci: hub: export symbol on xhci_hub_control Jim Lin
2022-10-27 13:58 ` Greg KH
2022-10-28 5:36 ` Jim Lin
2022-10-28 6:04 ` gregkh
2022-10-28 9:50 ` Thierry Reding
2022-10-28 10:37 ` gregkh
2022-10-28 11:08 ` Thierry Reding
2022-10-27 13:31 ` Jim Lin [this message]
2022-10-27 13:31 ` [PATCH v5 3/3] xhci: tegra: USB2 pad power controls Jim Lin
2022-10-27 14:00 ` Greg KH
2022-10-28 3:11 ` Jim Lin
2022-10-28 6:07 ` gregkh
2022-10-28 11:03 ` Thierry Reding
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=20221027133127.27592-3-jilin@nvidia.com \
--to=jilin@nvidia.com \
--cc=gregkh@linuxfoundation.org \
--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 \
--cc=thierry.reding@gmail.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;
as well as URLs for NNTP newsgroup(s).