IKQCOMSD1-539: Add Support for Battery Temperature Charging Thresholds

This Change Implements both the Extended Range and the
Out of Temperature Ranges.  The Battery Can only be
Charged to 3.8 V in the Extended Range and can not be
Charged at all in the Out of Temperature Range.  Also
If the Phone escapes 10 degrees C in either hte Hot or
Cold direction past the Out Thresholds the Phone will
Shutdown.

Change-Id: Ie526b5b4673fe3272e17aea22c1e1fb911fa9c8a
Signed-off-by: w65789 <w65789@motorola.com>
Change-Id: I5d3dced484636720d7f5e41b12ac47ce891ed62e
Reviewed-on: http://gerrit.pcs.mot.com/325010
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>

Conflicts:
	drivers/power/pm8921-charger.c
IKQCOMSD1-738 Support ftrace and fix function tracer nesting hang

1. Enable ftrace basic event tracer.
2. Fix function tracer and function_graph tracer nesting hang issue.
3. Disable dynamic function tracer due to text section core modification failure.
4. The function trace is not enabled in default for system performance purpose.

Change-Id: I420eae044be8687ae91c1d112c13fee055e74317
Signed-off-by: Dong-Dong Yang <gdb746@motorola.com>
Change-Id: Icebb17aaf5fa426cd2b460f9e52f14545a2b2925
Reviewed-on: http://gerrit.pcs.mot.com/324149
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
IKQCOMSD1-717: Bringup of lm3556 led driver IC

Initial bringup of lm3556 with functionalities:
	* Torch
	* Flash(Strobe)

Change-Id: Ia37aedde47141a9485e7d68ad269c85de94426a6
Signed-off-by: Amey Sadashiv Moghe <WBGD48@motorola.com>
Change-Id: Ie16a527b8886313b19766e2505e146a614fd134f
Reviewed-on: http://gerrit.pcs.mot.com/322904
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
IKQCOMSD1-717: Config option for lm3556 IC

msm8960_mmi_defconfig: Added config option
CONFIG_LEDS_LM3556 for lm3556 led flash driver IC

Change-Id: I839210c8ef393373b6249a841a1316b36d03b80f
Signed-off-by: Amey Sadashiv Moghe <WBGD48@motorola.com>
Change-Id: I18ff66d0bc5fdc26511008cfe186f6460b342e69
Reviewed-on: http://gerrit.pcs.mot.com/322905
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Reviewed-by: Subramanian Anandaraj <subbu.anandaraj@motorola.com>
IKQCOMSD1-821 Fix the cyttsp touch can not use on 8960

The ICS changes the framework of input, the multi-touch need
to set input bit INPUT_PROP_DIRECT to distinguish the pointer
event and touch event.

Change-Id: I51a8d8443e70b092b9669a6b1a5df77a6cfe6c41
Signed-off-by: Fu-Xin Li <BRND64@motorola.com>
IKQCOMSD1-789: Modify Battery Thermistor Table

This Change adds support to the pm8xxx-adc driver for passing
the scaling tables for various adc types to the driver from
the board file.  MMI has a differnet external bias circuit
then the QCOM reference design so this is needed for accuracy.

Change-Id: I91a5ff541ea27bc1242e6b9035765b82ed625b0a
Signed-off-by: w65789 <w65789@motorola.com>
Change-Id: Ic792afd66f308780cc3c7f2c44542d44269803c4
Reviewed-on: http://gerrit.pcs.mot.com/326821
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>

Conflicts:
	drivers/hwmon/pm8xxx-adc.c
IKQCOMSD1-745: remove __init for msm8960_change_memory_power()

The function msm8960_change_memory_power() is registered as a
callback. It should not be marked as __init.

Change-Id: I8972c1eab31e93f67d725f82ad5a614048bb0db7
Signed-off-by: Yuanyuan Zhong <a6510c@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/327415
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
IKQCOMSD1-868: Add EB20 Prelim Table

The EB20 was initially created with a Preliminary Eprom
Table.  This Adds the Data for Matching to that Table so
that chargin works properly with packs programmed that way.

Change-Id: I7228290d02be20cb83016464b2782ddf14f526f6
Signed-off-by: w65789 <w65789@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/328321
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
IKQCOMSD1-894 - Expose battery's aged capacity via sysfs

Required to expose the battery's aged capacity (in percentage) via
'cycle_count' battery property.  This information is stored as a
BMS parameter, however it is calculated & persisted in userspace.
So need to expose a method to allow permissioned userspace app to update
BMS parameter.

