power: quickwakeup: initial driver

This driver allows clients to register code to be called upon wakeup
so that clients can perform specific checks and vote to drop the system
back into suspend without fully resuming if the wake reason was a special
quick wakeup event.

Propagation of (CR)

Change-Id: I791ff02f34b616e6da2b68efc2d4eb4449e5bbe7

Signed-off-by: shivamk11 <shivamk11@gmail.com>
android: ram_console: update to standardized bootreason

Google requires the new bootreason in /proc/last_kmsg for standardization
purposes.

original patch edfc55b2acca10cd3b76b876c6819b3a9bda83b7 doesn't update
proc file entry size. This patch is to fix this bug.  Meanwhile, remove
duplicated moto's "bootup reason".

Change-Id: I9d507415144c9f6c08f492f9932e74c57d6bd7b4
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/623448
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>
Reviewed-on: http://gerrit.pcs.mot.com/625891
Tested-by: Yu Liu <e7664c@motorola.com>
msm: Remove files no longer buildable under arch/arm/mach-msm

Removed the files to reduce efforts as we move driver code out of mach-msm.

Change-Id: I899cf19477f00026c79f42c6ab5de2d327648233
Signed-off-by: Kumar Gala <galak@codeaurora.org>
(cherry picked from commit db9edcc1b7759d4456cdb603360eacd25e68ce6e)

Conflicts:
	arch/arm/mach-msm/acpuclock-7627.c
	arch/arm/mach-msm/acpuclock-7x30.c
	arch/arm/mach-msm/acpuclock-8625q.c
	arch/arm/mach-msm/acpuclock-8x50.c
	arch/arm/mach-msm/acpuclock-9625.c
	arch/arm/mach-msm/board-8064-pmic.c
	arch/arm/mach-msm/board-8064-regulator.c
	arch/arm/mach-msm/board-8064-storage.c
	arch/arm/mach-msm/board-8064.c
	arch/arm/mach-msm/board-8064.h
	arch/arm/mach-msm/board-8930-pmic.c
	arch/arm/mach-msm/board-8930-regulator-pm8038.c
	arch/arm/mach-msm/board-8930-regulator-pm8917.c
	arch/arm/mach-msm/board-8930-storage.c
	arch/arm/mach-msm/board-8930.c
	arch/arm/mach-msm/board-8930.h
	arch/arm/mach-msm/board-8960-pmic.c
	arch/arm/mach-msm/board-8960-regulator.c
	arch/arm/mach-msm/board-8960-storage.c
	arch/arm/mach-msm/board-8960.c
	arch/arm/mach-msm/board-8960.h
	arch/arm/mach-msm/board-9615-regulator.c
	arch/arm/mach-msm/board-9615.c
	arch/arm/mach-msm/board-9615.h
	arch/arm/mach-msm/board-9625.c
	arch/arm/mach-msm/board-halibut.c
	arch/arm/mach-msm/board-mahimahi-microp.c
	arch/arm/mach-msm/board-mahimahi.c
	arch/arm/mach-msm/board-msm7x27a.c
	arch/arm/mach-msm/board-msm7x30.c
	arch/arm/mach-msm/board-msm8x60.c
	arch/arm/mach-msm/board-qrd7627a.c
	arch/arm/mach-msm/board-qsd8x50.c
	arch/arm/mach-msm/board-sapphire.c
	arch/arm/mach-msm/board-trout-mmc.c
	arch/arm/mach-msm/board-trout-panel.c
	arch/arm/mach-msm/board-trout.c
	arch/arm/mach-msm/clock-9625.c
	arch/arm/mach-msm/devices-9615.c
	arch/arm/mach-msm/devices-fsm9xxx.c
	arch/arm/mach-msm/devices-msm7x00.c
	arch/arm/mach-msm/devices-msm7x27a.c
	arch/arm/mach-msm/dfe-fsm9xxx.c
	arch/arm/mach-msm/footswitch-8x60.c
	arch/arm/mach-msm/footswitch-pcom.c
	arch/arm/mach-msm/last_radio_log.c
	arch/arm/mach-msm/mdm.c
	arch/arm/mach-msm/mpm-8625.c
	arch/arm/mach-msm/msm_bus/msm_bus_board_9625.c
	arch/arm/mach-msm/msm_dsps.c
	arch/arm/mach-msm/msm_vp.c
	arch/arm/mach-msm/msm_watchdog.c
	arch/arm/mach-msm/perf_event_msm_l2.c
	arch/arm/mach-msm/perf_event_msm_pl310.c
	arch/arm/mach-msm/platsmp-8625.c
	arch/arm/mach-msm/pmu.c
	arch/arm/mach-msm/proccomm-regulator.c
	arch/arm/mach-msm/qdsp6v2/audio_acdb.c
	arch/arm/mach-msm/qdsp6v2/ultrasound/version_a/q6usm_a.c
	arch/arm/mach-msm/restart-fsm9xxx.c
	arch/arm/mach-msm/rpm-regulator.c
	arch/arm/mach-msm/saw-regulator.c
	arch/arm/mach-msm/vreg.c
	arch/arm/mach-msm/xo-fsm9xxx.c
	arch/arm/mach-vt8500/include/mach/uncompress.h
