Set timer rate to 30, 20 destroys battery

Change-Id: I4ddccc9369f7dc22f6299c07a45fc45b64472313
cpufreq: interactive: Optimize sync_freq implementation

Don't let frequency drop below sync_freq if either load or
frequency among other cpus is above a certain threshold,
not necessarily both.

Change-Id: Iada28e08e812498e16d5189b309a7314f88814dd
LCD_KCAL: Color Control driver for Nexus 5

Conflicts:
	drivers/video/msm/mdss/mdss_mdp_pp.c

Enable LCD_KCAL

Change-Id: Icea713b84ccf5dc87cd80eafd7363deffb438565
Signed-off-by: Lorenzo M <djmesias@yahoo.es>
n_tty: Fix n_tty_write crash when echoing in raw mode

The tty atomic_write_lock does not provide an exclusion guarantee for
the tty driver if the termios settings are LECHO & !OPOST.  And since
it is unexpected and not allowed to call TTY buffer helpers like
tty_insert_flip_string concurrently, this may lead to crashes when
concurrect writers call pty_write. In that case the following two
writers:
* the ECHOing from a workqueue and
* pty_write from the process
race and can overflow the corresponding TTY buffer like follows.
If we look into tty_insert_flip_string_fixed_flag, there is:
  int space = __tty_buffer_request_room(port, goal, flags);
  struct tty_buffer *tb = port->buf.tail;
  ...
  memcpy(char_buf_ptr(tb, tb->used), chars, space);
  ...
  tb->used += space;
so the race of the two can result in something like this:
              A                                B
__tty_buffer_request_room
                                  __tty_buffer_request_room
memcpy(buf(tb->used), ...)
tb->used += space;
                                  memcpy(buf(tb->used), ...) ->BOOM
B's memcpy is past the tty_buffer due to the previous A's tb->used
increment.
Since the N_TTY line discipline input processing can output
concurrently with a tty write, obtain the N_TTY ldisc output_lock to
serialize echo output with normal tty writes.  This ensures the tty
buffer helper tty_insert_flip_string is not called concurrently and
everything is fine.
Note that this is nicely reproducible by an ordinary user using
forkpty and some setup around that (raw termios + ECHO). And it is
present in kernels at least after commit
d945cb9cce20ac7143c2de8d88b187f62db99bdc (pty: Rework the pty layer to
use the normal buffering logic) in 2.6.31-rc3.
js: add more info to the commit log
js: switch to bool
js: lock unconditionally
js: lock only the tty->ops->write call
Change-Id: Ie0b03989fa8cfd6ffe40d1f770044fe7447dda05
References: CVE-2014-0196
Reported-and-tested-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.4: output_lock is a member of struct tty_struct]
fs/super.c: sync ro remount after blocking writers

Move sync_filesystem() after sb_prepare_remount_readonly().  If writers
sneak in anywhere from sync_filesystem() to sb_prepare_remount_readonly()
it can cause inodes to be dirtied and writeback to occur well after
sys_mount() has completely successfully.

This was spotted by corrupted ubifs filesystems on reboot, but appears
that it can cause issues with any filesystem using writeback.

CRs-Fixed: 627559
Change-Id: Ib417b59d39210aab2de4e5ae48b18129e8bc3e26
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
CC: Richard Weinberger <richard@nod.at>
Co-authored-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 807612db2f9940b9fa6deaef054eb16d51bd3e00
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
arch/arm/mach-msm/sensors_adsp.c: fix compiler warning

Warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
Necessary for GCC 4.8 compilation

Change-Id: I85a6a25cf99174c8da328a39ed65c6f7a1335910
net/bluetooth/hci_conn.c: fix compiler warning

Warning: argument to 'sizeof' in 'memcpy' call is the same pointer type '__u8 *' as the destination; expected '__u8' or an explicit length [-Wsizeof-pointer-memaccess]
Necessary for GCC 4.8 compilation

Change-Id: Ib4352eb7b71c425efed80ef066b0766cab575545
msm: rq_stats: Use cpufreq API to get the current frequency

Since the acpuclock APIs are deprecated, use the cpufreq to
get the current frequency of CPUs to calculate the cpu
normalized load value.

Change-Id: I6e381d584d6725ef964bad86c835d44f3046e9c3
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
msm: rq_stats: Fix wrong usage of cpufreq_quick_get()

cpufreq_quick_get() returns frequency in KHz, which is exactly what
cur_freq expect. Remove the wrong multiplication.

CRs-fixed: 645518
Change-Id: Ia8b080a188023964f5eee77c8586828097d11ad4
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
msm: rq_stats: Calculate load based on current freq limit

Prior to this patch, load has been calculated based on an
initial value of policy.cpuinfo.max_freq. This value may
change for several reasons: userspace settings or thermal
throttling (hello hammerhead!). This results in unreliable
calculations that confuse mpdecision which accesses
/sys/devices/system/cpu/cpu0/rq-stats/* for stats info.
Consider current policy.max to fix this behaviour.

Change-Id: Iae1f2fc7f4aa470f7e80371c1ebcf7be423f51ca
msm: kgsl: Fix nice level for higher priority GPU start thread

Before, we were actually setting the lowest possible priority.

Change-Id: I3a52de949eee0faea8061dd91ed303fa8231f0d4
input:touch_synaptics_ds5: Firmware J080 (J1)

- add a new touch type for new ORISE J1 Panel (type 2)
- frequency table and integration duration change to support new panel
- improved ghost touch with noisy charger
- improved low temperature performance
- improved ghost touch caused by some specific credit card
- improved thumb operation

Change-Id: Ic96f6dda6b337fa3fbd6178a92affcf3caf7833d
Signed-off-by: yejini.lee <yejini.lee@lge.com>
Signed-off-by: Jongrak Kwon <jongrak.kwon@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
arm/dt: hammerhead: set touch type 2 for J1

Change-Id: Ia39d736e890dec03678f7be4ceccce1b2ce6b79b
Signed-off-by: yejini.lee <yejini.lee@lge.com>
Signed-off-by: Jongrak Kwon <jongrak.kwon@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
arm/dt: hammerhead: Update the gamma value for J1

update date: 11/14/2013
Change-Id: Iaaf72708030d3f4e032f0be87300f3bb8f110da8
Signed-off-by: sooduek.kim <sooduek.kim@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
msm: jpeg: Handle ERESTARTSYS properly

ERESTARTSYS return code for wait_* functions should be
propogated all the way to ioctl call.

Bug: 11856490
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
Revert "msm: jpeg: Handle ERESTARTSYS properly"

This reverts commit b90c643341b58ba18877aa0181defdb57b3225c6.

Change-Id: I1a25a1211d0b897c0dda8b75ac53b42f61f4ce6a
Revert "Revert "msm: jpeg: Handle ERESTARTSYS properly""

This reverts commit 8e37eb274b986628da2ebad0947a52c7c0325225.

Change-Id: I4b33e161d379445a008196ea4a93b4c919d4a97b
hammerhead_defconfig: Enable usb tablet devices and xpad

Bug: 11759904
Change-Id: If83a00279300c9d069d737cfa70fd15f406b73a3
Signed-off-by: jude84.kim <jude84.kim@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
arm/dt: hammerhead: Update the gamma value for J1 (11/26/2013)

Change-Id: Ie5a83570db648689cdd4ec1e2c237a6f8f046532
Signed-off-by: sooduek.kim <sooduek.kim@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
arm/dt: msm8974: Change I2C clock for main and sub camera separately

Change I2C clock for main and sub camera separately

Change-Id: I76c75c7a91362df5e8eabc5e9b9d596a92657f60

Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>