Commit Graph

253847 Commits

Author SHA1 Message Date
Mike Lockwood
ba3673bf79 USB: gadget: f_mtp: Add support for queueing multiple interrupt requests
Fixes problem sending "store added" events when there are multiple stores

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-17 22:27:20 -04:00
Benoit Goby
aab96815ae usb: gadget: android: Update android gadget driver
* Functions and the device descriptor are configured from user space:
echo 0       > /sys/class/android_usb/android0/enable
echo adb,acm > /sys/class/android_usb/android0/functions
echo 2       > /sys/class/android_usb/android0/f_acm/instances
echo 1       > /sys/class/android_usb/android0/enable

* Driver does not require platform data anymore

* Moved function initialization to android.c instead of each
function file

* Replaced switches by uevents

Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
Change-Id: If5ad9267c111ad0a442f0d87a0d31082dc5381b6
2011-06-17 16:02:37 -07:00
Benoit Goby
94df1bdfdc usb: gadget: composite: Add usb_remove_config
This allows composite drivers to dynamically change their configuration.
For example, a driver might remove a configuration and register a new
one with a different set of functions.
User should prevent the host from enumerating the device while changing
the configuration:

	usb_gadget_disconnect(cdev->gadget);
	usb_remove_config(cdev, old_config);
	usb_add_config(cdev, new_config, new_conf_bind);
	usb_gadget_connect(cdev->gadget);

Change-Id: Icbfb4ce41685fde9bf63d5d58fca1ad242aa69f9
Signed-off-by: Benoit Goby <benoit@android.com>
2011-06-17 16:02:36 -07:00
Benoit Goby
f6e7d49e03 usb: gadget: f_rndis: fix unbind
Change-Id: Idfde1aee6cfd7c648d4100060e111798c405e32c
Signed-off-by: Benoit Goby <benoit@android.com>
2011-06-17 16:02:35 -07:00
Mike Lockwood
9902e0b5c5 USB: gadget: f_accessory: New gadget driver for android USB accesories
Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Misc improvements and cleanup:

- Add URI string

- Replace type string with a description string

- Add a control call to retrieve accessory protocol version (currently 1)

- Driver read() and write() calls now fail after USB disconnect until
  driver file is closed and reopened.

- Misc cleanup work

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Clear accessory strings when USB is disconnected

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Clear previous strings on ACCESSORY_GET_PROTOCOL

Clearing strings on disconnect does not work since we may receive
a disconnect on some devices when transitioning into accessory mode.
We require an accessory to send ACCESSORY_GET_PROTOCOL before
sending any strings, so any strings from a previous session will be cleared.

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Clear disconnected flag when driver file is opened

Fixes a race condition that can occur when entering accessory mode.

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Add string for accessory's unique serial number

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Set bNumEndpoints to correct value of 2

Change-Id: I24f4e36f196d45436e0573301500c3b93215953d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-17 16:02:31 -07:00
Howard M. Harte
0d9f3c2791 net: wireless: bcmdhd: Combined patch from 4.218.248-31
bcmdhd: Allocate skb with GFP_KERNEL flag if possible: fix for older kernels.
bcmdhd: Fix race conditions for sysioc_thread
    * Fix up formatting and #ifdefs.
net: wireless: bcmdhd: Fix get_customized_country_code() for older kernels.
net: wireless: bcmdhd: Move PNO function prototypes to dhd.h.
Add private command support.
net: wireless: bcmdhd: Set proper read barrier
net: wireless: bcmdhd: Fix memory leak in case of dhd_bus_init() failure
net: wireless: bcmdhd: Fix wake_lock symmetry
net: wireless: bcmdhd: Ignore error if scan results are empty
net: wireless: bcmdhd: Add sdlock to firmware loading
net: wireless: bcmdhd: Fix watchdog syncronization during start/stop
net: wireless: bcmdhd: Fix Makefile to allow WEXT compilation

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-17 10:42:54 -07:00
Todd Poynor
097d39641d cpufreq interactive: support shared CPU scaling
Change-Id: Id5267f04067bf023f6b140b4de2e88ef7287e941
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-06-16 15:17:53 -07:00
Stephen Warren
390f202e3a ASoC: core: Don't schedule deferred_resume_work twice
For cards that have two or more DAIs, snd_soc_resume's loop over all
DAIs ends up calling schedule_work(deferred_resume_work) once per DAI.
Since this is the same work item each time, the 2nd and subsequent
calls return 0 (work item already queued), and trigger the dev_err
message below stating that a work item may have been lost.

Solve this by adjusting the loop to simply calculate whether to run the
resume work immediately or defer it, and then call schedule work (or not)
one time based on that.