Change-Id: Ic4d9816e2ca51f3a180263207d65ce06df5aa8e7
Reviewed-on: http://gerrit.pcs.mot.com/625344
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Christopher Fries <c.fries@motorola.com>
(cherry picked from commit 7e4b873d2a9fa4fb8dfb6489fe5a2b27e16f2d6a)

Conflicts:

	arch/arm/mach-msm/acpuclock-9625.c
	arch/arm/mach-msm/clock-9625.c
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>
staging: android: lmk: add rcu lock while test task flag

test_task_flag() need to be guarded by rcu_read_lock(), because

 test_task_flag()->
   while_each_thread()->
     next_thread()-> list_entry_rcu()

Change-Id: Ia97a82a4bb51785d935ebe9602cfa842d4d0410a
Signed-off-by: Yi-wei Zhao <gbjc64@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/608283
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Hong-Mei Li <a21834@motorola.com>
Reviewed-by: Yuanyuan Zhong <zyy@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
power: qpnp-charger:Notify temperature changes to framework

At Over-temperature conditions, an uevent doesn't get broadcasted to
framework on regular basis. As a result, the phone doesn't shutdown at
 higher temperatures.

The change introduces heartbeat function that checks temperature every
few seconds and if the temperature is 68 degC or more than that,
it notifies the framework by firing an uevent

Change-Id: I4969a3e59a351b3738714a39d643eeb3182815cd
Signed-off-by: kumarv <kumarv@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/583991
SLTApproved: Slta Waiver <sltawvr@motorola.com>
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: Kenneth Kessler <kennykessler@motorola.com>
Reviewed-by: Jason Knopsnyder <jasonk@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
power: qpnp-charger: Charging doesn't resume at 3.9V

Charging doesn't resume at battery voltage 3.9 volts.

Issue is that when battery temperature is in cold/warm range but not
in extended cold/warm range,the vbat_max voltage is set to 4000mV but
the vbat_det voltage(charging resume voltage) is set to 3850mV and hence
when battery voltage is more than 3800mV, the charging stops untill the
battery voltage falls below vbat_det voltage(charging resume voltage)
3850mV.

This change would set the vbat_det voltage(charging resume voltage)
to 3850mV only when the battery temperature is in extended cold/warm
temperature range. Thus the charging works till the battery voltage not
more than 4000mV, when the battery temperature is in extended cold/warm
temperature range.

Change-Id: I07264f9c9a94dfaa6fa96073f5f1a486d97c933c
Signed-off-by: kumar venkatesh <kumarv@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/618041
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Reviewed-by: Vidyadhar Gurram <rnh786@motorola.com>
Reviewed-by: Jason Knopsnyder <jasonk@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Enable UNALIGNED_ACCESS

Signed-off-by: shivamk11 <shivamk11@gmail.com>
ARM: Allow CPU-supported unaligned accesses

Signed-off-by: shivamk11 <shivamk11@gmail.com>