ASoC: msm8x10: fix touch sound issue

Add timeout after amp shuting off to fix a tiny "echo" heard
issue when press any touch key if touch sound is enable.

Change-Id: I7fd2ae9bc63e8e0070450dd2128117d7610bb49a
Signed-off-by: Xiaomao Liu <exl002@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/608788
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
arm/dt: Allow LG panel to power off

Allow LG panel to completely power off when display is blanked.
Signed-off-by: Zac Crosby <azc095@motorola.com>

Change-Id: Iae181207d50883793aef182e0fdddcbc38696680
Reviewed-on: http://gerrit.pcs.mot.com/608518
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Shi-Yong Li <a22381@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
SLTApproved: Stephen Rossbach <rossbach@motorola.com>
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
arm/dt: Correct CMI 720p DTS entries

QCOM's commit 7fac86b3f from ES5 changed the defintion of multiple display
DTS entries.  For the CMI 720p DTS entries, some entries were not updated.

Change-Id: Ib0d708a205124ee2d7cb57811889d0bb5bbaf47a
Signed-off-by: Zac Crosby <azc095@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/608863
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-by: Shi-Yong Li <a22381@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
SLTApproved: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
defconfig: 8610: Enable CONFIG_INPUT_KEYCHORD

This enables the "magic keys" for bugreports.

Change-Id: Ic6bd21368bcb5aafc9831e9cfae7881bdf8ef154
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/609250
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
arm: dts: msm: add temp_alert in gpio map

Add gpio8 temp_alerm into gpio map to avoid the irq block
XOSD in idle for 8x10 devices.

Change-Id: Ib78eb6877926f6bcd9345b40da3d138d5334f761
Signed-off-by: Ke Lv <a2435c@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/608926
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Guo-Jian Chen <a21757@motorola.com>
Reviewed-by: Christopher Fries <c.fries@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
usb: otg: Return non factory cable if no ID_GND/ID_FLT found.

For Titan products, there is no id_gnd/id_flt GPIO pins for
factory cable detection. So need to return non factory cable if usb_gnd
usb_flt GPIO pins are not present.

This change will not impact other 8226 products with id_gnd/id_flt pins.

Change-Id: If3ffdfff19db39ad444cb16feadc019a6bf1dbb9
Signed-off-by: Jiangli Yuan <a6808c@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/608266
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Reviewed-by: Ravikumar Vembu <raviv@motorola.com>
Reviewed-by: Jiang-Li Yuan <jlyuan@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
ARM: allow the kernel text section to be made read-only

This patch implements CONFIG_DEBUG_RODATA, allowing
the kernel text section to be marked read-only in
order to catch bugs that write over the kernel.  This
requires mapping the kernel code, plus up to 4MB, using
pages instead of sections, which can increase TLB
pressure.

The kernel is normally mapped using 1MB section entries
in the first level page table, and the first level page
table is copied into every mm.  This prevents marking
the kernel text read-only, because the 1MB section
entries are too large granularity to separate the init
section, which is reused as read-write memory after
init, and the kernel text section.  Also, the top level
page table for every process would need to be updated,
which is not possible to do safely and efficiently on SMP.

To solve both problems, allow alloc_init_pte to overwrite
an existing section entry with a fully-populated second
level page table.  When CONFIG_DEBUG_RODATA is set, all
the section entries that overlap the kernel text section
will be replaced with page mappings.  The kernel always
uses a pair of 2MB-aligned 1MB sections, so up to 2MB
of memory before and after the kernel may end up page
mapped.

When the top level page tables are copied into each
process the second level page tables are not copied,
leaving a single second level page table that will
affect all processes on all cpus.  To mark a page
read-only, the second level page table is located using
the pointer in the first level page table for the
current process, and the supervisor RO bit is flipped
atomically.  Once all pages have been updated, all TLBs
are flushed to ensure the changes are visible on all
cpus.

If CONFIG_DEBUG_RODATA is not set, the kernel will be
mapped using the normal 1MB section entries.

Change-Id: I94fae337f882c2e123abaf8e1082c29cd5d483c6
Signed-off-by: Colin Cross <ccross@android.com>
(cherry picked from commit b4ef696dc1fc4f5c2a8bfa84dde2586e9a652e23)

Conflicts:

	arch/arm/mm/Makefile
	arch/arm/mm/mmu.c

Change-Id: Ibf695924d17d4082e2196e174d9b8e5ebfdbceb9
Reviewed-on: http://gerrit.pcs.mot.com/608286
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
ARM: mm: Allow an empty PMD in alloc_init_pte()

