diff options
| author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-10-22 16:14:57 -0400 |
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2012-10-31 09:01:15 -0400 |
| commit | bcb2f99c6c43a8da6cb4002e8b0acf6f1275f3a8 (patch) | |
| tree | 290cfa3262734c9010bd08dbf22cf45498e77bd9 /include/linux/usb | |
| parent | fad8deb274edcef1c8ca38946338f5f4f8126fe2 (diff) | |
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/linux/usb')
| -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 f8dda062180..8634a127bdd 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <linux/version.h> | 38 | #include <linux/version.h> |
| 39 | #include <linux/usb/ch9.h> | 39 | #include <linux/usb/ch9.h> |
| 40 | #include <linux/usb/gadget.h> | 40 | #include <linux/usb/gadget.h> |
| 41 | #include <linux/log2.h> | ||
| 41 | 42 | ||
| 42 | /* | 43 | /* |
| 43 | * USB function drivers should return USB_GADGET_DELAYED_STATUS if they | 44 | * USB function drivers should return USB_GADGET_DELAYED_STATUS if they |
| @@ -51,6 +52,7 @@ | |||
| 51 | /* big enough to hold our biggest descriptor */ | 52 | /* big enough to hold our biggest descriptor */ |
| 52 | #define USB_COMP_EP0_BUFSIZ 1024 | 53 | #define USB_COMP_EP0_BUFSIZ 1024 |
| 53 | 54 | ||
| 55 | #define USB_MS_TO_HS_INTERVAL(x) (ilog2((x * 1000 / 125)) + 1) | ||
| 54 | struct usb_configuration; | 56 | struct usb_configuration; |
| 55 | 57 | ||
| 56 | /** | 58 | /** |
