7 years agoprintk: Fix log_buf_copy termination.
Arve Hjønnevåg [Tue, 15 Apr 2008 04:35:25 +0000]
printk: Fix log_buf_copy termination.

If idx was non-zero and the log had wrapped, len did not get truncated
to stop at the last byte written to the log.

7 years agoRevert "printk: remove unused code from kernel/printk.c"
Arve Hjønnevåg [Fri, 16 Jan 2009 03:07:27 +0000]
Revert "printk: remove unused code from kernel/printk.c"

This reverts commit acff181d3574244e651913df77332e897b88bff4.

7 years agonet: Replace AID_NET_RAW checks with capable(CAP_NET_RAW).
Chia-chi Yeh [Tue, 30 Jun 2009 03:23:04 +0000]
net: Replace AID_NET_RAW checks with capable(CAP_NET_RAW).

Signed-off-by: Chia-chi Yeh <chiachi@android.com>

7 years agosecurity: Add AID_NET_RAW and AID_NET_ADMIN capability check in cap_capable().
Chia-chi Yeh [Thu, 18 Jun 2009 23:15:05 +0000]
security: Add AID_NET_RAW and AID_NET_ADMIN capability check in cap_capable().

Signed-off-by: Chia-chi Yeh <chiachi@android.com>

7 years agonet: PPPoPNS and PPPoLAC fixes.
Chia-chi Yeh [Fri, 12 Jun 2009 18:29:04 +0000]
net: PPPoPNS and PPPoLAC fixes.

net: Fix a bitmask in PPPoPNS and rename constants in PPPoPNS and PPPoLAC.

Signed-off-by: Chia-chi Yeh <chiachi@android.com>

net: Fix a potential deadlock while releasing PPPoLAC/PPPoPNS socket.

PPP driver guarantees that no thread will be executing start_xmit() after
returning from ppp_unregister_channel(). To achieve this, a spinlock (downl)
is used. In pppolac_release(), ppp_unregister_channel() is called after sk_udp
is locked. At the same time, another thread might be running in pppolac_xmit()
with downl. Thus a deadlock will occur if the thread tries to lock sk_udp.
The same situation might happen on sk_raw in pppopns_release().

Signed-off-by: Chia-chi Yeh <chiachi@android.com>

net: Force PPPoLAC and PPPoPNS to bind an interface before creating PPP channel.

It is common to manipulate the routing table after configuring PPP device.
Since both PPPoLAC and PPPoPNS run over IP, care must be taken to make sure
that there is no loop in the routing table.
Although this can be done by adding a host route, it might still cause
problems when the interface is down for some reason.

To solve this, this patch forces both drivers to bind an interface before
creating PPP channel, so the system will not re-route the tunneling sockets
to another interface when the original one is down. Another benefit is that
now the host route is no longer required, so there is no need to remove it
when PPP channel is closed.

Signed-off-by: Chia-chi Yeh <chiachi@android.com>

net: Avoid sleep-inside-spinlock in PPPoLAC and PPPoPNS.

Since recv() and xmit() are called with a spinlock held, routines which might
sleep cannot be used. This issue is solved by following changes:

Incoming packets are now processed in backlog handler, recv_core(), instead of
recv(). Since backlog handler is always executed with socket spinlock held, the
requirement of ppp_input() is still satisfied.

Outgoing packets are now processed in workqueue handler, xmit_core(), instead of
xmit(). Note that kernel_sendmsg() is no longer used to prevent touching dead
sockets.

In release(), lock_sock() and pppox_unbind_sock() ensure that no thread is in
recv_core() or xmit(). Then socket handlers are restored before release_sock(),
so no packets will leak in backlog queue.

Signed-off-by: Chia-chi Yeh <chiachi@android.com>

net: Fix msg_iovlen in PPPoLAC and PPPoPNS.

Although any positive value should work (which is always true in both drivers),
the correct value should be 1.

Signed-off-by: Chia-chi Yeh <chiachi@android.com>

7 years agonet: add PPP on PPTP Network Server (PPPoPNS) driver.
Chia-chi Yeh [Thu, 11 Jun 2009 17:09:30 +0000]
net: add PPP on PPTP Network Server (PPPoPNS) driver.

Signed-off-by: Chia-chi Yeh <chiachi@android.com>

ppopns: dont include px_proto define in if_pppopns.h

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

7 years agonet: add PPP on L2TP Access Concentrator (PPPoLAC) driver.
Chia-chi Yeh [Thu, 7 May 2009 20:02:40 +0000]
net: add PPP on L2TP Access Concentrator (PPPoLAC) driver.