The Android patch titled "ARM: allow the kernel text section to
be made read-only" modifies alloc_init_pte() and adds a BUG_ON
to detect the case where a section mapping is being overwritten.
However the test doesn't allow for the legitimate case where the
PMD is empty, as can happen for kernels built with CONFIG_ARM_LPAE.
So extend the test to allow this.

Change-Id: I28eeaefd856bae63a5532980e41e0fd4d8922e79
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit 7a8ab31b78ad38a165f379a79db696ebe3c6e21b)
Reviewed-on: http://gerrit.pcs.mot.com/608287
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
video: backlight: register one LM3630A back light device only

- Registering both back light class and LED class devices at probe() would
  confuse Android user space adjusting back light brightness. Make such
  registering exclusive to address back light adjusting issue.
- Force LM3630A chip to exit sleep mode at initialization.

Change-Id: Iab00e542de5a13ece9d89f85255a29ef6177a623
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/609336
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
arm/dts: 8974: set i2c bus 3 speed to 400kHz for victara

I2C bus 3 currently runs at 100kHz. Touch sits on that bus and requires
higher frequency for better responsiveness.

Change-Id: I2b3609cbf45a4cde1cf3d7abae333d2207a2807f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/609103
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
usb: otg: Check ACA before handling missed id interrupts

The check for missed id interrupts is done without checking if ACA
(Accessory Charger Adaptor) is enabled. This is causing spurious noise
on the id line when disconnecting from charger to falsely trigger Host
mode detection. Hence conditionally check for missed id interrupts only
when ACA is enabled.

Change-Id: Ie7fd9c862611294898bfedaba3c27bf21b040fea
Signed-off-by: Ravi Vembu <a18394@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/609568
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Ravikumar Vembu <raviv@motorola.com>
Reviewed-by: Jason Knopsnyder <jasonk@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
msm: mmi: export pvs bin info

Export PVS Bin to /proc/msm_acpu_pvs. Also add bin info to panic log.

Change-Id: I0d72c77c771bda06d23e9a4bdd44c20c013acdcb
Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/608870
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Eyob Tesfu <Eyob.Tesfu@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
input: synaptics_dsx: fix resume info  collection

Clean up resume info collection.

Signed-off-by: Alexander Filonenko <vtp684@motorola.com>

Change-Id: I5972929a50e40590c1fe74750ace84096d78ead2
Reviewed-on: http://gerrit.pcs.mot.com/608888
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
hwmon: qpnp-adc: adjust loop conditions

Adjust the order of conditions for the loop to avoid reading
data after the array.

Change-Id: Ifc077eaa6414cda28d1482fcdf9fd20302deaf1b
Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/608887
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
msm: resart: Set reboot flag for adb reboot bootloader

Because the internal memory is not stable, the flag stored in it
is occasionally lost, causing bootloader can't detect the flag to
enter fastboot mode. This patch saves extra flag in PMIC register
when reboot bootloader command is issued.

Change-Id: I2b09ae7ffea598775f58ccfacdabd150bf5aae91
Signed-off-by: Stanley Lei <a23075@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/609366
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Reviewed-by: Dong-Hua Yan <a18317@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
arm/dts: victara: Update AMUX mapping

Update the AMUX mapping for Victara.

Change-Id: If35ba4c6668d202555c1aaa79a29fff0000caf1f
Signed-off-by: Jason Knopsnyder <jasonk@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/609608
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
msm: camera: DUAL LED flash implementation for 8084.

Added DUAL LED flash support on 8084.
This PORed flash is available on liquid also with IMX135.

(Motorola merge from 8084 to 8974)
Change-Id: Ie6d46176bff2d60512ac76176df33d64e68aa27a
Signed-off-by: Rajesh Bondgula <rajeshb@codeaurora.org>
Reviewed-on: http://gerrit.pcs.mot.com/608853
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Reviewed-by: Dave Schmidt <d.schmidt@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
msm: camera: Added flash node in 8084 dtsi.

Added DUAL LED flash dtsi support on 8084.
This PORed flash is available on liquid also with IMX135.

Change-Id: I4db17a624cee602a63212507d5c092a1a3f4b7dc
Signed-off-by: Rajesh Bondgula <rajeshb@codeaurora.org>
Reviewed-on: http://gerrit.pcs.mot.com/609603
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
arm/dts: victaria: fix 4th and 5th mic routing

4th and fifth mic's are connected to mic bias 2.

Change-Id: I535a6624263ff1c68c9810b8999f2bbe500fd57f
Signed-off-by: Prabhu Annabathula <prabhu.annabathula@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/609795
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
msm:config: add support for LM3646 flash driver

This change add config change for LM3646 flash.

Change-Id: Ia1fa686f86c9453112c83447394df3d65c341cf7
Signed-off-by: Alice Zhang <w18656@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/609099
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Dave Schmidt <d.schmidt@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>