Commit Graph

95004 Commits

Author SHA1 Message Date
Krishna, Vamsi
01acfb833c USB: gadget: android: android USB gadget improvements:
USB: android gadget: add remote wakeup attribute to android function

Add remote wakeup attribute to configuration descriptor of android
function to advertise remote wakeup capability to host

Acked-by: Allam, Suresh Reddy <sallam@qualcomm.com>

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

USB: gadget: android: Allow functions to handle setup requests.

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

Support for specifying the list of USB functions from platform data.

The main android.c gadget driver no longer has hard coded references
to the mass_storage and adb functions.

Support for computing the product ID based on tables in platform data
and the currently enabled functions.

Moved the adb enable/disable logic from android.c to f_adb.c.

Change-Id: I6259d3fb1473ed973f700e55d17744956f3527bb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:16 -07:00
Joe Swantek
19e2a3e2ba USB: composite: Allow configurations to handle unhandled setup requests
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:16 -07:00
Mike Lockwood
f64a78284c USB: composite: Add flag to usb_function to hide its interface during enumeration
Change-Id: Ie999b5190e3e2b6fd23015b8e796cdd178829929

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:16 -07:00
Jared Suttles
047806b490 USB: composite: Fix USB WHQL Certification Issues
Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:16 -07:00
Joe Swantek
fdef4496af drivers: usb: gadget: Add helper function for installing ACM gadget function.
Submitted on behalf of James Luan <James.Luan@motorola.com>

Signed-off-by: Joe Swantek <joseph.swantek@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:16 -07:00
Jared Suttles
9fd9743c88 drivers: usb: gadget: handle NULL descriptors in composite config_buf
This fixes a problem in enumeration after a gadget function is removed.

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>

Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:15 -07:00
Mike Lockwood
356cdf0225 android_usb: Composite USB gadget driver for android.
Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: android gadget: add remote wakeup attribute to android function

Add remote wakeup attribute to configuration descriptor of android
function to advertise remote wakeup capability to host

Acked-by: Allam, Suresh Reddy <sallam@qualcomm.com>

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

usb gadget: link fixes for android composite gadget

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

usb gadget: Fix null pointer errors in android composite driver

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

usb: gadget: android: Allow usb charging to draw up to 500mA instead of 250.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

usb gadget: android: Add helper function for usb_gadget_connect and disconnect.

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

drivers: usb: gadget: call switch_dev_unregister in mass storage unbind callback

This fixes a problem unloading the android gadget driver when built as a module

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

usb: gadget: android: Add dependency on switch driver.

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

USB: gadget: android: Fix USB WHQL Certification Issues

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>

drivers: usb: gadget: Add "usb_mass_storage" platform driver.

This will be used for configuring vendor, product and release from board file.

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>

drivers: usb: gadget: Use usb_mass_storage platform device as parent for lun

If a platform device is specified for the f_mass_storage function, use it as the
parent driver for the lun files in sysfs.
This allows a platform independent file path for controlling USB mass storage
from user space.

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

drivers: usb: gadget: Add platform data struct for usb_mass_storage device

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

usb: gadget: mass_storage: Fix Mass Storage Panic during PC reboot

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>

usb: gadget: f_mass_storage: Handle setup request correctly

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

usb: gadget: f_mass_storage: Clean up wakelocks on error paths

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:15 -07:00
Dmitry Shmidt
1cb89ed9ee drivers: mmc: Fix minimal frequency assignment
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:15 -07:00
Daniel Chen
193916248f mmc: sdio: Add high speed support to sdio_reset_comm()
Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:15 -07:00
David Ding
9e4e852039 mmc: block: Resume multi-block reads after transient read errors.
Signed-off-by: Bentao Zou <bzou1@motorola.com>
Signed-off-by: David Ding <david.j.ding@motorola.com>
Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:15 -07:00
Dmitry Shmidt
337cd8e8fd mmc: sdio: Claim host in sdio_reset_comm()
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:15 -07:00
San Mehat
cfc51f6f0f mmc: mmcblk: Add support for deferred SD bus resume
Signed-off-by: San Mehat <san@google.com>

