diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 06:23:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 06:23:15 -0400 |
commit | 1be025d3cb40cd295123af2c394f7229ef9b30ca (patch) | |
tree | 5dc14e1ea412cc7fdc3e563ad23187059fe8bfb5 /Documentation/usb | |
parent | 2d03423b2319cc854adeb28a03f65de5b5e0ab63 (diff) | |
parent | a2c76b83fdd763c826f38a55127ccf25708099ce (diff) |
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (260 commits)
usb: renesas_usbhs: fixup inconsistent return from usbhs_pkt_push()
usb/isp1760: Allow to optionally trigger low-level chip reset via GPIOLIB.
USB: gadget: midi: memory leak in f_midi_bind_config()
USB: gadget: midi: fix range check in f_midi_out_open()
QE/FHCI: fixed the CONTROL bug
usb: renesas_usbhs: tidyup for smatch warnings
USB: Fix USB Kconfig dependency problem on 85xx/QoirQ platforms
EHCI: workaround for MosChip controller bug
usb: gadget: file_storage: fix race on unloading
USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers
USB: ftdi_sio.c:Fill MSR fields of the ftdi async_icount structure
USB: ftdi_sio.c: Fill LSR fields of the ftdi async_icount structure
USB: ftdi_sio.c:Fill TX field of the ftdi async_icount structure
USB: ftdi_sio.c: Fill the RX field of the ftdi async_icount structure
USB: ftdi_sio.c: Basic icount infrastructure for ftdi_sio
usb/isp1760: Let OF bindings depend on general CONFIG_OF instead of PPC_OF .
USB: ftdi_sio: Support TI/Luminary Micro Stellaris BD-ICDI Board
USB: Fix runtime wakeup on OHCI
xHCI/USB: Make xHCI driver have a BOS descriptor.
usb: gadget: add new usb gadget for ACM and mass storage
...
Diffstat (limited to 'Documentation/usb')
-rw-r--r-- | Documentation/usb/dwc3.txt | 45 | ||||
-rw-r--r-- | Documentation/usb/power-management.txt | 26 |
2 files changed, 71 insertions, 0 deletions
diff --git a/Documentation/usb/dwc3.txt b/Documentation/usb/dwc3.txt new file mode 100644 index 000000000000..7b590edae145 --- /dev/null +++ b/Documentation/usb/dwc3.txt | |||
@@ -0,0 +1,45 @@ | |||
1 | |||
2 | TODO | ||
3 | ~~~~~~ | ||
4 | Please pick something while reading :) | ||
5 | |||
6 | - Convert interrupt handler to per-ep-thread-irq | ||
7 | |||
8 | As it turns out some DWC3-commands ~1ms to complete. Currently we spin | ||
9 | until the command completes which is bad. | ||
10 | |||
11 | Implementation idea: | ||
12 | - dwc core implements a demultiplexing irq chip for interrupts per | ||
13 | endpoint. The interrupt numbers are allocated during probe and belong | ||
14 | to the device. If MSI provides per-endpoint interrupt this dummy | ||
15 | interrupt chip can be replaced with "real" interrupts. | ||
16 | - interrupts are requested / allocated on usb_ep_enable() and removed on | ||
17 | usb_ep_disable(). Worst case are 32 interrupts, the lower limit is two | ||
18 | for ep0/1. | ||
19 | - dwc3_send_gadget_ep_cmd() will sleep in wait_for_completion_timeout() | ||
20 | until the command completes. | ||
21 | - the interrupt handler is split into the following pieces: | ||
22 | - primary handler of the device | ||
23 | goes through every event and calls generic_handle_irq() for event | ||
24 | it. On return from generic_handle_irq() in acknowledges the event | ||
25 | counter so interrupt goes away (eventually). | ||
26 | |||
27 | - threaded handler of the device | ||
28 | none | ||
29 | |||
30 | - primary handler of the EP-interrupt | ||
31 | reads the event and tries to process it. Everything that requries | ||
32 | sleeping is handed over to the Thread. The event is saved in an | ||
33 | per-endpoint data-structure. | ||
34 | We probably have to pay attention not to process events once we | ||
35 | handed something to thread so we don't process event X prio Y | ||
36 | where X > Y. | ||
37 | |||
38 | - threaded handler of the EP-interrupt | ||
39 | handles the remaining EP work which might sleep such as waiting | ||
40 | for command completion. | ||
41 | |||
42 | Latency: | ||
43 | There should be no increase in latency since the interrupt-thread has a | ||
44 | high priority and will be run before an average task in user land | ||
45 | (except the user changed priorities). | ||
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index c9ffa9ced7ee..9d85d96ec6e0 100644 --- a/Documentation/usb/power-management.txt +++ b/Documentation/usb/power-management.txt | |||
@@ -487,3 +487,29 @@ succeed, it may still remain active and thus cause the system to | |||
487 | resume as soon as the system suspend is complete. Or the remote | 487 | resume as soon as the system suspend is complete. Or the remote |
488 | wakeup may fail and get lost. Which outcome occurs depends on timing | 488 | wakeup may fail and get lost. Which outcome occurs depends on timing |
489 | and on the hardware and firmware design. | 489 | and on the hardware and firmware design. |
490 | |||
491 | |||
492 | xHCI hardware link PM | ||
493 | --------------------- | ||
494 | |||
495 | xHCI host controller provides hardware link power management to usb2.0 | ||
496 | (xHCI 1.0 feature) and usb3.0 devices which support link PM. By | ||
497 | enabling hardware LPM, the host can automatically put the device into | ||
498 | lower power state(L1 for usb2.0 devices, or U1/U2 for usb3.0 devices), | ||
499 | which state device can enter and resume very quickly. | ||
500 | |||
501 | The user interface for controlling USB2 hardware LPM is located in the | ||
502 | power/ subdirectory of each USB device's sysfs directory, that is, in | ||
503 | /sys/bus/usb/devices/.../power/ where "..." is the device's ID. The | ||
504 | relevant attribute files is usb2_hardware_lpm. | ||
505 | |||
506 | power/usb2_hardware_lpm | ||
507 | |||
508 | When a USB2 device which support LPM is plugged to a | ||
509 | xHCI host root hub which support software LPM, the | ||
510 | host will run a software LPM test for it; if the device | ||
511 | enters L1 state and resume successfully and the host | ||
512 | supports USB2 hardware LPM, this file will show up and | ||
513 | driver will enable hardware LPM for the device. You | ||
514 | can write y/Y/1 or n/N/0 to the file to enable/disable | ||
515 | USB2 hardware LPM manually. This is for test purpose mainly. | ||