msm: Fix correct topology for qseecom bus scaling.

Currently, bus scaling topology for qseecom is incorrect.
 -Added the correct topology paths for accessing Crypto
  Engine which is controlled by QSEE.
 -Removed setting the clock frequency of DFAB. This is
  done by the bus driver.
 -Removed references to the dfab clock instance defined
  in clocks file.

Change-Id: Ib6953ea3bf5721d458bfe2aa06c54be329a8fdb9
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
(cherry picked from commit 1e8c7242fd3f32ade703484d2113f4a6f442a0e8)

Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
qseecom:  Add SFAB clock voting .

Add SFAB voting in  QSEECOM_IOCTL_PERF_ENABLE_REQ.
The SFAB clock needs to be bumped up to its optimal
value when opearting in high bandwidth mode (for max
crypto performance)

Change-Id: I4c8fcd6a70f3e649ab5d83f7a26d940f93fb9a35
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
(cherry picked from commit 8e2d73a0ade94ffd27882043d562c7ee825d9f7c)

Conflicts:

	drivers/misc/qseecom.c

Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
Revert "qseecom:  Add SFAB clock voting ."

This reverts commit 5ee9d6b99ac9cb89ca57b94b61bede47347ae4e1.

Change-Id: I8288cdee7c760ceb49851413afe7891a9005d4e9
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
qseecom:  Add SFAB clock voting .

Add SFAB voting in  QSEECOM_IOCTL_PERF_ENABLE_REQ.
The SFAB clock needs to be bumped up to its optimal
value when opearting in high bandwidth mode (for max
crypto performance)

Change-Id: I4c8fcd6a70f3e649ab5d83f7a26d940f93fb9a35
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
(cherry picked from commit 8e2d73a0ade94ffd27882043d562c7ee825d9f7c)

Conflicts:

	drivers/misc/qseecom.c

Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
(cherry picked from commit 5c361fa35ac24f56b740433b414d004c6c5377a0)

Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
msm : camera : Fix Livesnapshot issue

update buffer management logic incase
of Livesnapshot for vfe 2X

Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
(cherry picked from commit 7ca92a239f34d0ca05458c94c72d3bc826a4d398)

Change-Id: I319391988755cad8268c6ccae2ec551f56a60a50
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
hwmon: pm8xxx-adc: Vote for a PMIC clock buffer.:

Incorrect PMIC_THERM/XO_THERM readings are seen when
the XO clock is disabled.

The internal PMIC therm relies on the PMIC band gap
reference which in turn is enabled when any of the
PMIC clock buffers are enabled. The XO_THERM relies
on the VREF_XO as its reference source which gets
enabled when any of the PMIC clock buffers are
switched on. Therefore vote for a clock buffer when
a PMIC_THERM/XO_THERM is requested.

CRs-Fixed: 392602
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
(cherry picked from commit f9dfe1b7b70b634422fbbbf65756aa997536bd33)

Change-Id: I09e132dbc4e635b96cd08ece245a766d68ed27b4
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>

Conflicts:

	drivers/hwmon/pm8xxx-adc.c

Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
msm: cpufreq: make the gov stop part fully atomic

In the function cpufreq_governor_dbs, the case CPUFREQ_GOV_STOP
is not completely atomic. The removal of sysfs is outside the
critical path. If a START/STOP done frequently from user space
then there is chance of adding the sysfs interface before removal.
This creates a warning from sysfs saying creating an already
existing entry.

Also once it fails to create, cpufreq_governor_dbs returns with
error code. The dbs_enable value is incremented which is not
rolled back and cpufreq core tries to set the old
governor. This might create further problems.

Hence the removal of sysfs entry should happen in the critical
path.

(cherry picked from commit 4edc766a412b530ab4c948569ecbc902146301fc)

CRs-fixed: 440969
Change-Id: I98891756caf2ce0b85e39e9b4f58034af1ed97ce
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
msm: board-8930-pmic: Disable pmic noise gate.

The noise gate is resulting in intermittent audio issue,
hence disable it.

(cherry picked from commit 53c87b04d0282af18fa57b1d99d2b6b13149b3e4)

Change-Id: Ia932394af33120d1cbffc12bb79fbc7225bcce1a
CRs-Fixed: 428933
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
msm: spm: Allow setting of voltages across cpus

The original intent of disallowing voltage set across cpus is to prevent
setting of voltages on a core when its idle thread. The cpufreq
framework ensures that the frequency changes and hence the voltage
changes happens on the respective cpus. By allowing setting of voltages
from others cpus, the secondary cores can be brought out of reset by the
non-primary CPUs after boot and thereby help mitigate any thermal issues
associated wth multicores.

The regulator framework that calls into msm_spm_set_vdd provides the
necessary access restrictions to prevent simultaneous calls into
msm_spm_set_vdd.And hence the spinlocks around the set_vdd calls have
been removed.

Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
(cherry picked from commit 896d25353b95d647ba8f6cf3ea12e3170cd00f55)

Conflicts:

	arch/arm/mach-msm/spm.h
	arch/arm/mach-msm/spm_devices.c

Change-Id: I77e428f37b0e91b0c07a806934e683f9829ec78a
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
msm: boards: Enable Krait Retention.

Add SPM sequences to do Krait retention for 8960,8930
and 8064. Also added a new rpmrs level containing the
latencies and power measurements for this new low power
state.

CRs-Fixed: 369864
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
(cherry picked from commit 3bc987786ce0c0fd3be6bc1d9d80dfcc5119d0da)

Conflicts:

	arch/arm/mach-msm/board-8930.c

Change-Id: Icd981f230b799a5586f15fe8a1c1bc550fd82cd6
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
msm: acpuclock-8064: Lower max L2 speed to 1134MHz

There are some testing showing that L2 at 1188MHz may cause
some stability issue. Therefore, lower the max speed to 1134MHz
unitl the root cause is found.

Change-Id: Iecb5b666c627603d194a9b28d212eaebfd3c359b
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>