msm: clock-mdss: Toggle lock detect before checking for PLL lock

The enable sequences for the DSI PLL for MSM8226 poll a hardware
status register in order to determine whether the PLL has locked.
However, with the current sequences, it is possible that the
hardware status register would indicate a PLL lock even though the
PLL is not really locked. To avoid this, toggle the lock detect
register setting before polling for PLL lock status.

CRs-Fixed: 490476
Change-Id: I6e1357afaa6a86be9ab92095a41768873c70cf0d
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: pm-8x60: Register sleep status driver before regulator

During hotplug, drivers wait for core to be power collapsed to turn off
the resources used by a core in CPU_DEAD notification. The kernel
thermal module which hotplugs the core in certain conditions is
registered in the arch_initcall(). To ensure that the CPU_DEAD waits for
sleep status to be set during hotplug, register the cpu sleep status
driver before the regulator driver.

To this effect, the sleep status driver is no longer made a child device
for pm-8x60 device.

Change-Id: I772521f4b3cd18e367aa44a41d60ef9735c99ef9
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: spm-regulator: add support for mode selection

Add support to the spm-regulator driver to select which regulator
operating mode to utilize.  There are three possible mode
selections: PWM mode, auto mode, or the existing mode set by
hardware or bootloaders.

Change-Id: Ieaf69f26078d4e9f14db3b2eb7b5cbe2dc8ed31e
Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
arm: vfp: always clear vfp_current_hw_state when forcing reload

The current thread trying to clear the held vfp state may not be
the owner of hw state. For example,
	Core0			Core1
				Thread1 uses VFP.
				  Thread1 vfpstate.hard.cpu = 1.
				  vfp_current_hw_state[1] points to Thread1
				    vfpstate.
	Going to suspend.
	Freeze Thread1.
				Thread1 is switched out.
				VFP HW registers saved to Thread1 vfpstate.
	Core0 disables Core1.
				Stopper thread calls vfp_force_reload().
				Stopper thread vfpstate.hard.cpu = NR_CPUS.
				...
				(No PM notifier for non-idle path. So
				  vfp_pm_suspend() is NOT called on Core1.)
				...
				Core1 is off and VFP HW registers are lost.
	...
	Core0 enables Core1.
	Core0 thaw Thread1.
	Thread1 migrate to Core1
	  before using VFP.
				Thread1 starts using VFP.
				Now we have vfp_current_hw_state[1] points
				  to Thread1 vfpstate. And Thread1 has
				  vfpstate.hard.cpu = 1.
				Thread1 does not need to reload saved vfpstate
				  to VFP HW.
				Thread1 continues running using corrupted VFP
				HW register.
This change fixes above gap by always clearing vfp_current_hw_state when
vfp_force_reload() is called.

CRs-fixed: 553415
Change-Id: I1b914a1e6f06c088b78e82ae01f68e3cf49f0442
Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Patch-mainline: linux-arm-kernel @ Wed Oct 2 17:59:47 EDT 2013
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
ARM: dts: msm: 8974 Add missing GPIO

Due to missing GPIO entries form DT
file I2C is not functinal on BLSP11.
This patch adds these missing
GPIO numbers in DT file.

CRs-Fixed: 546702
Change-Id: I683b2c25b81a907d9f54ca8a44244fa96a89b4df
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
ARM: dts: msm: use a corner regulator for wcnss VDD_CX on all boards

Update wcnss nodes to use voltage corner regulators for VDD_CX on MSM8226,
MSM8610, MSM8974, and MSM8974Pro.

Also update the wcnss platform driver to use voltage corner values for the
VDD_CX regulator supply.

Change-Id: I766b5e15bfdb0c68011fd2a27886026f754bdefd
Signed-off-by: Yue Ma <yuem@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/msm8974pro-ac.dtsi
ARM: dts: msm: i2c: change  clock rate to 19.2 MHz

For standard requirement, I2C source
speed of 50MHz causes high power usage, hence
this patch change the clock rate to 19.2 MHz
to save power.

CRs-Fixed: 552956
Change-Id: Ifb17fb79062a390a19881d247a2ac0ca5cc55d80
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
ARM: dts: msm: Update regulator supply name for msm8974

There should not be underscore in the property name.
Remove the underdcore in the regulator supply name defined
in msm-thermal device tree.

Change-Id: Id4949d8ca9d9d14ad2a8862d94571d070326d45e
Signed-off-by: Jennifer Liu <chihning@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/msm8974.dtsi
	arch/arm/boot/dts/msm8974pro-ac.dtsi
msm: hotplug: Fix licensing issue

I have no idea about licensing and I could care less
but this should be correct.
msm: hotplug: Add enable/disable toggle

This is mainly for debugging purposes, i.e. using mpdecision.
msm: hotplug: Handle down lock per cpu

Handling down lock per cpu is more precise. We can now distinguish
between a regular interval and a generous time online after the last
input event, where it's likely that the user will interact with the
UI within then next few seconds again.

Conflicts:
	arch/arm/mach-msm/msm_hotplug.c
msm: hotplug: Remove unused include
msm: hotplug: Honor enabled toggle

Start workqueue only if enabled. Also queue remove down
lock work on cpu0, circumvent regular cpu down routine
when disabling hotplug work and remove complete nonsense
in store_min_cpus_online().
msm: hotplug: Terminate load thresh table

Conflicts:
	arch/arm/mach-msm/msm_hotplug.c
msm: hotplug: Simplify store_history_size()

Conflicts:
	arch/arm/mach-msm/msm_hotplug.c
msm: hotplug: Underp input checks

Kids, don't drink and drive.

Conflicts:
	arch/arm/mach-msm/msm_hotplug.c
msm: hotplug: On- and offline cpus only when enabled

I mean really, really enabled...
Revert "msm: hotplug: Remove unused include"

This reverts commit 3a2fd36c40db5ae8b6aa14f05d77bb07ca5936ff.
defconfig: Update

Signed-off-by: Kostas K <mpokwsths@gmail.com>
thermal: missing bits

Signed-off-by: Kostas K <mpokwsths@gmail.com>