bluesleep: implement to support bluedroid

"#define BT_BLUEDROID_SUPPORT 1" -> support BlueDroid
"#define BT_BLUEDROID_SUPPORT 0" -> support BlueZ

Since BlueDroid does not use kernel space HCI driver now, we add the
below 2 /proc nodes to make BlueDroid able to send HCI events to
bluesleep driver.

write 1 to /proc/bluetooth/sleep/lpm -> equivalent to HCI_DEV_REG event
write 0 to /proc/bluetooth/sleep/lpm -> equivalent to HCI_DEV_UNREG event
write 1 to /proc/bluetooth/sleep/btwrite -> equivalent to HCI_DEV_WRITE event

Change-Id: I2ffd06e737371883e1b0a033b5cf205ba3046396
Signed-off-by: Haley Teng <hteng@nvidia.com>
Fixes for blutooth off

Change-Id: Id4c6cd098603268727ff6d5c841dec2ecd4a51a5
Register bluesleep uart for bluedroid

Change-Id: I01c9d99349cc14133e43e1fd172c5f22489ca26e
Fix Headset button

Change-Id: I7c5e512066d545ac0d60b88113f209dbdab6557e
Signed-off-by: RonGokhale <cips173@gmail.com>
pecan is hungry for ram

Change-Id: I82e777085d0c02e0b45647a4eec0faf18d471c35
[M3-COMMON][Kernel]  code is added to read Power on status.

[TD] NA
[0] Read Power on status from modem and updated
/proc/sys/kernel/boot_reason file.     This patch is helps
to skip usbonline status polling delay in chargerlogo,
incase phone power-up with battery only.

Change-Id: Idb74184cd9f70dcd480f0d3e33e94569bb7e9995

Conflicts:

        arch/arm/configs/m3eu-perf_defconfig
        arch/arm/configs/m3mpcs-perf_defconfig
        arch/arm/mach-msm/lge/board-m3eu.c
        arch/arm/mach-msm/lge/board-m3mpcs.c
ram,ram and ram. pecan is so hungry for ram

Change-Id: I526a1743601711257cea8c7e59ed0ff16e96c063
No OC, no problem

Change-Id: I3276275350dfbab077d77df4c3fc70fec8ef3097
Implement OC properly for msm7x27 and msm7x27T

OC was not working in commit 2db1591247

Change-Id: I747bc1035da201ca992add2ed1948eb87ba6f159
Add smartassH3 governor
video: Rename fbcon's sysfs node

This is solely for the purpose of avoiding detection by surfaceflinger,
which causes a fallback to console mode we don't want
cpufreq: interactive: sync android-3.0 with android-3.4

Change-Id: I71443db4edbe43a08fe58a54a742b4c788ef11e3
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: Add a boostpulse interface to ondemand

For applications that require a one-shot increase in frequency,
the boostpulse interface would help to scale to max for the time
specified in boostime. This helps applications that currently
increases scaling_min_freq and resets later after a fixed duration.
Instead of changing scaling_min_freq applications can directly write
to boostpulse and governer resets during regular timer after the time
expires.

Change-Id: Ie5f490ff06b41364aa76dd468573433495da28a4
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
HACK: block fbearlysuspend to not break androids crt-off animation
[M3-COMMON][lcd] EBI2 LCD feature implemented

[TD] N/A
[0]  EBI2 LCD feature is not implemented yet by QCT. For verification EBI LCD on
 HDK, merge from 7x27 codes. If feature will be implemented by QCT, should be
 reverted.

Change-Id: I2ee557cea6a5846c469fa4f5293779ab6cfbc2fb
HID: uhid: introduce user-space I/O driver support for HID

This adds a dummy driver that will support user-space I/O drivers for the
HID subsystem. This allows to write transport-level drivers like USB-HID
and Bluetooth-HID in user-space.

Low-Energy Bluetooth needs this to feed HID data that is parsed in
user-space back into the kernel.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
HID: uhid: add internal message buffer

When receiving messages from the HID subsystem, we need to process them
and store them in an internal buffer so user-space can read() on the char
device to retrieve the messages.

This adds a static buffer for 32 messages to each uhid device. Each
message is dynamically allocated so the uhid_device structure does not get
too big.

uhid_queue() adds a message to the buffer. If the buffer is full, the
message is discarded. uhid_queue_event() is an helper for messages without
payload.

This also adds a public header: uhid.h. It contains the declarations for
the user-space API. It is built around "struct uhid_event" which contains
a type field which specifies the event type and each event can then add a
variable-length payload. For now, there is only a dummy event but later
patches will add new event types and payloads.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
HID: uhid: implement read() on uhid devices

User-space can use read() to get a single event from uhid devices. read()
does never return multiple events. This allows us to extend the event
structure and still keep backwards compatibility.

If user-space wants to get multiple events in one syscall, they should use
the readv()/writev() syscalls which are supported by uhid.

This introduces a new lock which helps us synchronizing simultaneous reads
from user-space. We also correctly return -EINVAL/-EFAULT only on errors
and retry the read() when some other thread captured the event faster than
we did.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
HID: uhid: implement write() on uhid devices

Similar to read() you can only write() a single event with one call to an
uhid device. To write multiple events use writev() which is supported by
uhid.

We currently always return -EOPNOTSUPP but other events will be added in
later patches.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
HID: uhid: add UHID_CREATE and UHID_DESTROY events

UHID_CREATE and UHID_DESTROY are used to create and destroy a device on an
open uhid char-device. Internally, we allocate and register an HID device
with the HID core and immediately start the device. From now on events may
be received or sent to the device.

The UHID_CREATE event has a payload similar to the data used by
Bluetooth-HIDP when creating a new connection.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>