Change-Id: I3ae3ee7520951ae24269db0ef2898c6455cf6bcc
Signed-off-by: Chia-chi Yeh <chiachi@android.com>

ppolac: dont include px_proto define in if_pppolac.h

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

7 years agocgroup: Add generic cgroup subsystem permission checks.
San Mehat [Thu, 21 May 2009 21:10:06 +0000]
cgroup: Add generic cgroup subsystem permission checks.

    Rather than using explicit euid == 0 checks when trying to move
tasks into a cgroup via CFS, move permission checks into each
specific cgroup subsystem. If a subsystem does not specify a
'can_attach' handler, then we fall back to doing our checks the old way.

    This way non-root processes can add arbitrary processes to
a cgroup if all the registered subsystems on that cgroup agree.

    Also change explicit euid == 0 check to CAP_SYS_ADMIN

Signed-off-by: San Mehat <san@google.com>

7 years agofs: yaffs: don't force YAFFS_TRACE_ALWAYS for all trace levels
Dima Zavin [Thu, 6 Jan 2011 00:03:21 +0000]
fs: yaffs: don't force YAFFS_TRACE_ALWAYS for all trace levels

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

7 years agofs: yaffs: Import yaffs from Thu Dec 23 13:31:37 2010 +1300
Arve Hjønnevåg [Wed, 19 May 2010 03:35:30 +0000]
fs: yaffs: Import yaffs from Thu Dec 23 13:31:37 2010 +1300

commit ddf33fed15c2376bfb602d62dd018c63fce60df8
Author: Timothy Manning <tfhmanning@gmail.com>
Date:   Thu Dec 23 13:31:37 2010 +1300

    yaffs updated direct/timothy_tests/quick_tests
Signed-off-by: Timothy Manning <tfhmanning@gmail.com>

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

7 years agofs: block_dump: Don't display inode changes if block_dump < 2
San Mehat [Sun, 22 Mar 2009 01:48:54 +0000]
fs: block_dump: Don't display inode changes if block_dump < 2

Signed-off-by: San Mehat <san@android.com>

7 years agotiwlan: Add abstract wifi control functions support
Dmitry Shmidt [Thu, 18 Dec 2008 17:55:20 +0000]
tiwlan: Add abstract wifi control functions support

7 years agousb: gadget: android: fix compilation on 2.6.37
Dima Zavin [Thu, 6 Jan 2011 00:13:41 +0000]
usb: gadget: android: fix compilation on 2.6.37

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

7 years agoUSB: gadget: composite: Use separate switches for connected and config state
Mike Lockwood [Sat, 11 Dec 2010 00:30:15 +0000]
USB: gadget: composite: Use separate switches for connected and config state

Also remove disconnect debouncing, which didn't actually work on some platforms

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

7 years agoUSB: gadget: acm,rndis: IAD class, subclass & prot should match 1st iface
John Michelau [Fri, 10 Dec 2010 19:51:19 +0000]
USB: gadget: acm,rndis: IAD class, subclass & prot should match 1st iface

Microsoft recommends that the class and subclass fields of
an IAD match the same fields from the first interface in the
collection that the IAD is grouping. In practice, we are also
finding that the protocol fields should also match. Without
this change, the default Microsoft composite driver may not
group interfaces properly, which is what allows child
function drivers with IAD's to load correctly.

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

7 years agoUSB: gadget: composite: Dynamically set IAD bFirstInterface
John Michelau [Fri, 10 Dec 2010 18:09:53 +0000]
USB: gadget: composite: Dynamically set IAD bFirstInterface

bFirstInterface should be set equal to bInterfaceNumber of
the first interface in a grouping. It's currently being set
only when a composite device is bound, and it does not get
updated when functions are enabled or disabled.

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

7 years agoUSB: gadget: android Fix gadget descriptor compliance for IAD's
John Michelau [Fri, 10 Dec 2010 17:33:54 +0000]
USB: gadget: android Fix gadget descriptor compliance for IAD's

USB-IF core team mandates that composite devices containing
IAD's must use bDeviceClass=0xEF, bDeviceSubClass=0x02, &
bDeviceProtocol=0x01 instead of the usual 0x00 in all fields.
This is not a problem currently on Linux hosts, but it is a
problem when connecting to Windows hosts. Without this change
the default Microsoft composite driver will not group
interfaces properly, which is what allows child function
drivers with IAD's to load correctly.

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

7 years agousb: gadget: Multiple ACM gadget instances
John Michelau [Tue, 9 Nov 2010 00:05:37 +0000]
usb: gadget: Multiple ACM gadget instances

