SCHEDULER: Autogroup patch group by current user android UID instead of task ID

Signed-off-by: Seongmin Park <r_data@naver.com>
input: touchscreen: change filter parameters courtesy of viking37.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>

Conflicts:

	drivers/input/touchscreen/lge_touch_core.c

Signed-off-by: Seongmin Park <r_data@naver.com>

Conflicts:

	drivers/input/touchscreen/lge_touch_core.c
Revert "input: touchscreen: change filter parameters courtesy of viking37."

This reverts commit 479556917fbe7bba721fc97fb5487b113328c295.
input: touchscreen: change filter parameters courtesy of viking37.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>

Conflicts:

	drivers/input/touchscreen/lge_touch_core.c
cpufreq: interactive: when input_boost is enabled lets just boost to 702MHz instead of 1512MHz (hispeed_freq).

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>

Conflicts:

	drivers/cpufreq/cpufreq_interactive.c

Signed-off-by: Seongmin Park <r_data@naver.com>
hrtimer: Don't reinitialize a cpu_base's lock on CPU_UP

The current code makes the assumption that a cpu_base lock cannot
be held if a CPU is offline, which is tragically wrong.

If a hrtimer is not queued, then it will not be migrated by
migrate_hrtimers() when a CPU is offlined. Therefore, the
hrtimer's cpu_base may still point to a CPU which has
subsequently gone offline if the timer wasn't enqueued at the
time the CPU went down.

Normally this wouldn't be a problem, but a cpu_base's lock is
blindly reinitialized each time a CPU is brought up. If a CPU is
brought online during the period that another thread is
performing a hrtimer operation on a stale hrtimer, then the lock
will be reinitialized under its feet, and a SPIN_BUG() like the
following will be observed:

 [  448.212369] BUG: spinlock already unlocked on CPU#3,
 swapper/3/0
[  448.217368]  lock: 0xc47b1a40, .magic: dead4ead, .owner:
swapper/3/0, .owner_cpu: -1
[  448.217398] [<c0014398>] (unwind_backtrace+0x0/0x120) from
[<c0269ab0>] (do_raw_spin_unlock+0x44/0xdc)
[  448.217419] [<c0269ab0>] (do_raw_spin_unlock+0x44/0xdc) from
[<c071bbb0>] (_raw_spin_unlock_irqrestore+0xc/0x38)
[  448.217438] [<c071bbb0>]
(_raw_spin_unlock_irqrestore+0xc/0x38) from [<c00aa498>]
(hrtimer_try_to_cancel+0xf8/0x10c)
[  448.217455] [<c00aa498>] (hrtimer_try_to_cancel+0xf8/0x10c)
from [<c00aa4bc>] (hrtimer_cancel+0x10/0x20)
[  448.217475] [<c00aa4bc>] (hrtimer_cancel+0x10/0x20) from
[<c00e6934>] (rcu_idle_exit_common+0x5c/0xe0)
[  448.217494] [<c00e6934>] (rcu_idle_exit_common+0x5c/0xe0) from
[<c00e6ae8>] (rcu_idle_exit+0x9c/0xb4)
[  448.217514] [<c00e6ae8>] (rcu_idle_exit+0x9c/0xb4) from
[<c000f2dc>] (cpu_idle+0x98/0xf0)
[  448.217529] [<c000f2dc>] (cpu_idle+0x98/0xf0) from
[<000081ac>] (0x81ac)

CRs-Fixed: 460670
Change-Id: I588f6a864054abe6d4c249aad815c6d2f5a54077
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
drivers: mmc: disable CRC.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
mmc: core: Fix possbile memory leak

Fix possible memory leak detected by kmemleak:

unreferenced object 0xc0f80f00 (size 64):
  comm "swapper/0", pid 1, jiffies 4294937508 (age 82.980s)
  hex dump (first 32 bytes):
    6d 6d 63 30 5f 64 65 74 65 63 74 00 72 79 2e 68  mmc0_detect.ry.h
    00 07 00 00 68 77 63 61 70 2e 68 00 02 00 00 70  ....hwcap.h....p
  backtrace:
    [<c010a1fc>] __kmalloc+0x164/0x220
    [<c01e1630>] kvasprintf+0x38/0x58
    [<c01e1668>] kasprintf+0x18/0x24
    [<c02fcf60>] mmc_alloc_host+0x114/0x1b4
    [<c0311c84>] msmsdcc_probe+0xc14/0x1fd8
    [<c022b40c>] platform_drv_probe+0x14/0x18
    [<c022a144>] driver_probe_device+0x144/0x334
    [<c022a394>] __driver_attach+0x60/0x84
    [<c022884c>] bus_for_each_dev+0x4c/0x78
    [<c0229720>] bus_add_driver+0xd0/0x250
    [<c022a884>] driver_register+0x9c/0x128
    [<c00086bc>] do_one_initcall+0x90/0x160
    [<c06d1904>] kernel_init+0xe8/0x1a4
    [<c000ee4c>] kernel_thread_exit+0x0/0x8
    [<ffffffff>] 0xffffffff

