ASoC: wcd9310: Fix kernel oops on i2c interface suspend

The wcd9310 codec hardware requires to register multiple i2c interfaces
in order to access all the hardware registers since single i2c interface
can provide 8bit address range only.
Fix kernel oops by calling suspend only from the first ic2 interface.

CRs-fixed: 337647
Change-Id: Ifdcdff4c2d611870f92137fddea5efb48b86c649
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
msm-camera: vertical and horizontal view angle of lens added.

The application layer expects the view angle of the camera lens.
The lens vertical and horizontal view angle of the sensors
imx074 and ov2720 are added.

CRs-Fixed: 328252
Signed-off-by: Jeyaprakash Soundrapandian <jsound@codeaurora.org>
(cherry picked from commit 04592007f7fd2dcff87ed034b8767dcc9550f08b)

Change-Id: I905c577bea862f6a8c7636606e0d75f2bd6162b5
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
Bluetooth: Skip ERTM queue processing when there are receive errors

An application may call recv() on a disconnected socket if the
connection has unexpectedly dropped.  In this case, the socket may
still exist, but it will be in an error state and the L2CAP connection
will be mostly torn down.

A crash was observed when the ERTM code attempted to send an ACK when
the L2CAP connection was not up.  If the error state is detected and
ERTM queue processing is skipped, then the crash is avoided and the
recv() call just returns an error in userspace.

CRs-fixed: 336000
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
(cherry picked from commit 28eb3fab3577414b3088123a9e5dfc2b83a9e2c4)

Change-Id: I44cf5930291f58d36f30a1c182d566f926b4a032
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>
Merge "msm-camera: vertical and horizontal view angle of lens added." into ics_chocolate
msm_fb: display: call mdp_pipe_ctrl() with correct block name

Mdp_pipe_ctrl() needs to be called symmetrically within same
block name for both ON and OFF operation so that mdp clock will
be turned off after OFF operation.

CRs-fixed: 338802
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 8d19d0d22e03dba3b2b08356bc18ed1b2987e70c)

Change-Id: I3b8931bece932e7644abba0ca0ef5b8fe617ff57
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>
Bluetooth: Handle error command status for AUTH_REQUESTED command

When AUTH_REQUESTED command status is error status, do the bonding
cleanup, so that there will not be any problem for next time
pairing process and in user space.

CRs-fixed: 331126
Signed-off-by: Prabhakaran Mc <prabhakaranmc@codeaurora.org>
(cherry picked from commit 7953ca7e408486efc37022da76f4a77742b3437d)

Change-Id: Iaa56720ccc7ee7e0997b506d29f476e126362c6d
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>
wcnss: cancel APPS vote for Iris & Riva regulators after SSR

Once Riva is up, cancel any APPS vote for Iris & Riva regulators
after SSR. Riva will request regulators for itself after power-on.
And RPM won't turn this off even when Riva doesn't need it, if the
APPS vote is still on.

CRs-Fixed: 337525
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
(cherry picked from commit 74ce6d0a52a5d6df304d4b509939b2ec903fa051)

Change-Id: Id0ded8eb42e97cc9c8768dec5b9bdc3f660854b6
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>
USB: OTG: msm: Add debugfs entry to disable MSM BUS bandwidth voting

OTG driver requests for high bus bandwidth as long as USB cable is
connected to improve USB throughput. This vote causes scaling up of
fabric frequencies and increase in the over system power consumption.

Some users might not be interested in this feature or may want to
disable this at runtime for profiling the system performance with USB
cable attached.
Hence, add a debugfs entry to allow users to disable this voting.
By default this feature is enabled.

Command to disable BUS voting from USB:
echo "disable" > <debugfs>/msm_otg/bus_voting

CRs-fixed: 341452
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
(cherry picked from commit 8bdcc591579975f830e19d2d847078f735d55e64)

Change-Id: Ib713265d58a2fa36b93c50849f60486ecaa80f21
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>
msm_fb: display: call mdp_pipe_ctrl() with correct block name

Mdp_pipe_ctrl() needs to be called symmetrically within same
block name for both ON and OFF operation so that mdp clock will
be turned off after OFF operation.

CRs-fixed: 338802
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 8d19d0d22e03dba3b2b08356bc18ed1b2987e70c)