Note: This has not been tested in mainline, but only in chromeos-2.6.38;
mainline doesn't support suspend/resume on Tegra, nor does the mainline
Tegra ASoC driver contain multiple DAIs. It has been compile-checked in
mainline.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Change-Id: I9c29b6c310a94108d81ab6506eb64ee9f30d846a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-06-16 14:55:41 -07:00
Dmitry Shmidt
170372e4ab net: wireless: bcmdhd: Fix getting Mac address from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:21:00 -07:00
Dmitry Shmidt
a70ab7beb4 net: wireless: bcmdhd: Fix race conditions for sysioc_thread
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:58 -07:00
Dmitry Shmidt
d530ae0780 net: wireless: bcmdhd: Reduce listen interval to 10 (from 20)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:55 -07:00
Dmitry Shmidt
de0932bf1a net: wireless: bcmdhd: Prevent working thread to run during suspend path
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:54 -07:00
Dmitry Shmidt
63a3dfafbc net: wireless: bcmdhd: Allocate skb with GFP_KERNEL flag if possible
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:52 -07:00
Dmitry Shmidt
1154e25e0f net: wireless: bcmdhd: Fix memleak in dev->p
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:51 -07:00
Dmitry Shmidt
d38c274feb net: wireless: bcmdhd: Fix scan timeout for abg case
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 11:38:53 -07:00
Colin Cross
abbb445f65 HACK: time: Disable alarmtimer
kernel/time/alarmtimer.c conflicts with drivers/rtc/alarm.c,
disable it for now.

Change-Id: I6cdb3b885828d45836a54971adf16143039b0a0e
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 11:37:53 -07:00
Jeff Brown
4700c54b66 input: gpio_input: send input_sync after reporting keys
Signed-off-by: jeffbrown@android.com
Change-Id: Ie170960df3c8ab4833ed686135dc8575cb9f2d48
2011-06-14 09:11:54 -07:00
Jeff Brown
be4cb21cb0 input: gpio_matrix: send input_sync after reporting keys
Signed-off-by: jeffbrown@android.com
Change-Id: I9bd2437503b48bf37f4d93505ccd2806e4aab977
2011-06-14 09:11:47 -07:00
Dmitry Shmidt
f53ef0328a net: wireless: bcmdhd: Prevent using WEXT in case of CFG80211
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:09 -07:00
Dmitry Shmidt
4cd8e372ad net: wireless: bcmdhd: Add missing dhd_get_dtim_skip() declaration
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:09 -07:00
Dmitry Shmidt
888da92e6c net: wireless: bcmdhd: Get rid of ANDROID define
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:09 -07:00
Dmitry Shmidt
d44b8ffa4b net: wireless: bcmdhd: Add setting country code from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:08 -07:00
Dmitry Shmidt
2b51d0d21f net: wireless: bcmdhd: Fix SOFTAP compilation
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:08 -07:00
Dmitry Shmidt
391df33a28 net: wireless: bcmdhd: Get MAC from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:08 -07:00
Dmitry Shmidt
fdfcb12df1 net: wireless: bcmdhd: Fix ANDROID define, clean obsolete code
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:08 -07:00
Howard M. Harte
b2fdbcd311 Update to 5.90.125.27 release.
Change-Id: I593f4a90671468b486e5f39b9eeff8ae65ac9431
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
2011-06-14 09:10:07 -07:00
mhban
36cf5520be printk: do not handle non-sleepable notification in console_cpu_notify
- CPU_DYING should not be handled in sleepable context

Signed-off-by: Minho Ban <mhban@samsung.com>
2011-06-14 09:10:07 -07:00
Dmitry Shmidt
37b0597b0f net: wireless: Add CONFIG_WIFI_CONTROL_FUNC option
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:07 -07:00
Dmitry Shmidt
adc1d7a7a5 net: wireless: bcmdhd: Switch to CUSTOMER_HW2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:07 -07:00
Dmitry Shmidt
8d91cafd81 net: wireless: bcmdhd: Remove obsolete debug messages
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:06 -07:00
Dmitry Shmidt
77a870da2e net: wireless: bcmdhd: Allow error debug prints from the beginning
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:06 -07:00
Dmitry ORNATSKYY
e02edfa975 net: wireless: bcm4329: Update example locale table
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:06 -07:00
Dmitry ORNATSKYY
9d5a8b6db6 net: wireless: bcm4329: Reduce listen interval to 10 (from 20)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:04 -07:00
Dmitry Shmidt
9a71fde4d7 net: wireless: bcm4329: Add new and default wifi locale support
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:02 -07:00
Dmitry Shmidt
252a091c47 net: wireless: bcmdhd: Fix watchdog firing in softirq on removal
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:02 -07:00
Dmitry Shmidt
6e66cd6a2d net: wireless: bcmdhd: Allow WEXT support
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:02 -07:00
Dmitry Shmidt
c2151241ce net: wireless: bcmdhd: Fix params in wl_cfg80211_event call
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:01 -07:00
Dmitry Shmidt
bce30c12f0 net: wireless: bcmdhd: Add spinlock initialization
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:01 -07:00
Dmitry Shmidt
6db994e17e net: wireless: bcmdhd: Fix config FW and NVRAM path
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:01 -07:00
Howard M. Harte
cf77d4ca64 Update to 5.90.125.22:
* Add support for SoftAP, keepalive, ARP offload.
    * Clean up cfg80211 and p2p code.
    * Update Makefile to support new features.