mmc: card: Add MMC_BLOCK_DEFERRED_RESUME option to Kconfig

Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:14 -07:00
San Mehat
f4e8939727 mmc: core: Add deferred bus resume policy.
A card driver can now specify that the underlying bus should *not*
auto-resume with the rest of the system. This is useful for reducing resume
latency as well as saving power when the card driver is not using the
bus. In the future, we'll add support for manual suspend

Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:14 -07:00
San Mehat
54570ffd56 mmc: core: Hold a wake lock accross delayed work + mmc rescan
Signed-off-by: San Mehat <san@android.com>

mmc: core: Rework mmc_delayed_work wakelock so that the wakelock is only extended if a card is added or removed.

Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:14 -07:00
San Mehat
2871f3617c mmc: sd: Add retries in re-detection
Signed-off-by: San Mehat <san@android.com>

mmc: sd: Remove debugging printk

Signed-off-by: Dima Zavin <dima@android.com>
2010-09-29 17:49:14 -07:00
San Mehat
b6272b1eb2 mmc: sd: When resuming, try a little harder to init the card
Signed-off-by: San Mehat <san@android.com>
2010-09-29 17:49:14 -07:00
San Mehat
b70b98b710 mmc: Add new API call 'sdio_reset_comm' for resetting communication with an SDIO device
Signed-off-by: San Mehat <san@android.com>
2010-09-29 17:49:14 -07:00
Dmitry Shmidt
ba2d23d773 trout: Add functions for WiFi 2010-09-29 17:49:13 -07:00
San Mehat
8e751b6ad3 mmc: Add concept of an 'embedded' SDIO device.
This is required to support chips which use SDIO for signaling/
communication but do not implement the various card enumeration registers
as required for full SD / SDIO cards.

mmc: sdio: Fix bug where we're freeing the CIS tables we never allocated when using EMBEDDED_SDIO
mmc: Add max_blksize to embedded SDIO data

Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:13 -07:00
San Mehat
52f2c81de6 mmc: sd: Add new CONFIG_MMC_PARANOID_SD_INIT for enabling retries during SD detection
Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:13 -07:00
Rebecca Schultz Zavin
6aeda3ba66 Input: synaptics_i2c_rmi: Add irqflags to platform data struct to pass them to driver
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:13 -07:00
Arve Hjønnevåg
13ff58d150 Input: synaptics_i2c_rmi: Send new multi touch events
Send both fingers using the new multitouch protocol in addition to
the old single finger event and second finger ABS_HAT* hack.

The new protocol does not specify how to report up events. To make
sure the user-space frameworks can generate up events, we send at
least one event where ABS_MT_TOUCH_MAJOR is zero before we stop
sending events for a finger.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:13 -07:00
Arve Hjønnevåg
4a5096fcd4 Input: synaptics_i2c_rmi: Add sensitivity adjust option.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:12 -07:00
Arve Hjønnevåg
07f13eb3c9 Input: synaptics_i2c_rmi: Add support for panels with has-no-relative-data property.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:12 -07:00
Arve Hjønnevåg
a281518ac5 Input: synaptics_i2c_rmi: Driver for Synaptics Touchscreens using RMI over I2C.
Signed-off-by: Arve Hjønnevåg <arve@android.com>

Input: synaptics_i2c_rmi: disable_irq -> disable_irq_nosync

Also remove duplicate swap macro

Change-Id: I77266431ba5c267a5d92c4bdc2f127a5297065a8
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:12 -07:00
Mike Lockwood
dd73d5b2d9 input: keychord: Add keychord driver
This driver allows userspace to receive notification when client
specified key combinations are pressed.
The client opens /dev/keychord and writes a list of keychords
for the driver to monitor.
The client then reads or polls /dev/keychord for notifications.
A client specified ID for the keychord is returned from read()
when a keychord press is detected.

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

