diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-10-22 22:14:57 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-10-31 14:01:15 +0100 |
commit | bcb2f99c6c43a8da6cb4002e8b0acf6f1275f3a8 (patch) | |
tree | 290cfa3262734c9010bd08dbf22cf45498e77bd9 /include | |
parent | usb: gadget: tcm_usb_gadget: NULL terminate the FS descriptor list (diff) | |
download | linux-bcb2f99c6c43a8da6cb4002e8b0acf6f1275f3a8.tar.xz linux-bcb2f99c6c43a8da6cb4002e8b0acf6f1275f3a8.zip |
usb: gadget: use a computation macro for INT endpoint interval
The 5+4 magic for HS tries to aim 32ms which is also what is intended
with 1 << 5 for FS. This little macro should make this easier to
understand.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb/composite.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index f8dda0621800..8634a127bdd3 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h @@ -38,6 +38,7 @@ #include <linux/version.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> +#include <linux/log2.h> /* * USB function drivers should return USB_GADGET_DELAYED_STATUS if they @@ -51,6 +52,7 @@ /* big enough to hold our biggest descriptor */ #define USB_COMP_EP0_BUFSIZ 1024 +#define USB_MS_TO_HS_INTERVAL(x) (ilog2((x * 1000 / 125)) + 1) struct usb_configuration; /** |