Change-Id: I1e7a16acd400d7baf5625ca8ba6552a6f1c80661
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
2011-06-14 09:10:01 -07:00
Dmitry Shmidt
66eb9faefb net: wireless: bcmdhd: Initial version based on 5.90.125.14
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:00 -07:00
Arve Hjønnevåg
38dfc33b20 ARM: etm: Power down etm(s) when tracing is not enabled
Without this change a saw an 18% increase in idle power consumption
on one deivce when trace support is compiled into the kernel. Now
I see the same increase only when tracing.

Change-Id: I21bb5ecf1b7d29ce3790ceeb5323409cc22d5a3b
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:10:00 -07:00
Arve Hjønnevåg
628c494e44 ARM: etm: Support multiple ETMs/PTMs.
If more than one ETM or PTM are present, configure all of them
and enable the formatter in the ETB. This allows tracing on dual
core systems (e.g. omap4).

Change-Id: I028657d5cf2bee1b23f193d4387b607953b35888
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:10:00 -07:00
Arve Hjønnevåg
97aba2e599 ARM: etm: Return the entire trace buffer if it is empty after reset
On some SOCs the read and write pointer are reset when the chip
resets, but the trace buffer content is preserved. If the status
bits indicates that the buffer is empty and we have never started
tracing, assume the buffer is full instead. This can be useful
if the system rebooted from a watchdog reset.

Change-Id: Iaf21c2c329c6059004ee1d38e3dfff66d7d28029
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:10:00 -07:00
Arve Hjønnevåg
a321601534 ARM: etm: Add some missing locks and error checks
It is not safe to call etm_lock or etb_lock without holding the
mutex since another thread may also have unlocked the registers.

Also add some missing checks for valid etb_regs in the etm sysfs
entries.

Change-Id: I939f76a6ea7546a8fc0d4ddafa2fd2b6f38103bb
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:59 -07:00
Arve Hjønnevåg
81e4312eeb ARM: etm: Configure data tracing
The old code enabled data tracing, but did not configure the
range. We now configure it to trace all data addresses by default,
and add a trace_data_range attribute to change the range or disable
data tracing.

Change-Id: I9d04e3e1ea0d0b4d4d5bcb93b1b042938ad738b2
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:59 -07:00
Arve Hjønnevåg
51495976f4 ARM: etm: Allow range selection
Trace kernel text segment by default as before, allow tracing of other
ranges by writing a range to /sys/devices/etm/trace_range, or to trace
everything by writing 0 0.

Change-Id: Ibb734ca820fedf79560b20536247f1e1700cdc71
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:59 -07:00
Arve Hjønnevåg
5f388f32b6 ARM: etm: Don't try to clear the buffer full status after reading the buffer
If the write address was at the end of the buffer, toggling the trace
capture bit would set the RAM-full status instead of clearing it, and
if any of the stop bits in the formatter is set toggling the trace
capture bit may not do anything.

Instead use the read position to find out if the data has already
been returned.

This also fixes the read function so it works when the trace buffer is
larger than the buffer passed in from user space. The old version
would reset the trace buffer pointers after every read, so the second
call to read would always return 0.

Change-Id: I75256abe2556adfd66fd5963e46f9e84ae4645e1
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:59 -07:00
Arve Hjønnevåg
ccd3dbcbf1 ARM: etm: Don't limit tracing to only non-secure code.
On some systems kernel code is considered secure, and this code
already limits tracing to the kernel text segment which results
in no trace data.

Change-Id: I098a0753e874859446d098e1ee209f67fc13cd5d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:59 -07:00
Arve Hjønnevåg
875e2e1140 ARM: etm: Don't require clock control
If clk_get fail, assume the etb does not need a separate clock.

Change-Id: Ia0bf3f5391e94a60ea45876aa7afc8a88a7ec3bf
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:58 -07:00