]> git.baikalelectronics.ru Git - kernel.git/commit
usb:hsotg:samsung: Cable disconnection recovery code
authorLukasz Majewski <l.majewski@samsung.com>
Fri, 4 May 2012 12:17:08 +0000 (14:17 +0200)
committerFelipe Balbi <balbi@ti.com>
Fri, 4 May 2012 12:53:14 +0000 (15:53 +0300)
commit6139d046b745013474a19b8b6d0118230cb8d949
treefa9c3414a5cdc802368f67c05b79a639a10ebba2
parente2f3bc8318330df45ceee325807871b6268d0cf0
usb:hsotg:samsung: Cable disconnection recovery code

This code allows Samsung SoC's to recover its state when
device is disconnected and connected during transfer.

It is necessary, in such a scenario, to reinitialize the USB core
to assure correct initial state of the driver.
This operation is needed since the disconnect interrupt is only
available at HOST mode, which is not supported by this driver.

A simple mechanism with jiffies has been used to perform core reset
only once.

Tested with:
- DFU gadget (various size of the sent data - also packet = MPS)
- Ethernet gadget (CDC and RNDIS)
- Multi Function Gadget (g_multi)

HW:
- Samsung's C210 Universal rev.0

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/s3c-hsotg.c