Commit graph

301639 commits

Author SHA1 Message Date
Pavankumar Kondeti
75a3d340d5 USB: gadget: Remove spoof disconnect workaround in ci13xxx_msm
The spoof disconnect workaround puts PHY in non-driving mode after
pull-up is disabled.  Some times pull-up is not getting enabled when
PHY is in non-driving mode.  As this workaround is not applicable for
28-nm PHY, remove it.

CRs-Fixed: 302394
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:35:23 -08:00
Anji jonnala
e15b26558e USB: gadget: Use Zero Interrupt Threshold Control for ci13xxx_msm
ITC (Interrupt Threshold Control) field is to set the maximum rate at
which the device controller will issue interrupts.  The maximum interrupt
interval is measured in micro frames.  Valid values are 0, 1, 2, 4, 8, 16,
32, 64.  The default value is 8 micro frames.  Set ITC to zero for MSM to
gain performance.

Change-Id: Idc383ffc9bc48b3681304b0f83e17a4cd39fb138
Signed-off-by: Anji jonnala <anjir@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:35:22 -08:00
Pavankumar Kondeti
fb50ed17fb USB: f_serial: Add NULL reference checks
Change-Id: If95f596fd38b56bc8981e72dde43bd05f4183580
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:35:22 -08:00
Vamsi Krishna
5cd0ac1fa7 usb: gserial: Add support to use multiple transport funcs
Currently driver supports multiple com ports over single transport
layer. Add support to support multiple com ports over multiple
transport layers

Change-Id: I43f88b3f809eff8f99d73be86ff8bbd550cdff2f
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
2013-02-25 11:35:21 -08:00
Anji Jonnala
602b4dcc05 USB: android gadget: queue the request only when serial is online
As a part of comp switch serial driver may queue the request
during serial unregistration, since serial unregistration is not
happening in atomic context.

Add variable to maintain serial driver state and verify that
variable before queuing the request.

Signed-off-by: Anji Jonnala <anjir@qualcomm.com>
2013-02-25 11:35:20 -08:00
Jonnala, Anji
f2fbda6175 USB: android gadget: Add interrupt ep and modem support in f_serial
Add interrupt endpoint support to send modem notifications to USB Host.

Add communication class descriptors to enumerate the function as a modem

Add Communication device class requests to configure modem line
settings.

As a part of call management, device needs to send modem events
(Ring Indicator and Carrier Detect) to host through interrupt
endpoint. Add support for Ring Indicator and Carrier Detect events
in f_serial.

Similarly, route modem control information (DTR and RTS) to upper
layers through TTY tiocmget API in f_serial.

provide CONFIG option to enable generic serial as a part of android
gadget.

provide CONFIG option to include MODEM functionality in the generic
serial driver.

Signed-off-by: Jonnala, Anji <anjir@qualcomm.com>
2013-02-25 11:35:19 -08:00
Chiranjeevi Velempati
5b1a6324f2 USB: gadget: f_mass_storage: Fix USB WHQL Certification Issues
As part of the USB MSCV testing, the host issues random commands and
expects the device to respond, but the device is not able to respond to
these commands, since the endpoints are not enabled due to the thread
latency and hence the compliance testing is failing.

Hence enabling/disabling the endpoints in interrupt context.

Change-Id: I27ad5875a3bde9a480866173d18cc3292c4af969
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
2013-02-25 11:35:18 -08:00
Rajkumar Raghupathy
dd42d946e7 USB: f_mass_storage: Enable nofua flag for write control
nofua flag allows user to control ignore syncing data on to
media during write SCSI command though host has set the FUA bit,
when nofua flag is set.

As part of prevent allow SCSI command, all the data at filesystem
layer is synced to media and this is taking longer time for slow
media(class 2, class 4) and hence usb is re-enumerating. Hence,
avoid syncing data to media if nofua is set.

Change-Id: I562f05d6c0b8046e8a23a4df85385efc23aa364b
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:35:17 -08:00
Chiranjeevi, Velempati
51dc5c866b USB: android gadget: mass_storage: read/write performance enhancement
Implementing the csw hack feature & increasing the number of
buffers used in mass storage to 4.

As per the mass storage protocol, csw is sent from the device
after successfully writing the data on to storage media, where
there is a time factor involved. With this csw hack, csw is sent
just after receiving the data & before writing the data on the
storage media. By, any chance, if the write fails, the corresponding
lun is removed to indicate the user of write failure.

Buffers has been increased to 4, so that there is enough space for
the incoming data, which is usually 64KB per CBW.