Change-Id: I3b29d71463af849a072cabbe56637adf6db6d0da
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
msm: limit CPU frequency to 702MHz during screen of in case there is a wakeup and we don't need it to run at max freq to rape the battery.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
ASoC: WCD9310: Defer the setup of headphone removal detection.

After the inserted accessory is detected as a valid headphone,
polling is performed on the microphone to correct the accessory
detection in case it was wrongly identified as a headphone.

It was observed that at the end of polling, headphone removal
interrupt was fired, causing headphone playback to stop. Fixed
by deferring the headphone removal setup until either polling is
complete or polling detects a removal

CRs-fixed: 384967
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
(cherry picked from commit afc86431f330ee51f7980b620bef75935422c764)
(cherry picked from commit f87a8b2658964249917c815719d15abedd03771e)

Change-Id: Ic2c04aa300fc029957c71294e153aef479967b84
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
ASoC: wcd9310: reduce mbhc button release GPIO debounce time.

Current GPIO debounce time is too long so it delays next button
press detection.  Reduce this debounce time so driver can detect
next button press and release quickly.
Typically mic voltage ramps up within few milliseconds after button
release so 50ms is long enough.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit db606b0a39452c90e26692c22300c390f5822f29)
(cherry picked from commit 96e92e0a22a0c54f9cfda447d346c1a2dd9f4639)

Change-Id: Ibf0aa4d4c07fab9cd50021cb0e256ee23b320059
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
ASoC: wcd9310: Turn on EAR DAC and PA at the same time.

Turn on EAR DAC and EAR PA at the same time to avoid pop
at start of playback.

CRs-Fixed: 386288
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
(cherry picked from commit 7c85d71830e1781c113cf1d69234169e8feb31c9)
(cherry picked from commit deb584f6a8788dcda97a9d83038103ebd2576771)

Change-Id: Ib50f6a488fe93595423bae30164073cc25b90076
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
ASoC: wcd9310: Enhance OCP reporting logic.

CODEC has over current protection(OCP) finite state
machine for both left and right headphone while CODEC
driver tries to delay reporting of OCP event after
CODEC reporting OCP two times. Current CODEC driver
implementation results in unlocking one of headphone
power amplifier when OCP reported on both headphone.
Change the behavior to report OCP event for a give
headphone immediately if OCP already occurs on opposite
headphone.

CRs-fixed: 339620
Signed-off-by: Patrick Lai <plai@codeaurora.org>
(cherry picked from commit c2d833d524c1230c72f2d078b543baba7a8db26f)
(cherry picked from commit 6b8cacf2d5ed669048c3813b56851c10fe5c5af1)

Change-Id: Iea28c8baa1a6372dcb4c0214ec0e74bfc483f563
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
ASoC: wcd9310: Fix NULL pointer dereference.

If sound card is not yet initialized the platform device's private data
is not set either.  Check if private data is NULL before use it.

CRs-fixed: 400055
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit d6e48bd07516ecc683a995ebf8eedf080f14016d)
(cherry picked from commit 87ba6ce49d4f50ad089702135e84ecad5446bfad)

Change-Id: I94e45366d8f316ea8e69def48cc926cdd971f5a6
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
ASoC: wcd9310: Resend edge triggered GPIO IRQ

If MBHC GPIO IRQ for mechanical headset detection asserted while power
management's suspend call chain is being called, wcd9xxx_lock_sleep will
fail to wait for system's resume since power management interface has
to finish suspend in order to resume system.
In this case, interrupt cannot be handled as codec driver cannot
guarantee if underlying bus is awake.
Wake up system and resend the IRQ for this situation.

(cherry picked from commit ecf379cd17b7fe94e6f0df0598a472b6f1828ad5)
(cherry picked from commit bdda99b93915d217150f5484f9c718c905703f1e)
CRs-fixed: 404167
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>

Change-Id: Id5970b359b80e0cd1f701b30c61ade23e0f67b9e
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
ASoC: wcd9310: Update wcd9310 compander configuration

Update the Compander register settings to remain the default
settings after the system bootup and optimize compander
configuration sequence.

Change-Id: Ib475f3bb84414546b4ead1d3f013dc173317e1b3
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>

Conflicts:

	sound/soc/codecs/wcd9310.c

Signed-off-by: Seongmin Park <r_data@naver.com>
ASoC: wcd9310: Correct the mixer controls for Compander switches

- Compander1 never gets enabled though the user space sets the
  corresponding mixer control.
- Compander switch kcontrols are configured wrongly as integer
  type with max value as 0.
- Correct kcontrol creation to fix the issue.

CRs-Fixed: 441091

Change-Id: Iad99b44c9226da3bcc1132e61ea989a0543ae56e
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
(cherry picked from commit 4e3f5247bcd098ad1488caa3ecdc3b506e9efbf7)

Signed-off-by: Seongmin Park <r_data@naver.com>
Sound Control: Sound control for WCD93xx codec

Fully GPL'ed version.

Signed-off-by: faux123 <reioux@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>