DRIVERS: SLIMBUS: initial overclocking of slimbus .Increase
 root freq from 11 (24.526MHz) to 31 max (27+MHz) which is the largest it will
 take .Increase clock gear from 7 to 10 (max again)

This means SLIMbus will use its maximum potential to give the best audio quality for the hardware. Takes advantage of both hardware and the mods from zeroinfinity, also opening the door for more things that were previously limited by this. Researched and experimented by ZeroInfinity and Poondog

Signed-off-by: poondog <markj338@gmail.com>

Conflicts:
	drivers/slimbus/slim-msm-ctrl.c
DRIVERS: SLIMBUS: slimbus enhancements mkII

Credit: @poondog
This time we keep the root freq to 11.
If Root Freq is set at 11, 24,576MHz has the best compatibility for all present sampling rates (e.g, any sample rate can be converted, 48KHz to 96KHz, 44.1KHz to 96KHz, 48KHz to 128KHz etc.) Increasing the root frequency is likely to cause invalid present sample rate combinations which leads to audio glitches such as distortion. "A Natural Frequency is defined as a CLK frequency that allows a family of data rates to be supported. The different sample rate flows can be optimally supported by changing a particular Natural Frequency using the Clock Gear." I looked at a Clock Gear/RF table and it looks like CLK Gear 10 and RF 24,576MHz (Stock RF) is an excellent combination due to its compatibility towards every other sample rates.

ZeroInfinity/Poondog
msm: msm_fb: Remove Warnings when required BW exceeds Max Bandwidth.
When required BW exceeds max bandwidth, warnings are printed on the
console which are causing performance degradation. This Patch fixes
the issue.

Change-Id: I769f55dd76a3f28639b848bd5461e2ff3abae3f5
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
(cherry picked from commit 31d3e58)
Reviewed-on: http://gerrit.pcs.mot.com/600169
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-by: Fred Fettinger <fettinge@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
SLTApproved: Stephen Rossbach <rossbach@motorola.com>
(cherry picked from commit ff4d624)
Interactive: Tune for better battery

Change-Id: I026a97f650e3b4799158b5d7cb073514179f6c84
Signed-off-by: Chester Kener <Cl3Kener@gmail.com>
msm: thermal: Update to speed up bootup time
Update KTM driver to remove flush_scheduled_work that
would introduce bootup delay. This patch replaces
cancel_delayed_work with cancel_delayed_work_sync
to cancel a delayed work.

Change-Id: I98ca5a390d5f776267d3b7f2e509f9741fcb932b
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm8960_tsens: enable all thermal devices

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

Conflicts:
	drivers/thermal/msm8960_tsens.c
msm: mdss: Adding lcd notifier

Supports notifier for start&end of LCD power on&off

Change-Id: Idaa685a2c554286da5f764519305d830c4d1a1bd
Signed-off-by: Se Hun Kim <sean2.kim@lge.com>
Signed-off-by: Jongrak Kwon <jongrak.kwon@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>

Conflicts:
	drivers/video/msm/mdss/Makefile
	drivers/video/msm/mdss/mdss_dsi.c
cpufreq: interactive: add back comments and update to kk_3.5 for a slight bug fix

Change-Id: I754d8fb11e8346256cf210fc47c065b67039459d
cpufreq: interactive: Optimize sync_freq implementation

Don't let frequency drop below sync_freq if either load or
frequency among other cpus is above a certain threshold,
not necessarily both.

Change-Id: Iada28e08e812498e16d5189b309a7314f88814dd
msm: mdss: Turn off backlight while power off

Turn off the backlight while shut down panel as it
could show white flicker depending on the panel.

Change-Id: Ic5d4e97e70c87e5b6e956e27a766136610d6f345
Signed-off-by: Shuo Yan <shuoy@codeaurora.org>
Signed-off-by: Team-CodeCraft <kernelcraft@gmail.com>
hwrng: add randomness to system from rng sources

When bringing a new RNG source online, it seems like it would make sense
to use some of its bytes to make the system entropy pool more random,
as done with all sorts of other devices that contain per-device or
per-boot differences.

Change-Id: I957c96f12248d8aaff03bf789ac55d62f219fe5a
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
msm: rng: pass correct size to kzalloc

The size passed to kzalloc should be structure size
instead of pointer size.

Change-Id: I55dc635672dca779a36620cac7b854af3b004ef9
Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/548864
SLT-Approved: 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: Igor Kovalenko <cik009@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
power: enable wakeup_sources in user build

Make sure wakeup_sources exist in debugfs in user build
when CONFIG_DEBUG_FS removed.

