FROMGIT: usb: common: add function to get interval expressed in us unit

Add a new function to convert bInterval into the time expressed
in 1us unit.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/25c8a09b055f716c1e5bf11fea72c3418f844482.1615170625.git.chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1b121617a69e8e4f2a7b6005ee1c0b4bcb8451fc
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4aaf4ee2bdeed01414df3d1272e6e5127722efb2
This commit is contained in:
Chunfeng Yun
2021-03-08 10:52:05 +08:00
committed by Greg Kroah-Hartman
parent 0b32221aaa
commit ac76976004
4 changed files with 52 additions and 48 deletions

View File

@@ -90,6 +90,9 @@ extern enum usb_ssp_rate usb_get_maximum_ssp_rate(struct device *dev);
*/
extern const char *usb_state_string(enum usb_device_state state);
unsigned int usb_decode_interval(const struct usb_endpoint_descriptor *epd,
enum usb_device_speed speed);
#ifdef CONFIG_TRACING
/**
* usb_decode_ctrl - Returns human readable representation of control request.