keychord: fix to build without CONFIG_PREEMPT

Change-Id: I911f13aeda4224b6fa57863bc7e8972fec8837fb
2010-09-29 17:49:12 -07:00
Arve Hjønnevåg
507859c6df input: Add keyreset driver.
Add a platform device in the board file to specify a reset key-combo.
The first time the key-combo is detected a work function that syncs
the filesystems is scheduled. If all the keys are released and then
pressed again, it calls panic. Reboot on panic should be set for
this to work.

Change-Id: I9d54283ca1fba45e4b1ae1a407524cdda8171143
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:12 -07:00
Arve Hjønnevåg
eefa53c09f Input: gpio_input: disable_irq -> disable_irq_nosync
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:11 -07:00
Arve Hjønnevåg
e9a7fa061a Input: gpio_event: Allow multiple input devices per gpio_event device
This is needed to support devices that put non-keyboard buttons in
the keyboard matrix. For instance several devices put the trackball
button in the keyboard matrix. In this case BTN_MOUSE should be
reported from the same input device as REL_X/Y.

It is also useful for devices that have multiple logical keyboard in
the same matrix. The HTC dream has a menu key on the external keyboard
and another menu key on the slide-out keyboard. With a single input
device only one of these menu keys can be mapped to KEY_MENU.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:11 -07:00
Arve Hjønnevåg
e7f3240267 Input: gpio_input: Fix keys with keycode 0x100-0x1ff
KEY_MAX is no longer a power of 2.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:11 -07:00
Arve Hjønnevåg
4e68fb6026 Input: Generic GPIO Input device.
Supports keyboard matrixces, direct inputs, direct outputs and axes connected to gpios.

Change-Id: I5e921e6e3a1cc169316ee3b665f4cc21b5735114
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Nick Pelly <npelly@google.com>
2010-09-29 17:49:11 -07:00
Mike Chan
6e11ad5a8e misc: uidstat: Adding uid stat driver to collect network statistics.
Signed-off-by: Mike Chan <mike@android.com>
2010-09-29 17:49:11 -07:00
Rebecca Schultz
1bbe5b099d pmem: Add pmem driver
Signed-off-by: Rebecca Schultz <rschultz@google.com>

pmem: Use the thread group leader insted of the current thread.

Instead of keeping track of the current thread, use the thread group leader

Signed-off-by: Rebecca Schultz <rschultz@google.com>

pmem: Add some apis to reference and flush pmem files by file struct

The api to refer to pmem files by fd should be depricated, it can
cause problems if a processes fd table changes while the kernel is processing
data in a pmem file.  This change adds the safer api.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: Remove unused depricated fd api to pmem.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: Remove error message when calling get_pmem_addr

This call is used from the mdp driver to determine if the memory
is in pmem or in the fb.  We will encounter this case during normal operation
so this error message should be removed.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: Add include sched.h to fix compile errors

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: remove HW3D_* ioctls

Signed-off-by: Dima Zavin <dima@android.com>

pmem: Expose is_pmem_file to the in-kernel users.

Signed-off-by: Dima Zavin <dima@android.com>

pmem: Make the exposed functions be noops if CONFIG_ANDROID_PMEM is not set.

Signed-off-by: Dima Zavin <dima@android.com>

misc: pmem: don't flush if file was opened with O_SYNC

Change-Id: I067218658a0d7f7ecc1fe73e9ff6b0c3b3054653
Signed-off-by: Dima Zavin <dima@android.com>
2010-09-29 17:49:09 -07:00
Mike Lockwood
88dc93f952 switch: switch class and GPIO drivers.
switch: Export symbol switch_set_state.

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

switch: gpio: Don't call request_irq with interrupts disabled

Signed-off-by: Arve Hjønnevåg <arve@android.com>

switch: Use device_create instead of device_create_drvdata.

device_create_drvdata is obsolete.