- Added multiple ACM instance support in Android gadget
- Fixed multiple instance naming issue in ACM function
- Increased max instances from 4 to 8

Change-Id: I65f1b0be94da859bab7ec0ad7cd804b896c7c4c5
Signed-off-by: John Michelau <john.michelau@motorola.com>

7 years agousb: gadget: Fixed Android gadget function discovery & product matching
John Michelau [Tue, 30 Nov 2010 21:36:29 +0000]
usb: gadget: Fixed Android gadget function discovery & product matching

- Don't bind until all required functions have registered
- Consider multi-instance functions when matching products

Change-Id: I6fa10567db71d49cd81968c01d75e326ff9a17c8
Signed-off-by: John Michelau <john.michelau@motorola.com>

7 years agousb: gadget: rndis: don't use dev_get_stats
Benoit Goby [Wed, 17 Nov 2010 22:27:51 +0000]
usb: gadget: rndis: don't use dev_get_stats

Since 2.6.36, spin_lock_bh has been added to dev_txq_stats_fold. So
dev_get_stats cannot be called from atomic context.

Replaced it by netdev_stats_to_stats64 to copy the stats directly. This
will work if the device driver does not need txq tx stats folding.

http://lkml.org/lkml/2010/9/20/250

Change-Id: I715b00892beda56cc369139d6e2bdc9efb6bfe79
Signed-off-by: Benoit Goby <benoit@android.com>

7 years agoUSB: gadget: f_mtp: Zero length packet fixes
Mike Lockwood [Wed, 17 Nov 2010 16:16:35 +0000]
USB: gadget: f_mtp: Zero length packet fixes

Send zero length packets at end of transfers that are a multiple of the
bulk max packet size as required by MTP.

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

7 years agoUSB: gadget: f_mtp: Support for file transfer length greater than 4 gigabytes
Mike Lockwood [Tue, 16 Nov 2010 22:14:32 +0000]
USB: gadget: f_mtp: Support for file transfer length greater than 4 gigabytes

For backward compatibility with PTP, MTP is limited to a 32-bit file size.
When transferring files greater than 4 gig, MTP uses 0xFFFFFFFF as the file size
and the receiver reads until it receives a short packet.

Expanded size of mtp_file_range.length to 64 bits and added support for
writing zero length packets.

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

7 years agoUSB: gadget: f_mtp: Return zero result for successful file transfer.
Mike Lockwood [Mon, 15 Nov 2010 20:22:21 +0000]
USB: gadget: f_mtp: Return zero result for successful file transfer.

Returning number of bytes transfered does not work for files > 2 gig
since ioctl() result is a signed integer.

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

7 years agoUSB: gadget: f_mtp: MTP driver cleanup:
Mike Lockwood [Mon, 8 Nov 2010 15:41:31 +0000]
USB: gadget: f_mtp: MTP driver cleanup:

Use a work queue instead of a separate thread for file transfer ioctls
(note: the file transfer must be done on a kernel thread rather than in
process context so vfs_read and vfs_write will use the correct address space
for the buffers)

Enforce requirement that only one ioctl call may be active at a time,
and remove mutex in mtp_send_event that is now no longer necessary.

Synchronize around use of shared variables to avoid SMP issues

Fix mismatched calls to fget and fput

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

7 years agousb: gadget: android: Remove WAKEUP flag from bmAttributes
Benoit Goby [Fri, 24 Sep 2010 01:34:27 +0000]
usb: gadget: android: Remove WAKEUP flag from bmAttributes

Remove USB_CONFIG_ATT_WAKEUP from bmAttributes as we don't
support remote wakeup. This fixes an issue with the USB 2.0
compliance test tool.

Change-Id: Ic15e44710069f3f05ace6a82bbfa2b85a3649027
Signed-off-by: Benoit Goby <benoit@android.com>

7 years agoUSB: gadget: android: Disable MTP when RNDIS function is enabled.
Mike Lockwood [Mon, 23 Aug 2010 12:17:21 +0000]
USB: gadget: android: Disable MTP when RNDIS function is enabled.

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

7 years agoUSB: gadget: f_mtp: Add ioctl for sending events via the interrupt endpoint
Mike Lockwood [Tue, 6 Jul 2010 23:27:52 +0000]
USB: gadget: f_mtp: Add ioctl for sending events via the interrupt endpoint

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