User has the option of selecting/deselecting this feature from
the kernel config.

Signed-off-by: Velempati Chiranjeevi <c_cvelem@qualcomm.com>
2013-02-25 11:35:17 -08:00
Rajkumar Raghupathy
13b83a2318 USB: f_mass_storage: Add support for performance recording
This patch adds support for populating the read/write performance values
for debugging the Mass storage performance numbers at VFS level.

To check the read/write values, user needs to invoke below command

cat /sys/devices/platform/usb_mass_storage/lunX/perf

To reset the read/write values to zero

echo 0 > /sys/devices/platform/usb_mass_storage/lunX/perf

Change-Id: Ied51969ce144a2335d2140259e28e8acbda44635
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:35:16 -08:00
Mike Lockwood
99267a7b46 USB: g_mass_storage: Always allow disabling mass storage by writing to lun file
For android builds we disable the check for curlun->prevent_medium_removal.
Instead we let the framework manage unmounting policy, as we sometimes need
to unmount after the media has been removed.
This also helps support hosts that do not inform the device when the media
has been unmounted.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2013-02-25 11:35:15 -08:00
Rajkumar Raghupathy
4b32fb6061 USB: gadget: f_acm: Fix NULL pointer check for hs_descriptors
Change-Id: Icf6f45eed6c568c77c9a2017d9507a0c017a411b
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:35:14 -08:00
Pavankumar Kondeti
cfd5f553be USB: Add nop functions for !USB case
OTG drivers that use USB core functions like usb_add_hcd, usb_remove_hcd,
etc can be selected for gadget only mode without selecting CONFIG_USB.

Change-Id: Ie4b0c1703622cc9051ad9f50b8901f0005daeeb6
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:35:13 -08:00
Rajkumar Raghupathy
93afbe5cea USB: u_serial: Don't allow UDC to append and send a zero length packet
Two zero length packets are sent by the target in the current scenario:
1. From the device controller driver (as the req->zero flag is set if
   it is the last packet).
2. From the u_serial driver when the length of the packet is zero while
   checking for the next packet in the list.

Hence removing the code for the case1, as the zero length packet is
sent via u_serial function driver.

Change-Id: Ifc1bc9cf8435149534c271343ea7ef64b9ed4d4a
CRs-Fixed: 350179
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:35:12 -08:00
Rajkumar Raghupathy
e8e4e8d321 USB: Gadget: u_serial: Freeing usb requests as a part of gs_close
The usb requests allocated during gs_open() were freed only as a part of
usb disconnect previously. So freeing the usb requests as a part of
gs_close() helps to free the requests on every network disconnect also.

Change-Id: I6edcab3cba94902ea3cb1a043403c93afa8c9d52
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:35:11 -08:00
Chiranjeevi Velempati
8ea890007d USB: gadget: u_serial: free read/write requests upon queue failure
serial driver is dropping the spinlock while queuing the requests and
accessing the port_usb pointer to free the requests upon queue failure.
cable disconnect interrupt can make port_usb NULL which leads to crash
in start_io function while freeing the queue failed requests.
check the port_usb pointer in both RX/TX path and free the queue
failed request immediatly which fixes the crash and traversing the
entire list to free the queue failed requests.

CRs-fixed: 269124
Change-Id: I36eea888d9cf209d181c200255dd1a6a592fc6a7
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
2013-02-25 11:35:11 -08:00
Pavankumar Kondeti
82531c6a0b usb: gadget: Fix bug in serial driver RX path
If low_latency flag is set tty_flip_buffer_push() API push the data
to line discipline in the same context.  When line discipline buffer
reaches above/below threshold throttle/unthrottle.  TTY use termios
mutext to serialize throttle/unthrottle methods.  Replace tasklet
with work queue so that TTY can acquire mutex.  A dedicated worker
thread is created for achieving good throughput.

Change-Id: I1ebbe1c9fee5591dace18940fb5c8716829f2dd2
Signed-off-by: Pavankumar Kondeti <pkondeti@qualcomm.com>
2013-02-25 11:35:10 -08:00
Anji Jonnala
84ca31d0c1 usb: gadget: Increase Tx/Rx buffers in serial driver
Increases Tx/Rx buffers to 8x4k inorder to pump more data
to userspace.

Change-Id: I8d7bf16ab7a0058f001b58b140afd33481bec618
Signed-off-by: Anji Jonnala <anjir@qualcomm.com>
2013-02-25 11:35:09 -08:00
Velempati Chiranjeevi
971a8cb97e usb: gadget: add zero length packet support
Add support to DIAG and serial functions to send the zlp packet
if the transfer ends with multiple's of maxpacket size