Signed-off-by: Arve Hjønnevåg <arve@android.com>

switch_gpio: Add missing #include <linux/interrupt.h>

Change-Id: I6c397e41bbe1457162cc69e31a29db5d9f76fccb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:09 -07:00
Arve Hjønnevåg
2faaa219a3 power_supply: Hold a wake_lock while power supply change notifications are pending
When connecting usb or the charger the device would often go back to sleep
before the charge led and screen turned on.

Change-Id: I01def6d86ddece0d4e31d2a91d176ed0975b6b9d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:09 -07:00
Mike Chan
ebdbe7c03e input: evdev: Use unique wakelock names
wakelock names are now contain evdev->name and pid

Signed-off-by: Mike Chan <mike@android.com>
2010-09-29 17:49:09 -07:00
Arve Hjønnevåg
36c83de718 Input: Use monotonic time for event time stamps.
Since wall time can jump backwards, it cannot be used to determine if one
event occured before another or for how long a key was pressed.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:09 -07:00
Arve Hjønnevåg
7a1d4b001f Input: Hold wake lock while event queue is not empty.
Allows userspace code to process input events while
the device appears to be asleep.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:09 -07:00
Arve Hjønnevåg
9ad323ee45 ledtrig-sleep: Add led trigger for sleep debugging.
Signed-off-by: Brian Swetland <swetland@google.com>
2010-09-29 17:49:08 -07:00
Arve Hjønnevåg
c7b52dfe8a rtc: Try to prevent RTC errors from accumulating.
When we resume we only know how many whole seconds has elapsed.
These errors would accumulate in delta. We now only set the delta
if it would change by more than two seconds. If we drift back by
by more than a second add one in resume.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:08 -07:00
Arve Hjønnevåg
c4606c1208 rtc: alarm: Add in-kernel alarm interface
Drivers can now create alarms that will use an hrtimer while the
system is running and the rtc to wake up from suspend.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:08 -07:00
Arve Hjønnevåg
e5642795c4 rtc: Add android alarm driver. 2010-09-29 17:49:08 -07:00
Brian Swetland
a2ff915ea6 w1: don't allow arbitrary users to remove w1 devices
The search/pullup/add/remove device attributes were 0666 which would
allow arbitrary users to affect the 1 wire bus.  Change to 0664 to
prevent that.

Signed-off-by: Brian Swetland <swetland@google.com>
2010-09-29 17:49:05 -07:00
Robert Love
1cc8f1e3f4 Make /dev/mem configurable, as we don't want it.
Signed-off-by: Brian Swetland <swetland@google.com>
2010-09-29 17:49:05 -07:00
Arve Hjønnevåg
439743f094 [ARM] armv6 dcc tty driver
Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:03 -07:00
Arve Hjønnevåg
e3bc4de9e0 Revert "Staging: android: mark subsystem as broken"
This reverts commit 2cdf99ce2b.
2010-09-29 17:49:03 -07:00
Corentin Chary
d90e943df7 staging/android: fix build issues
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
2010-09-29 17:49:03 -07:00
Arve Hjønnevåg
4867dff9fb Revert "Staging: android: delete android drivers"
This reverts commit b0a0ccfad8.
2010-09-29 17:49:03 -07:00
Linus Torvalds
7268e3c4b5 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: fix module refcount breakage introduced by libahci split
2010-09-28 12:38:52 -07:00
Tejun Heo
fad16e7a7f ahci: fix module refcount breakage introduced by libahci split
libata depends on scsi_host_template for module reference counting and
sht's should be owned by each low level driver.  During libahci split,
the sht was left with libahci.ko leaving the actual low level drivers
not reference counted.  This made ahci and ahci_platform always
unloadable even while they're being actively used.

Fix it by defining AHCI_SHT() macro in ahci.h and defining a sht for
each low level ahci driver.

stable: only applicable to 2.6.35.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Pedro Francisco <pedrogfrancisco@gmail.com>
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-09-28 15:14:51 -04:00