7 years agodrivers: usb: gadget: rndis: Fix section mismatch warning
Dmitry Shmidt [Fri, 2 Jul 2010 21:47:44 +0000]
drivers: usb: gadget: rndis: Fix section mismatch warning

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agodrivers: usb: gadget: mass_storage: Fix section mismatch warning
Dmitry Shmidt [Fri, 2 Jul 2010 21:37:57 +0000]
drivers: usb: gadget: mass_storage: Fix section mismatch warning

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agodrivers: usb: gadget: Fix section mismatch warning
Dmitry Shmidt [Fri, 2 Jul 2010 19:46:34 +0000]
drivers: usb: gadget: Fix section mismatch warning

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agoUSB: composite: Add usb_composite_force_reset utility to force enumeration
Mike Lockwood [Mon, 28 Jun 2010 20:19:32 +0000]
USB: composite: Add usb_composite_force_reset utility to force enumeration

Use this rather than calling usb_gadget_disconnect and usb_gadget_connect
directly to avoid sending USB disconnect events to userspace when resetting
the bus.

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

7 years agoUSB: gadget: android: Remove unused function android_usb_set_connected()
Mike Lockwood [Mon, 28 Jun 2010 19:29:00 +0000]
USB: gadget: android: Remove unused function android_usb_set_connected()

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

7 years agoUSB: gadget: composite: Move switch_set_state calls to a work queue
Mike Lockwood [Mon, 28 Jun 2010 00:05:55 +0000]
USB: gadget: composite: Move switch_set_state calls to a work queue

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

7 years agoUSB: gadget: f_mtp: USB gadget function driver for MTP and PTP device support.
Mike Lockwood [Fri, 16 Apr 2010 14:39:22 +0000]
USB: gadget: f_mtp: USB gadget function driver for MTP and PTP device support.

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

7 years agoUSB: composite: Add support for functions overriding USB_DT_STRING descriptors
Mike Lockwood [Fri, 16 Apr 2010 19:32:15 +0000]
USB: composite: Add support for functions overriding USB_DT_STRING descriptors

Needed for MTP support.

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

7 years agoUSB: gadget: composite: Add userspace notifications for USB state changes
Mike Lockwood [Wed, 23 Jun 2010 12:20:59 +0000]
USB: gadget: composite: Add userspace notifications for USB state changes

Add switch to notify current USB configuration.  This can be used to detect
USB connect and disconnect events.

Broadcast a change via the usb_composite class when a USB function is
enabled or disabled.

Rename usb_function.hidden to usb_function.disabled.

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

7 years agoUSB: gadget: f_mass_storage: Integrate android customizations
Mike Lockwood [Wed, 16 Jun 2010 00:34:25 +0000]
USB: gadget: f_mass_storage: Integrate android customizations

Integrate support for android composite driver and platform data
within CONFIG_USB_ANDROID_MASS_STORAGE.

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

7 years agoUSB: android gadget: mass storage: Fix format issue for Vista Host
Velempati Chiranjeevi [Wed, 21 Oct 2009 04:23:10 +0000]
USB: android gadget: mass storage: Fix format issue for Vista Host

As part of formating the mass storage device, Host sends the INQUIRY
scsi command. As per the standard, the command length for this
command should be 6 bytes, whereas the Vista host sends 12 bytes.

When the command length of the command is not equal to the standard
length, the device sends a phase error as part of the status phase.
When the host receives a phase error, it re-enumerates, hence the
error.

If the command is INQUIRY, and the command length is 12 bytes,
treating this as a good command and not sending the phase error
to the host fixes this issue.

Signed-off-by: Velempati Chiranjeevi <c_cvelem@qualcomm.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>

7 years agoUSB: gadget: f_mass_storage: Defer handling interface changes until it is safe.
Mike Lockwood [Thu, 15 Apr 2010 19:04:07 +0000]
USB: gadget: f_mass_storage: Defer handling interface changes until it is safe.

Pulling in some code from file_storage.c, we now handle interface changes
in do_set_config(), which is now not called until any pending requests have
been successfully completed or cancelled.

This fixes a race condition that resulted in usb_ep_free_request() being called
while the request is still busy.

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

7 years agoUSB: gadget: android: mass_storage: Use spin_lock_irqsave/spin_unlock_irqrestore
Arve Hjønnevåg [Thu, 11 Dec 2008 04:01:15 +0000]
USB: gadget: android: mass_storage: Use spin_lock_irqsave/spin_unlock_irqrestore

The old code did not allways disable interrupts when called from thread
context, but tried to lock the same spinlock from interrupt context.

This was merged from a change to drivers/usb/function/mass_storage.c
in the android-msm-2.6.29 branch.

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