Change-Id: I3b600c9132abb8db2e0ada8c3c1ee74ec1bccf2a
Signed-off-by: Zachary Crosby <azc095@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/328870
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Igor Kovalenko <Igor.Kovalenko@motorola.com>

Conflicts:
	drivers/power/pm8921-bms.c
msm: audio: qdsp6v2: Increase audio PMEM size by 164K

Increase audio PMEM size to 164K to support quad-mic
calibration and AFE calibration. Quad-mic calibration
is used to calibrate the quad-mic device for voice
calls and audio record. AFE calibraiton is used for
RMC and speaker protection.

Change-Id: I84b3ca1e48f2edf68ebf19057b6671c05d4de63e
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
[jeff.carlyle@motorola.com: adapted from 3ffcd813398884c3d19cdd18a9a8e8016c29d0b0]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
msm: board-8960: Wrap PMIC 8921 GPIO 42 in a gpio-regulator device

Wrap PMIC 8921 GPIO 42 in a gpio-regulator device so that the USB
OTG driver can be simplified.  GPIO 42 represents the OTG_CNTL
signal on 8960 devices.  This drives a FET which switches the USB
OTG MVS output of the PMIC 8921.  By controlling GPIO 42 with a
gpio-regulator, it is possible to encapsulate all USB OTG 5V
output dependencies within a single regulator_enable call. The
regulator framework is able to automatically set all GPIOs and
PMIC regulators appropriately thanks to the supply chain that
is defined for the regulators.

Change-Id: I8cd26b56a3a2871e784227b5d49f5d1089b19784
Signed-off-by: David Collins <collinsd@codeaurora.org>
[jeff.carlyle@motorola.com: adapted from 35a78f54e8b57dcd96b815b448e1a7696a4ae55d]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
msm: board: Use new ext_otg_sw regulator for vbus_power API

The ext_otg_sw regulator will handle enabling and disabling PMIC
8921 GPIO 42.  Therefore, modify the vbus_power API in MSM8960 and
MSM8930 board files so that it makes regulator requests and does
not make GPIO requests.  Move the "vbus_otg" regulator consumer
name from the 8921_usb_otg regulator to the ext_otg_sw regulator.

Change-Id: I47dabf76911b424b0dc75b7889f98faab27f30bd
Signed-off-by: David Collins <collinsd@codeaurora.org>
[jeff.carlyle@motorola.com: adapated from 57954faab45762782455e019611ef788e22ebe60]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
msm: board: reserve mdp writeback memory

The memory allocation happens on the display mdp driver side. This
separation of writeback buffers from the frame buffer is mainly for
content security.

Change-Id: I404b5f8db01dd5ed940916d7d46a8ace2d295e3a
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
[jeff.carlyle@motorola.com: adapted from a5419425d64834f57bdc47143cd711da11a3d44f]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
crypto: Add bus scaling request.

Add bus bandwidth request in crypto driver modules.
Add bus scaling request information to platform data files.
Currently the support for bandwidth request is enabled and tested on
msm8960 only.

Change-Id: I77edb827b1633218405cecf3a494c13b7b982c05
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
[jeff.carlyle@motorola.com: adapted from 49259689fec0b7719da90c79bfc100943af20151]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
ASoC: msm: Add incall music delivery support

Add one backend DAI, and add one mixer control to route playback stream
to the new backend DAI. Start/stop playback commands will be sent to CVD
if starting/stopping playback, after voice call is established.

Change-Id: I334f1894ac0800e6a71fa7e20ac634b1b05cc414
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
[jeff.carlyle@motorola.com: adapted from 0705a5f7ea0d3762138322f689106432f25fcfe2]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
ASoC: msm: Add incall recording support

Add two backend DAIs, and add two mixer controls to route
capture stream to the new backend DAIs. Start/stop record
commands will be sent to CVD if starting/stoping recording,
after voice call is established.

Change-Id: Iabff5390ca8c50ba05ae2dfa31fa3f1a8797f1db
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
[jeff.carlyle@motorola.com: adapted from e3d716a7ab360b609e87aa27a43937b10d4e15bd]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
mdm2: Replace hsic platform_add/remove with connect/disconnect

mdm2 driver calls platform add/remove apis to notify hsic about
peripheral(9x15) connection/disconnection. Instead include hsic
connect/disconnect apis to keep mdm driver unaware of hsic
disconnection and discovery logic

Change-Id: I3bbb0d652d60de4bc5941e31eebbd75bb10b69b7
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
[jeff.carlyle@motorola.com: adapted from 6aa6b1f5679aa3054dffeb4e216a168ae19ebeaa]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
msm: board-8960: Increase pmem for the display compositor.

