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>
msm: camera: Use correct type for function return code

Using an unsigned integer to hold the signed return code
is wrong. So fix it by using the correct type to hold the
return code.

CRs-fixed: 512824
Change-Id: I389732a9af740174b26c8c43946e638a1be0d2a2
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
msm: camera: Fix various small issues in cci driver

Remove some unused ioctl exposed, Also add
some bound checks for ioctl user params.

Change-Id: Ifdd441fdb25fd20b005c4e4e1ebe4e203f1216ac
CRs-Fixed: 511382
Signed-off-by: Hariram Purushothaman <hpurus@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
msm: camera_v2: CCI release resources in case of timeout

Turn off the CCI clocks and release gpio if reset timeout error is
received in function_msm_cci_init()

Bug: 11825720
Change-Id: Ib4387ce08635e0b4e6458f225bd3013557d6b5fa
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
msm: camera_v2: Don't touch CCI if camera daemon crashed.

If daemon crashes, refrain from writing to the CCI. This is needed
because these writes will not wait in a process crash scenario and can
potentially leave the CCI in a bad state.

Change-Id: I785cb4af8dc3893b8a7f11e1d1c2a2e1ad775665
Signed-off-by: Satyavaraprasad Yerramsetti <satyav@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
msm: camera: Reset CCI core based on I2C MASTER

CCI core is used by camera sensor, actuator and EEPROM. CCI core gets
reset first time when either one of hardware modules initializes it.
But, as per hardware requirement sensor has to be powered up before
CCI can be reset. This imposes limitation in the sequence in which
camera is opened. To remove this limitation, initialize CCI core
only for corresponding I2C MASTER everytime either of the hardware
modules initilizes it.

Change-Id: If2d7cc26fe23533243714839e6375f73d5efd4f2
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
msm: camera: Checking an enum value greater than zero

An enum value cci_i2c_master is not checked to be greater than 0.
Add the check.

Change-Id: Ibe75ab7155def45d81b8127c5eda3fa2ed570bce
Signed-off-by: Xu Han <hanxu@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
msm: cci: fix for invalid error handle

fix for invalid error handle in msm cci
- msm_cci_flush_queue function never return
error because variable rc is unsigned int
- msm_cci_init function return result int32_t
but variable rc is int

Change-Id: I2610b08f4eceedfbb8bd07d8027310f43b9ee6bf
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
ASoC: msm-hdmi-codec-rx: sync state with HDMI core

To keep the state of the HDMI core and HDMI audio
sessions congruent, audio checks the state of the
core on startup, then notifies the core of the
active audio session.  On shutdown, notifies the
core of the event.

Change-Id: I8f90a4610ed9345c1affa67a7fee306e7d388d85
CRs-Fixed: 539309
Author: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Devin Kim <dojip.kim@lge.com>