Change-Id: I619f1258675c1a5c116ec34b45fa74227b721634
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>
msm_fb: display: decrease file->f_count when play

Frame buffer's (fb0) f_count needed to be decreased after both
overlay play and rotation so that fb0 can be closed and display
will be blanked out after system suspended.

CRs-fixed: 336254
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit beaa9356713db6949eefa32ed329bf87a3461842)

Change-Id: Ibaeb537bffedc473b6ce49531385aed3b791710d
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>
diag: Increase itemsize of diag memory pool.

Diag allocates memory objects from mempool for copying packet from user
space to kernel space. Fix increases oject size of mempool to 4KB and any
packet of size greater than 4KB is dropped.

CRs-Fixed: 326579
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
(cherry picked from commit 1fe33273a471084bd506505c3a59c7ce95e46f93)

Change-Id: I007768b00f283debba405148d680f78e68628570
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>
arm: Turn off generic lockbreak when using ticket spinlocks

CONFIG_GENERIC_LOCKBREAK can still cause livelocks in some situations,
even when using ticket spinlocks.

Change-Id: I9db23589ffe1d054e9a359804a6c4858baeb6602
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
(cherry picked from commit 8a9e3936053600b647921b6196e667772f815857)
msm: spm-v2: Log SPM configuration

Enable RTB logging of SPM_CTL and SPM_STS0 for all SPMs.

Change-Id: Ie0e68f63d8ebd839c6642b7661c6ac0f8f318c33
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/include/mach/msm_rtb.h
	arch/arm/mach-msm/spm-v2.c

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
Revert old versions of L1 cache error reporting changes

This reverts commit 6d686e858ace36dda8c06b0cb032e1e27b265142.
This reverts commit 660bbfec3e91af86a09f9543511a51398d19e01e.
This reverts commit fae12eec06fb2d9878b2c9480dea231e75884ab2.

Change-Id: I2c78bb41cb72c3fa63025ebaf60dfa4c4b43bdba
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Zhoulu Luo <zluo@codeauroroa.org>
msm: Add support for cache error reporting

Add support for reporting L1 / L2 cache errors and TLB
errors, as well as printing a warning in the kernel log (or
optionally panicing the kernel) depending on error
severity.

Change-Id: I667f8bdc187fe6b5eec3c77fe39a898f9cc14c1b
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm: board: Add cache error reporting devices

Add the cache ERP devices for 8960 and 8064, and add these
devices to the common device lists in the board files for
8960, 8930, and 8064.

Change-Id: Ibea277e3869c5785c0870c47df9697f54b0636bc
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
defconfig: msm8960: Enable cache error reporting

Enable cache error reporting in the defconfig, and
configure the kernel to panic if unrecoverable L2 errors
are encountered.

Change-Id: I9f9bc275c942c8fcbbcf353b57888c8d2e6cbc03
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
defconfig: msm8959: Enable panic on L1 and L2 data errors

Panic the kernel if the system encounters an error in the
L1 cache, or a recoverable error in the L2 cache.

Change-Id: Idc0238fc4f39768e78d6f82114ea818bdcb1ea5c
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
mfd: pm8xxx-misc: add an API to preload the dVdd regulator

Add a new API, pm8xxx_preload_dVdd, which will preload the dVdd
regulator on PMIC PM8901 chips during off state. This can help
to reduce fluctuations in the dVdd voltage during startup at the
cost of additional off state current draw.

This API should only be called if dVdd startup issues are
suspected.

CRs-Fixed: 326086
Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit 4724272b4be43ed02eb77824069eb4334a853520)

Change-Id: I45c4d6c6dedd1d142a7e58ba2386a63861a547d6
Signed-off-by: c_rcheba <rcheba@codeaurora.org>
msm: timer: Loop on clear status bit after clearing timer

Without looping on the status bit, there is no way to guarantee that a
clear of a timer has actually gone through. This can cause us to read
stale, uncleared count values, and set incorrect match values based on
them.

Additionally, remove an extraneous write to the count register, and make
the write to the clear register consistently a 0 across all cores.

CRs-Fixed: 337526
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
(cherry picked from commit 6c47a27b53ff2aaaa6d40460007c00782dbc4962)

Change-Id: Id9ed3e32390e94d978e5689e0ed15f159b306932
Signed-off-by: c_rcheba <rcheba@codeaurora.org>