Change-Id: I5273465826e6d09ba4a669f52568aed9584e83af
Signed-off-by: Ke Lv <a2435c@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/547258
SLT-Approved: 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: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
cpuidle: remove cross-cpu IPI by new latency request.

when drivers request new latency requirement, it's not necessary to
immediately wake up another cpu by sending cross-cpu IPI, we can consider
the new latency to be taken into effect after next wakeup from idle,
this can save the unnecessary wakeup cost, and reduce the risk that
drivers may request latency in irq disabled context.

[<c08e0cc0>] (__irq_svc+0x40/0x70) from [<c00e801c>] (smp_call_function_single+0x16c/0x240)
[<c00e801c>] (smp_call_function_single+0x16c/0x240) from [<c00e855c>] (smp_call_function+0x40/0x6c)
[<c00e855c>] (smp_call_function+0x40/0x6c) from [<c0601c9c>] (cpuidle_latency_notify+0x18/0x20)
[<c0601c9c>] (cpuidle_latency_notify+0x18/0x20) from [<c00b7c28>] (blocking_notifier_call_chain+0x74/0x94)
[<c00b7c28>] (blocking_notifier_call_chain+0x74/0x94) from [<c00d563c>] (pm_qos_update_target+0xe0/0x128)
[<c00d563c>] (pm_qos_update_target+0xe0/0x128) from [<c0620d3c>] (msmsdcc_enable+0xac/0x158)
[<c0620d3c>] (msmsdcc_enable+0xac/0x158) from [<c06050e0>] (mmc_try_claim_host+0xb0/0xb8)
[<c06050e0>] (mmc_try_claim_host+0xb0/0xb8) from [<c0605318>] (mmc_start_bkops.part.15+0x50/0x2f4)
[<c0605318>] (mmc_start_bkops.part.15+0x50/0x2f4) from [<c00ab768>] (process_one_work+0x124/0x55c)
[<c00ab768>] (process_one_work+0x124/0x55c) from [<c00abfc8>] (worker_thread+0x178/0x45c)
[<c00abfc8>] (worker_thread+0x178/0x45c) from [<c00b0b24>] (kthread+0x84/0x90)
[<c00b0b24>] (kthread+0x84/0x90) from [<c000fdd4>] (kernel_thread_exit+0x0/0x8)
Disabling lock debugging due to kernel taint
coresight-etb coresight-etb.0: ETB aborted
Kernel panic - not syncing: softlockup: hung tasks

Change-Id: Id0e226b72498b3b97df0add614703e861c389798
Signed-off-by: Guojian Chen <a21757@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/532702
SLT-Approved: 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: Christopher Fries <qcf001@motorola.com>
Reviewed-by: David Ding <dding@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit 27e75e21c4a1bf7b551c7cbb6d1c603a361b2164)
msm: thermal: Add module params for virtual sensors.

Create virtual_sensor0 and virtual_sensor1 module parameters
to support MSM thermal management.

Signed-off-by: Jason Knopsnyder <w19069@motorola.com>
(cherry picked from commit 9f7f5dbe22e1a25c23ebd06cee1d63b79f689c31)
msm: thermal: Remove virtual_sensor1 param

The virtual_sensor1 parameter has been replaced by
the batt_hotspot_temperature parameter.

Change-Id: I5563db65218a4e73ca691b1bfd6b1da7c785a79b
Signed-off-by: Jason Knopsnyder <w19069@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/523480
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Reviewed-by: Kenneth Kessler <w65789@motorola.com>
Reviewed-by: Vidyadhar Gurram <rnh786@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: David Ding <dding@motorola.com>
(cherry picked from commit ae15bcdb5511753a0765a2b01142037b5ae0c7c8)
thermal-sys: Return NULL if no sensor found

The get_sensor should return NULL if no sensor found, else a wrong
sensor pointer will be returned and cause kernel panic.

Change-Id: I7d56a92ef14fb46d4e6206f23be994da103b1895
Signed-off-by: Lianwei Wang <a22439@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/582319
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
Reviewed-by: Ming Zhou <a17711@motorola.com>
Reviewed-by: Ravi Chebolu <arc095@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Revert "hwrng: add randomness to system from rng sources"

This reverts commit 4f2a278239621aa1f0d4a9c05abd6307657b2e63.
cpufreq: interactive: don't schedule timer on offline cpu

It shall not add timer on an offline CPUs, else it will cause
kernel panic.

And also don't reschedule the timer on an offline cpu in idle
and timer callback. Actually the timer shall be cancelled when
cpu is offline.

Change-Id: Id314f15be3d12ab49e5cdcf6ae89bd88b376308a
Signed-off-by: Lianwei Wang <a22439@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/539160
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
interactive: import myfluxi's gov