CRs-fixed: 213416

Signed-off-by: Velempati Chiranjeevi <c_cvelem@qualcomm.com>
2013-02-25 11:35:08 -08:00
Anji Jonnala
966c3cd67d usb: gadget: serial: resolve spinlock inconsistencies
kernel throws Possbile dead lock at f_serial  completion handlers,
if we use plain spinlock which dont disables interrupts.
To avoid this use spinlock_irqsave instead of plain spinlock
which disables interrupts.

Signed-off-by: Anji Jonnala <anjir@qualcomm.com>
2013-02-25 11:35:07 -08:00
Stephen Boyd
5f2b17e59d gadget: u_serial: Add tiocmset/tiocmget functionality
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:35:06 -08:00
Rajkumar Raghupathy
8d01ea88d9 USB: Gadget: u_serial: Debugfs for endpoint buffer monitoring
The debugfs used in u_serial driver provides the information of the number
of bytes transferred between host and tty and dtr flag status using
the readstatus command.

Change-Id: I761aaedf1693944b8c7bf7e207e1f271d1b48a98
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:35:06 -08:00
Vijayavardhan Vennapusa
65a1579ede USB: gadget: u_ether: Fix data stall issue in RNDIS tethering mode
For dual speed gadget, with current no. of request(10), there is
possibility of corner case occurence where all 10 reuqests are queued
to HW without setting IOC bit, which could lead to data stall in
RNDIS tethering and RNDIS local networking.

With this patch, counter will be incremented before queueing request to
HW and sets IOC bit for every nth request due to which the corner case
of all requests queued to HW without IOC bit set will be avoided.

CRs-Fixed: 340995
Change-Id: I95a252e6f54650fa8c1f263ab820caf5acd949a5
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2013-02-25 11:35:05 -08:00
Mike Lockwood
fb22129e7f usb: gadget: u_ether: Remove warning from gether_disconnect()
gether_disconnect() is always called before gether_connect() by the different
USB ethernet functions, so this warning was firing during normal operation.

Change-Id: I178cc7d1f67e9e87ac2e99c6674c4db8fcddf4a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2013-02-25 11:35:04 -08:00
Benoit Goby
ac41b65d1d usb: gadget: Fix usb string id allocation
Don't reset next_string_id every time the gadget is enabled, this makes
the next strings allocated overwrite strings allocated at probe time.
Instead, fix rndis not to allocate new string ids on every config bind.

Change-Id: Ied28ee416bb6f00c434c34176fe5b7f0dcb2b2d4
Signed-off-by: Benoit Goby <benoit@android.com>
2013-02-25 11:35:03 -08:00
Vijayavardhan Vennapusa
4c2551325e USB: f_mtp: Fix corner cases in MTP driver while syncing
Currently if USB composition switch happens while file transfer is
happening either from/to device, ep_queue fails and sets device state
to ERROR even if device state is already set to OFFLINE in function
disable call.

As part of ioctl call, if the state is not offline, moving the device
state to READY and returning the error. Since the device state is marked
as READY, the next write call tries to queue the request to hardware and
is blocked and due to this, userspace is not calling the release function.
Hence next mtp open fails even after cable reconnection.

CRs-Fixed: 360409
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Change-Id: Ia8cbd1cd8c81b90389900b83744b2bed89068db5
2013-02-25 11:35:02 -08:00
Rajkumar Raghupathy
925c40c1e6 USB: f_mtp: Handle corner cases on reception of Cancel request from Host
If the Host sends CANCEL request when an OUT request is queued,
the mtp_driver should dequeue the request and report the userspace about
the request CANCELLATION. As the mtp_read doesn't wakeup from the thread
which is expecting for the read completion, wakeup the thread using the
state change which occurs as a part of CANCEL request.

Also, when the request is dequeued and so mtp receives read completion
status as error, it moves the state to ERROR. Due to this the application
is not reported about the request cancellation for the next IN(mtp_write)
transfer as the state is not updated from STATE_ERROR to STATE_CANCELED.
So mtp_write proceeds queueing the IN requests for the corresponding sync
which are not processed by the Host and so the transfers initiated later
are observed as error in the HOST side.

So dequeue the OUT(mtp_read) request, if the driver receives a REQ_CANCEL
prior to read completion on mtp_read & update the state to STATE_CANCELED.

CRs-Fixed: 337676
Change-Id: I2cd9780f8b3e0ce541472c4d25c8294f11a45d76
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:35:01 -08:00
Chiranjeevi Velempati
ff0ae01274 USB: f_mtp: Remove existing duplicate code
autoconfig of out endpoint is being done twice for mtp driver.
Hence, removing the duplicate code of autoconfig of out endpoint.