7 years agoUSB: gadget: android: check for null _android_dev in android_register_function()
Mike Lockwood [Wed, 17 Mar 2010 19:42:29 +0000]
USB: gadget: android: check for null _android_dev in android_register_function()

This fixes a load ordering issue that occurred if a function driver loads before
the android gadget driver is initialized.

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

7 years agoUSB: gadget: f_mass_storage: Flush writes after every 4 MB.
Mike Lockwood [Fri, 12 Mar 2010 16:01:05 +0000]
USB: gadget: f_mass_storage: Flush writes after every 4 MB.

This avoids excessive caching at the block level layer when copying large
files to the storage device.

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

7 years agoUSB: gadget: f_rndis: Add platform data for RNDIS vendor ID and MAC address.
Mike Lockwood [Wed, 10 Mar 2010 22:05:03 +0000]
USB: gadget: f_rndis: Add platform data for RNDIS vendor ID and MAC address.

This fixes a kernel panic in rndis.c when receiving the
OID_GEN_VENDOR_DESCRIPTION command.

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

7 years agoUSB: gadget: composite: Don't increment interface number for alt settings.
Mike Lockwood [Fri, 26 Feb 2010 14:34:19 +0000]
USB: gadget: composite: Don't increment interface number for alt settings.

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

7 years agoUSB: gadget: composite: Don't call set_alt() on functions that are hidden.
Mike Lockwood [Fri, 26 Feb 2010 14:30:01 +0000]
USB: gadget: composite: Don't call set_alt() on functions that are hidden.

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

7 years agoUSB: gadget: android: Disable UMS when RNDIS ethernet is active.
Mike Lockwood [Wed, 24 Feb 2010 15:20:59 +0000]
USB: gadget: android: Disable UMS when RNDIS ethernet is active.

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

7 years agousb: gadget: u_ether: Remove warning from gether_disconnect()
Mike Lockwood [Thu, 18 Feb 2010 14:50:28 +0000]
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>

7 years agoAdd USB_ANDROID_RNDIS_WCEIS option.
Steve Kondik [Wed, 17 Feb 2010 17:59:29 +0000]
Add USB_ANDROID_RNDIS_WCEIS option.

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

7 years agoUSB: gadget: android: Fix special case for RNDIS ethernet function
Mike Lockwood [Sat, 13 Feb 2010 21:37:16 +0000]
USB: gadget: android: Fix special case for RNDIS ethernet function

Only set device descriptor bDeviceClass field to USB_CLASS_COMM when
the RNDIS function is actually enabled.

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

7 years agoUSB: composite: Compute interface numbers correctly when functions are hidden.
Mike Lockwood [Sun, 14 Feb 2010 00:16:07 +0000]
USB: composite: Compute interface numbers correctly when functions are hidden.

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

7 years agoUSB: gadget: android: Specify USB_CLASS_COMM in device descriptor if using RNDIS
Mike Lockwood [Wed, 10 Feb 2010 20:26:58 +0000]
USB: gadget: android: Specify USB_CLASS_COMM in device descriptor if using RNDIS

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

7 years agoUSB: gadget: Disable RNDIS function by default if CONFIG_USB_ANDROID_RNDIS is set
Mike Lockwood [Mon, 8 Feb 2010 10:33:54 +0000]
USB: gadget: Disable RNDIS function by default if CONFIG_USB_ANDROID_RNDIS is set

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

7 years agoUSB: android: Use composite class driver for enabling and disabling functions
Mike Lockwood [Sun, 7 Feb 2010 02:54:31 +0000]
USB: android: Use composite class driver for enabling and disabling functions

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

7 years agoUSB: composite: Add class driver for enabling and disabling USB functions.
Mike Lockwood [Sun, 7 Feb 2010 02:53:51 +0000]
USB: composite: Add class driver for enabling and disabling USB functions.

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

7 years agoUSB: gadget: android: android USB gadget improvements:
Mike Lockwood [Tue, 12 Jan 2010 18:33:59 +0000]
USB: gadget: android: android USB gadget improvements:

usb: gadget: f_mass_storage: use dev_set_name()

Replacing strcpy() to device->bus_id which no longer exists in 2.6.32

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

USB: gadget: f_adb: Claim endpoints so they are not reused by another function.

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

USB: gadget: f_acm: Fix crashes in acm_set_alt()

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

USB: gadget: f_acm: Include android code only if CONFIG_USB_ANDROID_ACM is set.

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

USB: gadget: Android support for RNDIS serial ethernet function.

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

USB: gadget: android: Add function name to android_register_function printk.

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