Increase pmem allocation size to 40MB for use by the display
compositor. Stress-test runs and memory-profiling results indicate
that common graphical user-interface scenarios demand up to 40MB from
the display compositor when compositing application display layers
onto a WSVGA (1024x600) screen.

Change-Id: Ie0ffb254225d7c60e780a2f7bd5699768c558602
Signed-off-by: Mathew Karimpanal <mkarim@codeaurora.org>
[jeff.carlyle@motorola.com: adapted from 15fa5c49853b6a98628835556f9e55ff4070fb68]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
ARM: gic: Consolidate PPI handling with request_percpu_irq() API

The commit 292b293 creates the MSM boot failures, so squash
the commit 28af690 with it to avoid such failures. The commit ddd847
and 0c1991 are required to keep the watchdog and Copper targets working.

commit 292b293ceef2eda1f96f0c90b96e954d7bdabd1c
Author: Marc Zyngier <marc.zyngier@arm.com>
Date:   Wed Jul 20 16:24:14 2011 +0100

    ARM: gic: consolidate PPI handling

    PPI handling is a bit of an odd beast. It uses its own low level
    handling code and is hardwired to the local timers (hence lacking
    a registration interface).

    Instead, switch the low handling to the normal SPI handling code.
    PPIs are handled by the handle_percpu_devid_irq flow.

    This also allows the removal of some duplicated code.

    Cc: Kukjin Kim <kgene.kim@samsung.com>
    Cc: David Brown <davidb@codeaurora.org>
    Cc: Bryan Huntsman <bryanh@codeaurora.org>
    Cc: Tony Lindgren <tony@atomide.com>
    Cc: Paul Mundt <lethal@linux-sh.org>
    Cc: Magnus Damm <magnus.damm@gmail.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: David Brown <davidb@codeaurora.org>
    Tested-by: David Brown <davidb@codeaurora.org>
    Tested-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

commit 28af690a284dfcb627bd69d0963db1c0f412cb8c
Author: Marc Zyngier <marc.zyngier@arm.com>
Date:   Fri Jul 22 12:52:37 2011 +0100

    ARM: gic, local timers: use the request_percpu_irq() interface

    This patch remove the hardcoded link between local timers and PPIs,
    and convert the PPI users (TWD, MCT and MSM timers) to the new
    *_percpu_irq interface. Also some collateral cleanup
    (local_timer_ack() is gone, and the interrupt handler is strictly
    private to each driver).

    PPIs are now useable for more than just the local timers.

    Additional testing by David Brown (msm8250 and msm8660) and
    Shawn Guo (imx6q).

    Cc: David Brown <davidb@codeaurora.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: David Brown <davidb@codeaurora.org>
    Tested-by: David Brown <davidb@codeaurora.org>
    Tested-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

commit ddd8478d68f8cf75ee9771667c0cbe2a9d1caeb9
Author: Trilok Soni <tsoni@codeaurora.org>
Date:   Tue Dec 6 00:56:01 2011 +0530

    msm: watchdog: Use request_percpu_irq() interface

    Change-Id: I7c319344f6a7f7a7c70682ac87f5c385e56d130c
    Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
    Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>

commit 0c19915e092214a4c17a9920c4c1f3d78610217d
Author: Sathish Ambley <sambley@codeaurora.org>
Date:   Fri Dec 9 17:07:37 2011 +0530

    arm: arch_timer: Use request_percpu_irq() API

    Change-Id: Iee9b218d538f315cd884a47d95bcc0dcc49b0fe1
    Signed-off-by: Sathish Ambley <sambley@codeaurora.org>

Change-Id: I7bbba706b1f2e55814be5891ed76063725c2bfb1
Signed-off-by: Ravi Kumar <kumarrav@codeaurora.org>
[tsoni@codeaurora.org: MSM specific fixes]
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
[jeff.carlyle@motorola.com: adapted from eecb28c59054b1b9d8b9f410a903f87c8eb1ac48]
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
IKQCOMSD1-667 - left bank of display LEDs is dark on Qinara

Need to have LED2 controller on bank A as well as LED1 controller.
For Asanti the init function will have LED2 controller on bank B
for keyboard backlight.

Change-Id: Ie9fdd65cbcceca9ddbd08761ca8001747f1023ec
Signed-off-by: Alina Yakovleva <qvdh43@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/329571
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Igor Kovalenko <Igor.Kovalenko@motorola.com>