CRs-Fixed: 339985
Change-Id: I677462999d0bcc1387aafe4c068e09fda5df15f6
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
2013-02-25 11:35:00 -08:00
Ido Shayevitz
ebf20df16e gadget: f_mtp: Don't use config_ep_by_speed() for the intr endpoint
Google made this change in the 3.4 upgrade but we didn't make the
change on our side because the endpoint wasn't choosing a speed
before.
2013-02-25 11:35:00 -08:00
Pavankumar Kondeti
7b7da5c964 usb: gadget: Fix unprotected access of online and error flags in ADB
Use atomic operations to read/write online and error flags.  Add
SMP barriers for ensuring that online flag is set and accessed only
after endpoints are configured.

Signed-off-by: Pavankumar Kondeti <pkondeti@qualcomm.com>
2013-02-25 11:34:59 -08:00
Stephen Boyd
01be49f1d1 usb: gadget: Fix section mismatch
WARNING: drivers/usb/gadget/g_android.o(.text+0x323e4): Section
mismatch in reference from the function acc_function_bind() to
the function .init.text:T.2968()
The function acc_function_bind() references
the function __init T.2968().
This is often because acc_function_bind lacks a __init
annotation or the annotation of T.2968 is wrong.

Change-Id: Ic93f1dd8fcfdc4d87fe19811122b46c5bb0e1bc2
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:34:58 -08:00
Tatyana Brokhman
c71f72a702 usb: gadget: fixes for "use config_ep_by_speed() instead of ep_choose()"
Since f_serial is now checking if the endpoint descriptors are
null in the set_alt function, need to set them to null on
ep_disable in case of cable disconnect.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
2013-02-25 11:34:57 -08:00
Manu Gautam
e0e9a49f55 usb: gadget: Move req->length check from function drivers to composite
req->legth is set as 0 before calling individual function driver's
setup routines. Hence, check for the buffer length in composite_setup
only.
Also, change max buffer size to 4k to accomodate our descriptors.

Change-Id: Ic96408210e7e5576928a7147d2d8a57fa620d287
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2013-02-25 11:34:56 -08:00
Vijayavardhan Vennapusa
45156ca78b USB: gadget: composite: Process GetDescriptor(OTG) request
If gadget is OTG capable, respond to a GetDescriptor(OTG) request
with its OTG descriptor.  This patch adds a utility to function
to find and fill the requested descriptor.

Change-Id: I5b3624b1145d46179b0c4737e82a47c68604cab4
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2013-02-25 11:34:55 -08:00
Ofir Cohen
6d40d80cbc usb: gadget: Add HSIC peripheral support.
Add support in HSIC peripheral(device).
Only one USB core can be use - currently
HSUSB is enabled by default.
To enable HSIC core defconfig file should be changed.

Change-Id: I02413658e28f799de2a083db7847fb8b01d04eac
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
2013-02-25 11:34:54 -08:00
Mike Lockwood
4dc842d30c [ARM] msm: msm72k_udc: gadget driver for msm7k
Signed-off-by: Mike Lockwood <lockwood@android.com>
2013-02-25 11:34:54 -08:00
Tatyana Brokhman
e4bb5e2714 usb: gadget: add max_speed to usb_composite_driver
This field is used by the Gadget drivers to specify
the maximum speed they support, meaning: the maximum
speed they can provide descriptors for.

The driver speed will be set in consideration of this
value.

[ balbi@ti.com : dropped the ifdeffery ]

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[idos@codeaurora.org: added max_speed also to android.c]
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
2013-02-25 11:34:53 -08:00
Rajkumar Raghupathy
c2beac8f89 USB: Handle allocated buffer freeing after error and unused variables
Free the allocated buffer after an error and remove
unused variables.

CRs-Fixed: 313681
Change-Id: I76ebf946eacac47682a3c510cd7beed3fc3c6437
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:34:52 -08:00
Rajkumar Raghupathy
421364ff9e USB: Trival cleanup in MSM drivers
Changes:
1. strncpy() to strlcpy()
2. sprintf() to snprintf()
3. Add buffer size in sscanf()
4. Fix the accessing of NULL pointers

Change-Id: I27c05d21a6551026764b0d3b2dbd8756a5992b20
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:34:51 -08:00
Manu Gautam
0922a3dcca USB: serial: Add support for new composition framework
Following command needs to be given to enable SERIAL
transports. This has to be done once before selecting serial
function.
For TTY-DUN, TTY-NMEA:
 echo tty,tty >
	/sys/class/android_usb/android0/f_serial/transports

