ARM: dts: msm: tuning 8x12 skuab hx8389b panel with gamma 2.2

Panel's gamma curve should be standard 2.2 or 2.6 curve.
Tuning 8x12 skuab hx8389b panel to standard 2.2 curve.

Change-Id: I9aad5ba006bb75e6650ae53933ea88acc206e4c5
Signed-off-by: Shuo Yan <shuoy@codeaurora.org>
ARM: dts: msm: adjust 8x12 skuab HX8389B mipi clock to 240.42MHZ

Currently, mipi clocking running at 276MHZ which affects GSM signal
on 8x12 SKUAB Himax8389b panel. Changing the mipi clock frequency
to 240.42MHZ to avoid RF interference.

Change-Id: I3fb3d3d3303464056cc71f48b6356698195c4b55
Signed-off-by: Shuo Yan <shuoy@codeaurora.org>
msm: cache_erp: Remove acpuclk_get_rate call

acpuclk_get_rate is deprecated, and will just return 0. Remove the call
since it's only for debugging printing.

Change-Id: I7137a2e395825d2756b09d851f18df07df59dad9
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
msm: cpr-regulator: add debug message in cpr_scale

Add debug message in cpr_scale to show gcnt and quotient when ceiling or
floor is hit.

Change-Id: I6bb6f5160f9f0b3d9140384871b0258b0ecac388
Signed-off-by: Ke Liu <keliu@codeaurora.org>
msm: mdss: enable vsync event during continuous splash

Currently when continuous splash screen is enabled the vsync
event reports are delayed until first frame update. This blocks
boot animation. To fix this issue, after user space enables
vsync through vsync_ctrl, mdp driver will start sending vsync
events.

CRs-fixed: 567649
Change-Id: Ifb35e3479805e595d950ab7c38c26de201aa2d16
Signed-off-by: Ray Zhang <rayzhang@codeaurora.org>
gpu: ion: Don't recursively take secure chunk lock

During allocation, the chunk_lock is taken to protect the chunk
list. dma_alloc_coherent may invoke the shrinker which also tries
to take the chunk_lock. This leads to a deadlock. If the mutex is
already locked in the shrinker, just return -1 as specifed by the
shrinker API to signal this condition.

Change-Id: I5525ecfcdc6deea61024f0008c62026103728571
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: mdss: Add error handling support for DCS command APIs

Currently there is no error handling done for DSI DCS command
APIs like mdss_dsi_cmdlist_put. So for ESD thread use cases,
the caller functions of these DCS command APIs do not have error
propagated if the panel read/write commands fail. Hence add support
for error handling for these functions.

Change-Id: I0e558fd32fbfd8ae247b60c92fa2756159c3d3c6
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: kgsl: Changing to kref_get_unless_zero for process refcount

Do not allow anything to get a refcount to the process_private
structure if its refcount has gone down to 0.

Change-Id: I7cd6f731286aebfc84c288284599b47f666dcd47
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
ASoC: msm: Fix for incall music delivery on VoLTE

Add support for incall music delivery on VoLTE.
VoLTE session will use the same pseudo port ID
as the voice session, so for port 8005 we start
playback on both voice and VoLTE session.

CRs-fixed: 583740
Change-Id: I20e03ab27287807f0afcc432269673b7ef5dbda0
Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
scsi: Allow auto suspend override by low-level driver

Until now the scsi mid-layer forbids runtime suspend till userspace
enables it. This is mainly to quarantine some disks with broken
runtime power management or have high latencies executing suspend
resume callbacks. If the userspace doesn't enable the runtime suspend
the underlying hardware will be always on even when it is not doing
any useful work and thus wasting power.

Some low-level drivers for the controllers can efficiently use runtime
power management to reduce power consumption and improve battery life.
Allow runtime suspend parameters override within the LLD itself
instead of waiting for userspace to control the power management.

Change-Id: I03e96a89d19c174deeb5bd4f94136c77073eb009
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
scsi: ufs: Override auto suspend tunables for ufs

Override auto suspend tunables for UFS device LUNs during
initialization so as to efficiently manage background operations
and the power consumption.

Change-Id: Id7ff9e8a5c83b7503a329e71936af3234a22895b
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
diag: Fix improper handling of Diag real time vote IOCTL

Diag driver continues to process data copied from user space even
when it is invalid. Make changes to return from the function when
this happens.

Change-Id: Ieae335c908615dc63b977b7253b0d219e7db600e
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
ARM: dts: msm: Config I2C on BLSP2 QUP5 for 8092

Configure and enable the I2C controller at BLSP2 QUP5
for the 8092 chipset.

Change-Id: I590b65a80219af7af781c088dd2d05aeecf8c04b
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
msm: kgsl: Mark A4XX PWR and VBIF_PWR counter groups as fixed

As A3XX mark the A4XX PWR and VBIF_PWR performance counter groups
as fixed and simplify the macros as much as possible.

Change-Id: Ic0dedbade78ab7007f07db0148ada7e6effc7dce
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Consolidate sysfs store functions

Many of our sysfs _store hooks grok unsigned ints.  Use a common
function to replace the various sscanf() and strtoul() calls
scattered throughout the code.

Change-Id: Ic0dedbad792a300f97ba36882a4346d2dc28e521
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: ssr: Correct storing the wdog_irq resource start address

Currently, even if platform_get_irq fails, the error value is being
stored in the wdog_bite_irq variable instead of it remaining as
zero.
Correct the behavior to store proper IRQ values.

Change-Id: I3f522ce865dbe88c47d3af168a805ce763be1f7e
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
msm: clock-8084: Add USB SSPHY reset clocks

Assign clock lookup entries for gcc_usb30_phy_com and
gcc_usb3_phy reset clocks to the primary SSPHY. These
will be used by the USB driver in order to reset when
going in/out of power collapse.

Change-Id: Ibb512f406620736fcf0b5de1d9ea15151fa30675
Signed-off-by: Jack Pham <jackp@codeaurora.org>
ARM: dts: msm: Disable secondary USB & dock on APQ8084 Liquid

Temporarily disable the secondary USB & docking station
functionality on this target. The current design is harming
power consumption as the secondary controller is never
allowing the XO to shutdown. These can be added back when a
proper fix is made.

This partially reverts commit 3c5b9ada "ARM: dts: msm: Add
secondary USB 3.0 controller to apq8084".

Change-Id: Iad60ce8eaa6b18d6d62c91a52e1ebb3e9a88d504
Signed-off-by: Jack Pham <jackp@codeaurora.org>
ARM: dts: msm: Add slimbus satellite device for mpq8092

Add slimbus controller device in satellite mode on mpq8092.
Slimbus controller is used by codec/audio.

Change-Id: I948162a842abb1b3e8d95e475e0bc347f637d8b5
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
NFC: Implement disable and clock enable using ioctl

nfcc will be off by default when power on by asserting disable
high and will be switched on when nfc user mode driver will be
on using power ioctl.

Change-Id: Ifcfc031a1fee226bbe8d3966f753ceeaacaca0f4
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Houston Hoffman <hhoffman@codeaurora.org>