msm: mdss: update the backlight only when successful commit

During suspend and resume, the first commit got called with
no overlay buffer.   The backlight is turned on regardless
of successful commit or not.   This then causes display
corruption.

Change-Id: I00fada5f6bedabf6ab0df97f6d429297d7fb601f
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
ASoC: wcd9xxx: Avoid plug type re-determination

In the case where there is mechanical interrupt
at the same time when polling scheduled for execution,
we should make sure that if plug type is found and reported
by the polling, re-determination from the insertion irq
should be avoided. Add a check in the insertion irq before
proceeding further to determine the plug type.

Change-Id: I0da017073700d3a362b6175f1292d603885b7ab1
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
msm: camera2: cpp: Reset MICRO block before clock enable

The MICRO can be triggered to enter in bad state when the
corresponding clock is enabled. This patch resets MICRO block and
then enables clock.

Change-Id: I08128211e561026eed76041e73fa971ba369576a
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
defconfig: enable imx132 sensor

enable imx132 sensor as front camera sensor.

Change-Id: Ib8751f44043e30447d694447e5e9b40a84356d4e
Signed-off-by: Xu Han <hanxu@codeaurora.org>
ARM: dts: msm: Enable flash for imx135 on mtp and fluid

Flash is enabled for camera sensor imx135 on 8974 mtp and fluid
devices.

Change-Id: Ic8bc74e8a76d156cb7c6f1bc6ff502b76d010e0b
Signed-off-by: Xu Han <hanxu@codeaurora.org>
msm: mdss: Validate input argument

MDP kernel function allocates memory using one of the input
parameters. Add sanity check for this input parameter to
ensure proper memory allocation.

Change-Id: Ib7ff3b02e818c0d2a623fb3428fb93cc5bd8e41e
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
msm: mdss: Prevent ALS data configuration when AD is disabled

If assertive display is disabled, backlight data structure is reset
to NULL, which in some conditons gets dereferenced or casuses
crash.

Change-Id: I535eac6d2f0aef222fc2846f80d72db1f3e3480d
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
ARM: dts: msm8226: Add qrd pvt device tree

QRD PVT device will use different pmic version
which have different hardware design that has to
be distinguished with original DVT and EVT.

Change-Id: I770e4bd9e77ac4257762dd7b06b5d8ad334efcfa
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
msm: mdss: fix double sync fence put in buf sync function

If an error occurs after setting acquire fds, the list of sync fences
will be put for cleanup. However if mdss_fb_wait_for_fence() is called
this will also wait and clear the list of fences, since we are relying
on local variable for cleanup, it may not reflect the state after the
function call. Fix this by maintaining the proper state of the list.

CRs-fixed: 548042
Change-Id: I4885eb393ac9bd2b4818292b9a60f53fb4baacc8
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
power: qpnp-charger: add charger OVP status monitor

Enable coarse-det-usb irq for charger OVP monitor. When insert a
high voltage charger, coarse-det-usb irq trigger, after wait for
usb valid debounce time, check the OVP condition, and report usb
health state; When an OVP happened in the process of charging, a
falling usbin valid_irq trigger, check OVP condition in usb plug
out condition, and report the usb health state.

Userspace can use the charger health state change to pop up
warning message when a charger, which exceeds the OVP threshold,
is connected.

Change-Id: Idedcdd7084aa24505675cf016d869444a89ca46c
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
ARM: dts: msm: enable ovp monitor for 8226 qrd

Enable ovp status monitor for high voltage charger.

Change-Id: I95f33dfa8bffc69d2878089d368b03477f8c054d
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
msm: Add image version reporting node into socinfo

Get smem block, which stores image version strings for all images and
export those strings to userspace through sysfs entries.

Change-Id: Ifb1a3d0670e6199e0d0d8da752c17bdda370bfe2
Signed-off-by: Yulian Shandorov <jshandorov@codeaurora.org>
msm: Add nodes in socinfo, to store APPS image version in SMEM

- Nodes for image_version, image_crm_version and image_variant updated in
order to store APPS image version.
- We get this info from userspace and pass it to SMEM.
- UGO write access added to select_image node, in order DIAG daemon
to be able to change it from userspace.

Change-Id: I57841c3c39ae1b7177f1a6592818a51ccb93cf97
Signed-off-by: Yulian Shandorov <jshandorov@codeaurora.org>
input: touchscreen: add option to ignore Focaltech family-id check

Focaltech touchscreen ICs may use different chip IDs for same module.
Add support to ignore ID check for such cases.

Change-Id: I0fe8da6a5e687317b4878b59ac5d1a4a4b620e1d
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
ARM: dts: msm: ignore Focaltech ID check for skug

Ignore family ID check so that driver can work with different
family IDs at same time.

Change-Id: I6989cb5ed6857e7166ed91a23679942c2ca6d442
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
sdhci: sdhci_stop_request() returns error when no request

There is race between sdhci_tasklet_finish()
and sdhci_stop_request(): when the request is finished before
stop flow called, error returned.

Change-Id: Ic036feae925b2e9e5435e44f97b24a179547bf49
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
mmc: core: skip stop flow when current request already done

When mmc_stop_request() has no request to stop, because underlying
host driver reported this, the flow should wait for the mmc done()
callback marking that urgent still pending.

Change-Id: Iacc95591ee76a965916af05a31a67dd8997c233e
CRs-Fixed: 538117
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
ASoC: msm: 8226: Fix button detection voltage thresholds

Adjust button detection thresholds to improve button
detection.

CRs-Fixed: 497319
Change-Id: I6721d14c281ece460ffbf70d8085db8d9bc84e10
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
msm: mdss: initialize pipe to NULL

Initialize the pipe pointer to NULL.
So that even if the selection of pipe from pipe-pool
fails, the function returns NULL instead of an
uninitialized value.

Change-Id: Ib04c0a983cba6ffe9532862bcaf516877e49746a
CRs-Fixed: 524466
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
msm: kgsl: Change the order of GPU global mappings

Move frequently accessed memories like read write pointers,
memstore and mmu setstate memory together. This helps
TLB prefetcher to always keep these entries in TLB.
If they are far apart they are going in and out of TLB
and causing XPU violations.

CRs-Fixed: 548223
Change-Id: I4aa72481ebab839745e4ad9b4dc9912925100dad
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>