7 years agoUSB: gadget: adb: Queue read requests with length specified by client.
Mike Lockwood [Sat, 19 Dec 2009 23:22:09 +0000]
USB: gadget: adb: Queue read requests with length specified by client.

Previously we queued 4K requests rather than the count passed into read().

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

7 years agoUSB: gadget: android: android USB gadget improvements:
Krishna, Vamsi [Wed, 11 Feb 2009 15:37:20 +0000]
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>

7 years agoUSB: composite: Allow configurations to handle unhandled setup requests
Joe Swantek [Tue, 15 Dec 2009 12:17:40 +0000]
USB: composite: Allow configurations to handle unhandled setup requests

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

7 years agoUSB: composite: Add flag to usb_function to hide its interface during enumeration
Mike Lockwood [Fri, 11 Dec 2009 16:24:07 +0000]
USB: composite: Add flag to usb_function to hide its interface during enumeration

Change-Id: Ie999b5190e3e2b6fd23015b8e796cdd178829929

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

7 years agoUSB: composite: Fix USB WHQL Certification Issues
Jared Suttles [Fri, 7 Aug 2009 23:57:49 +0000]
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>

7 years agodrivers: usb: gadget: Add helper function for installing ACM gadget function.
Joe Swantek [Thu, 23 Jul 2009 01:16:06 +0000]
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>

7 years agodrivers: usb: gadget: handle NULL descriptors in composite config_buf
Jared Suttles [Thu, 30 Jul 2009 21:13:27 +0000]
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>

7 years agoandroid_usb: Composite USB gadget driver for android.
Mike Lockwood [Wed, 3 Dec 2008 03:01:33 +0000]
android_usb: Composite USB gadget driver for android.

Change-Id: I4101540916b73a5f4e48684727ff782f98b969c7
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>

7 years agommc: sdio: Add high speed support to sdio_reset_comm()
Daniel Chen [Wed, 9 Dec 2009 17:45:36 +0000]
mmc: sdio: Add high speed support to sdio_reset_comm()

Signed-off-by: San Mehat <san@google.com>

7 years agommc: sdio: Claim host in sdio_reset_comm()
Dmitry Shmidt [Wed, 29 Jul 2009 17:22:03 +0000]
mmc: sdio: Claim host in sdio_reset_comm()

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agommc: mmcblk: Add support for deferred SD bus resume
San Mehat [Thu, 30 Jul 2009 15:21:19 +0000]
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>

7 years agommc: core: Add deferred bus resume policy.
San Mehat [Thu, 30 Jul 2009 14:55:28 +0000]
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>

7 years agommc: core: Hold a wake lock accross delayed work + mmc rescan
San Mehat [Mon, 23 Mar 2009 19:20:37 +0000]
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>

7 years agommc: sd: Add retries in re-detection
San Mehat [Thu, 4 Dec 2008 19:18:00 +0000]
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>

7 years agommc: sd: When resuming, try a little harder to init the card
San Mehat [Mon, 1 Dec 2008 16:52:34 +0000]
mmc: sd: When resuming, try a little harder to init the card

Signed-off-by: San Mehat <san@android.com>

7 years agommc: Add new API call 'sdio_reset_comm' for resetting communication with an SDIO...
San Mehat [Thu, 15 May 2008 16:15:37 +0000]
mmc: Add new API call 'sdio_reset_comm' for resetting communication with an SDIO device

Signed-off-by: San Mehat <san@android.com>

7 years agotrout: Add functions for WiFi
Dmitry Shmidt [Tue, 11 Nov 2008 19:22:38 +0000]
trout: Add functions for WiFi

7 years agommc: Add concept of an 'embedded' SDIO device.
San Mehat [Mon, 14 Apr 2008 22:22:49 +0000]
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>

7 years agommc: sd: Add new CONFIG_MMC_PARANOID_SD_INIT for enabling retries during SD detection
San Mehat [Tue, 11 Nov 2008 17:35:36 +0000]
mmc: sd: Add new CONFIG_MMC_PARANOID_SD_INIT for enabling retries during SD detection

Signed-off-by: San Mehat <san@google.com>

7 years agommc: Add status IRQ and status callback function to mmc platform data
San Mehat [Tue, 11 Nov 2008 00:29:50 +0000]
mmc: Add status IRQ and status callback function to mmc platform data

Signed-off-by: San Mehat <san@google.com>

7 years agoInput: synaptics_i2c_rmi: Add irqflags to platform data struct to pass them to driver
Rebecca Schultz Zavin [Mon, 30 Mar 2009 05:10:22 +0000]
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>

7 years agoInput: synaptics_i2c_rmi: Send new multi touch events
Arve Hjønnevåg [Tue, 21 Jul 2009 03:11:31 +0000]
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>