For SDIO-DUN, TTY-NMEA:
 echo sdio,tty >
	/sys/class/android_usb/android0/f_serial/transports

Signed-off-by: Manu Gautam <mgautam@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/include/mach/usb_gadget_fserial.h
2013-02-25 11:34:50 -08:00
Chiranjeevi Velempati
7a5110bae3 USB: gadget: Add CCID function driver
This USB CCID function driver will be a transport layer between
the userspace CCID component and the Windows Host. Data and control
commands from the Windows Host will be sent to the userspace component
and vice-versa.

Change-Id: I7f8084bff7c4faa46ef24d7bf2e773ccf5ebe9f3
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
2013-02-25 11:34:49 -08:00
Anna Perel
cce917a9ac usb: gadget: MBIM function driver for QCOM chipsets
This driver implements Mobile Broadband Interface Model protocol.
Control messages are transferred through QBI module
running in user space and communicating with mbim
using file operations interface android_mbim.
Data is transferred on SPS, Bam-to-Bam.

Change-Id: Ifc4b3f7e21b1a0dac377af272f9ae922ec9c7e2e
Signed-off-by: Anna Perel <aperel@codeaurora.org>
2013-02-25 11:34:48 -08:00
Stephen Boyd
d20a151d2a usb: android: Add DIAG function driver
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:34:48 -08:00
Manu Gautam
34885c980c gadget: android: Add RMNET function drivers
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:34:47 -08:00
Stephen Boyd
dc6c1bbca2 gadget: android: Replace google's ACM with ours
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:34:46 -08:00
Vijayavardhan Vennapusa
927cea3d46 USB: android: Add OTG descriptor to configuration
Include OTG descriptor in configuration when gadget is
capable of OTG. SRP and HNP capablities are exposed for now.
This patch will help to inform USB Host that our device
is OTG capable via configuration descriptor.

Change-Id: Idc72ee8168a478f0124c91b99d3123eab5e71adb
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2013-02-25 11:34:45 -08:00
Scott Anderson
0ed7398f40 usb: gadget: android: Honor CONFIG_USB_GADGET_VBUS_DRAW
The maximum current draw was hard coded to 500 mA.  composite.c
has code that uses CONFIG_USB_GADGET_VBUS_DRAW to set the
bMaxPower and to set whether or not the device is self-powered if
they haven't been set.  This change removes the code in android.c
to allow composite.c to set them.

Change-Id: I9db37922e91ee86e9e5c0e14519e119e5c41ca48
Signed-off-by: Scott Anderson <saa@google.com>
2013-02-25 11:34:44 -08:00
Pavankumar Kondeti
bfc4e2748e USB: android: Provide sysfs file for enabling remote wakeup capability
USB device can specify remote wakeup capability in the configuration
descriptor.  Host may select remote wakeup feature before suspending
the device.  Remote wakeup capability is disabled by default in
android gadget.  Provide sysfs file for enabling remote wakeup capability.
User space can enable/disable this capability based on the selected
composition.  This will also allow testing suspend/resume chapter 9 tests
with remote wakeup enabled.

Change-Id: Ib24aa6c05ace697564ebe5940e62e8f65db4d7c3
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:34:43 -08:00
Manu Gautam
bb6b3366e8 USB: android: Fix missing USB DISCONNECT uevent
Some userspace modules, e.g. MTP, work correctly only if
CONFIGURED uevent is preceded by DISCONNECT uevent. Hence,
explicitly send DISCONNECT uevent if missed out due to
really quick enumeration by USB Host.
Also, wait for some time before sending out CONFIGURED uevent
to give function drivers a chance to wakeup userspace threads
and notify previous disconnect.

Change-Id: I231b8de60b25a05e2316074b8694c9cbc15bb556
CRs-Fixed: 348066
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2013-02-25 11:34:42 -08:00
Ofir Cohen
521828cd2c usb: gadget: Vote for SWFI when USB cable is connected
To enable better power management and entering CPU idle states while
USB cable is connected and no USB SW involvement is required
(MSM BAM2BAM mode) a new SysFS was added.
This SysFS allow controlling USB voting and gives the ability
to save power consumption while USB is active.
default behavior is high QoS. to change the new SysFS
echo high/low to /sys/class/android_usb/android0/pm_qos

Change-Id: Ia73491cfddc3968e1d04423a1750c89fab5fefeb
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
2013-02-25 11:34:42 -08:00