7 years agoInput: synaptics_i2c_rmi: Add sensitivity adjust option.
Arve Hjønnevåg [Wed, 15 Jul 2009 03:51:49 +0000]
Input: synaptics_i2c_rmi: Add sensitivity adjust option.

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

7 years agoInput: synaptics_i2c_rmi: Add support for panels with has-no-relative-data property.
Arve Hjønnevåg [Thu, 9 Jul 2009 04:32:06 +0000]
Input: synaptics_i2c_rmi: Add support for panels with has-no-relative-data property.

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

7 years agoInput: synaptics_i2c_rmi: Driver for Synaptics Touchscreens using RMI over I2C.
Arve Hjønnevåg [Wed, 22 Aug 2007 04:56:46 +0000]
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>

7 years agoinput: keychord: Add keychord driver
Mike Lockwood [Mon, 15 Dec 2008 19:51:56 +0000]
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

7 years agoinput: Add keyreset driver.
Arve Hjønnevåg [Sat, 22 Nov 2008 05:47:23 +0000]
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>

7 years agoInput: gpio_input: disable_irq -> disable_irq_nosync
Arve Hjønnevåg [Sat, 18 Apr 2009 01:24:59 +0000]
Input: gpio_input: disable_irq -> disable_irq_nosync

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

7 years agoInput: gpio_event: Allow multiple input devices per gpio_event device
Arve Hjønnevåg [Fri, 24 Jul 2009 22:19:56 +0000]
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>

7 years agoInput: gpio_input: Fix keys with keycode 0x100-0x1ff
Arve Hjønnevåg [Wed, 15 Jul 2009 03:58:41 +0000]
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>

7 years agoInput: Generic GPIO Input device.
Arve Hjønnevåg [Thu, 16 Oct 2008 01:23:47 +0000]
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>

7 years agoGrants system server access to /proc/<pid>/oom_adj for Android applications.
Mike Chan [Thu, 24 Apr 2008 17:22:26 +0000]
Grants system server access to /proc/<pid>/oom_adj for Android applications.

Signed-off-by: Brian Swetland <swetland@google.com>

7 years agoFAT: Add new ioctl VFAT_IOCTL_GET_VOLUME_ID for reading the volume ID.
Mike Lockwood [Sat, 15 Mar 2008 17:29:36 +0000]
FAT: Add new ioctl VFAT_IOCTL_GET_VOLUME_ID for reading the volume ID.

Signed-off-by: Brian Swetland <swetland@google.com>

7 years agomisc: uidstat: Adding uid stat driver to collect network statistics.
Mike Chan [Wed, 7 Jan 2009 19:40:42 +0000]
misc: uidstat: Adding uid stat driver to collect network statistics.

Signed-off-by: Mike Chan <mike@android.com>

7 years agosysfs_net_ipv4: Add sysfs-based knobs for controlling TCP window size
Robert Love [Thu, 31 Jul 2008 15:12:44 +0000]
sysfs_net_ipv4: Add sysfs-based knobs for controlling TCP window size

Add a family of knobs to /sys/kernel/ipv4 for controlling the TCP window size:

tcp_wmem_min
tcp_wmem_def
tcp_wmem_max
tcp_rmem_min
tcp_rmem_def
tcp_rmem_max

This six values mirror the sysctl knobs in /proc/sys/net/ipv4/tcp_wmem and
/proc/sys/net/ipv4/tcp_rmem.

Sysfs, unlike sysctl, allows us to set and manage the files' permissions and
owners.

Signed-off-by: Robert Love <rlove@google.com>

7 years agonet: socket ioctl to reset connections matching local address
Robert Love [Mon, 12 May 2008 21:08:29 +0000]
net: socket ioctl to reset connections matching local address

Introduce a new socket ioctl, SIOCKILLADDR, that nukes all sockets
bound to the same local address. This is useful in situations with
dynamic IPs, to kill stuck connections.

Signed-off-by: Brian Swetland <swetland@google.com>

net: fix tcp_v4_nuke_addr

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

net: ipv4: Fix a spinlock recursion bug in tcp_v4_nuke.

We can't hold the lock while calling to tcp_done(), so we drop
it before calling. We then have to start at the top of the chain again.

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

net: ipv4: Fix race in tcp_v4_nuke_addr().

To fix a recursive deadlock in 2.6.29, we stopped holding the hash table lock
across tcp_done() calls. This fixed the deadlock, but introduced a race where
the socket could die or change state.

Fix: Before unlocking the hash table, we grab a reference to the socket. We
can then unlock the hash table without risk of the socket going away. We then
lock the socket, which is safe because it is pinned. We can then call
tcp_done() without recursive deadlock and without race. Upon return, we unlock
the socket and then unpin it, killing it.

Change-Id: Idcdae072b48238b01bdbc8823b60310f1976e045
Signed-off-by: Robert Love <rlove@google.com>
Acked-by: Dima Zavin <dima@android.com>

ipv4: disable bottom halves around call to tcp_done().

Signed-off-by: Robert Love <rlove@google.com>
Signed-off-by: Colin Cross <ccross@android.com>

ipv4: Move sk_error_report inside bh_lock_sock in tcp_v4_nuke_addr

When sk_error_report is called, it wakes up the user-space thread, which then
calls tcp_close.  When the tcp_close is interrupted by the tcp_v4_nuke_addr
ioctl thread running tcp_done, it leaks 392 bytes and triggers a WARN_ON.

This patch moves the call to sk_error_report inside the bh_lock_sock, which
matches the locking used in tcp_v4_err.

Signed-off-by: Colin Cross <ccross@android.com>

7 years agoParanoid network.
Robert Love [Wed, 15 Oct 2008 19:35:44 +0000]
Paranoid network.

With CONFIG_ANDROID_PARANOID_NETWORK, require specific uids/gids to instantiate
network sockets.

Signed-off-by: Robert Love <rlove@google.com>

paranoid networking: Use in_egroup_p() to check group membership

The previous group_search() caused trouble for partners with module builds.
in_egroup_p() is also cleaner.

Signed-off-by: Nick Pelly <npelly@google.com>

Fix 2.6.29 build.

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

net: Fix compilation of the IPv6 module

Fix compilation of the IPv6 module -- current->euid does not exist anymore,
current_euid() is what needs to be used.

Signed-off-by: Steinar H. Gunderson <sesse@google.com>

7 years agoashmem for 2.6.27.
Robert Love [Tue, 14 Oct 2008 14:00:47 +0000]
ashmem for 2.6.27.

Forward port of ashmem to 2.6.27.

Signed-off-by: Robert Love <rlove@google.com>

ashmem: Don't install fault handler for private mmaps.

Ashmem is used to create named private heaps. If this heap is backed
by a tmpfs file it will allocate two pages for every page touched.
In 2.6.27, the extra page would later be freed, but 2.6.29 does not
scan anonymous pages when running without swap so the memory is not
freed while the file is referenced. This change changes the behavior
of private ashmem mmaps to match /dev/zero instead tmpfs.

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

ashmem: Add common prefix to name reported in /proc/pid/maps

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

ashmem: don't require a page aligned size

This makes ashmem more similar to shmem and mmap, by
not requiring the specified size to be page aligned,
instead rounding it internally as needed.

Signed-off-by: Marco Nelissen <marcone@android.com>

7 years agoAdd android_aid.h
Robert Love [Wed, 15 Oct 2008 19:34:49 +0000]
Add android_aid.h

Add <linux/android_aid.h>, our mapping of AID defines to gid numbers.

Signed-off-by: Robert Love <rlove@google.com>

7 years agopmem: Add pmem driver
Rebecca Schultz [Thu, 24 Jul 2008 18:22:53 +0000]
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>

pmem: Add cache flush ioctl for pmem buffers

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

Allow multiple pmem master mmap()s.

Signed-off-by: Jamie Gennis <jgennis@google.com>
Change-Id: Icbe619c92e0ebb391f0a93f81937705452a67d87

pmem: convert data_list_sem to a mutex

Also rename a function that now conflicts with a new
define in asm/pgtable.h

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

7 years agoswitch: switch class and GPIO drivers.
Mike Lockwood [Tue, 14 Oct 2008 16:50:16 +0000]
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>

7 years agopower_supply: Hold a wake_lock while power supply change notifications are pending
Arve Hjønnevåg [Tue, 22 Sep 2009 00:26:47 +0000]
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>

7 years agoinput: evdev: Use unique wakelock names
Mike Chan [Wed, 28 Oct 2009 00:37:44 +0000]
input: evdev: Use unique wakelock names

wakelock names are now contain evdev->name and pid

Signed-off-by: Mike Chan <mike@android.com>

7 years agoInput: Use monotonic time for event time stamps.
Arve Hjønnevåg [Fri, 17 Oct 2008 22:28:08 +0000]
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>

7 years agoInput: Hold wake lock while event queue is not empty.
Arve Hjønnevåg [Fri, 17 Oct 2008 22:20:55 +0000]
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>