radio: iris: Add the parameter to turn on/off sig blend

FM driver will always enable the sig blend feature, it will cause
FM seperation failure during lab test.So add this new parameter
to disable the feature by adb command to pass the test.

Change-Id: I187d4e5fff4aabfb994a905e174bb8ce941e2c16
Signed-off-by: Sheng Fang <fsheng@codeaurora.org>
ASoC: wcd9xxx: Disable RC oscillator after use

Currently RC oscillator is left enabled even after
its use when headset is inserted and then removed.
Disable RC oscillator after headset is removed during
clock block put.

Change-Id: Ic799be15f900b7261455e27c4e6b7b95c049f6e4
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
USB: phy-msm-usb: Enable USB Interrupt only if ASYNC IRQ is not present

Some USB controllers have different IRQ line to exit from
LPM. This is ASYNC IRQ. If this IRQ is present, we dont
need to enable or disable the USB interrupt during otg
suspend and resume respectively.

There is a new requirement for XO shutdown during idle.
To allow XO in idle CPU states. When CPU is idle, if an
irq is enabled and is not capable of waking up from xo,
the xo shutdown is aborted. Hence non-wakeup capable irq
must be disabled.

Change-Id: I3197a1b413a1bf849db3572442cc8dbc5f264b53
CRs-Fixed: 520531
Signed-off-by: Sujeet Kumar <ksujeet@codeaurora.org>
ARM: dts: apq: remove unnecessary configuration of pmic gpio 36

DragonBoard8074 does not use pmic gpio 36 so removing it.

Change-Id: I5bc6908cda40eb08831afb696fbb2567a462878a
Signed-off-by: Asaf Penso <apenso@codeaurora.org>
ARM: dts: Don't put SDHC1's vdd-io regulator in lpm for msm8610 CDP/MTP

The vdd-io regulator for eMMC powers the controller inside the eMMC
device. Setting this regulator to lpm mode when the device goes to sleep
might restrict the amount of power that the card can draw. This might
lead to undeterministic behavior and thereby put the card in bad state,
hence don't set this regulator to lpm.

Change-Id: Ia0f571673fbaa9e583e8f4c3cc079e7d2fa9bbdd
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
power: qpnp-charger: allow charging in host mode

If host mode is enabled, allow the BATFET to be closed
thus that a DC charger is still able to charge the battery.

Change-Id: I3f863db42b028fa51637d3eb02f0931a02311e27
CRs-Fixed: 495760
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
mdss: display: remove the pwm gpio request from edp backlight

There is no use of the pwm gpio inside the driver so cleaning up the code
and removing it from devicetree.

Change-Id: I72c038f3082aa6ed18ea9142de75faecc1e1e0fd
Signed-off-by: Asaf Penso <apenso@codeaurora.org>
mdss: display: making lpg channel and pwm period as optional

These properties need to be optional and used only when having an embedded
DP monitor, i.e. eDP.

When using the eDP driver with external DP monitor there is no need to
configure the fields for the external backlight since it is done by the
monitor itself.

Change-Id: If1010e99c82e276991f30055140118aba29b0ecd
Signed-off-by: Asaf Penso <apenso@codeaurora.org>
ASoC: msm: q6: check upper bounds when copy ac3 params

Although AC3 maximum param size is fixed, better check upper bounds
when copy user data. It might cause overflow, possibly cause memory
corruption.

Change-Id: I2f7cec8edd9e013de1433ea06480b963ec307196
Signed-off-by: Fred Oh <fred@codeaurora.org>
timekeeping: Add missing update call in timekeeping_resume()

The leap second rework unearthed another issue of inconsistent data.

On timekeeping_resume() the timekeeper data is updated, but nothing
calls timekeeping_update(), so now the update code in the timer
interrupt sees stale values.

This has been the case before those changes, but then the timer
interrupt was using stale data as well so this went unnoticed for quite
some time.

Add the missing update call, so all the data is consistent everywhere.

CRs-fixed: 536881
Change-Id: I5f7d5219749a3f6330d074ef8866533ebda3bfca
Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Reported-and-tested-by: Martin Steigerwald <Martin@lichtvoll.de>
Cc: LKML <linux-kernel@vger.kernel.org>
Cc: Linux PM list <linux-pm@vger.kernel.org>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 3e997130bd2e8c6f5aaa49d6e3161d4d29b43ab0
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
timekeeping: utilize the suspend-nonstop clocksource to count suspended time

There are some new processors whose TSC clocksource won't stop during
suspend. Currently, after system resumes, kernel will use persistent
clock or RTC to compensate the sleep time, but with these nonstop
clocksources, we could skip the special compensation from external
sources, and just use current clocksource for time recounting.

This can solve some time drift bugs caused by some not-so-accurate or
error-prone RTC devices.

The current way to count suspended time is first try to use the persistent
clock, and then try the RTC if persistent clock can't be used. This
patch will change the trying order to:
	suspend-nonstop clocksource -> persistent clock -> RTC

When counting the sleep time with nonstop clocksource, use an accurate way
suggested by Jason Gunthorpe to cover very large delta cycles.

CRs-fixed: 536881
Change-Id: I59c21b1ce5ae81cebc8cf3e817d9b3f951302a3d
Signed-off-by: Feng Tang <feng.tang@intel.com>
[jstultz: Small optimization, avoiding re-reading the clocksource]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: e445cf1c4257cc0238d72e4129eb4739f46fd3de)
[sboyd: Took tk and clock local variables]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
clocksource: arm_arch_timer: Use clocksource for suspend timekeeping

The ARM architected timers keep counting during suspend so we can
mark this clocksource with the CLOCK_SOURCE_SUSPEND_NONSTOP. This
flag will indicate that this clocksource can be used for
calculating suspend time and injecting sleep time into the
timekeeping core. This will usually be more accurate than using
an external RTC or architecture specific persistent clock.

CRs-fixed: 536881
Change-Id: I882bf19a87ceb642aa069bbf26802c66c96b4426
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm: pm-8x60: Fix suspend time tracking

Calls to sched_clock() after syscore devices have been suspend
will return the same value until the syscored devices are
resumed. Furthermore, the value won't jump forward to account for
the time left in suspend so we can't use it to calculate how much
time we spent in suspend.

We could expose the hardware directly to the pm code but it's
better to use generic interfaces. Move to using the timekeeping
APIs to determine how long we were in suspend. Unfortunately, we
can't use the timekeeping APIs this early in the resume path, so
we must read the current time of day before we suspend the
timekeeping core and after we resume the timekeeping core. Move
the calls to the suspend_late() and wake() callbacks so we can
properly read the amount of suspend time.

CRs-fixed: 536881
Change-Id: I3b47511afb75926e51e82fc83929f405404fbf07
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
cpufreq: ondemand: add input_boost interface

Currently Ondemand governor handles any input event
like touch by scaling the CPU frequency to maximum
available on the target.

This change adds a new sysfs interface "input_boost"
whereby the CPU will scale to this frequency on input events.
The value of this sysfs is user defined so input events
can now be handled by scaling the CPU to lower frequencies
than target max.

Change-Id: I5428fd8797c9984b17a66b01a44557f2160e8b68
Signed-off-by: Dilip Gudlur <dgudlur@codeaurora.org>
ASoC: msm: Move ASM custom topology data out of Debugfs define

Move variables used for ASM custom topology out of
the debugfs define. ASM custom topology should be
enabled even when debugfs is not.

Change-Id: Ie16191c04d80981e48e11ddda71ccbe1ccbc18ca
CRs-fixed: 551711
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
ASoC: msm: Add argument to config_debug_fs definition

Add argument name missing from config_debug_fs
definition when debugfs not enabled.

Change-Id: Ib955b5fa60228d48ac6a2c73678f0d6cd766c8a1
CRs-fixed: 551711
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
msm: mdss: Prevent ALS data configuration when AD is disabled

If assertive display is disabled, backlight data structure is reset
to NULL, which in some conditons gets dereferenced or casuses
crash.

Change-Id: I535eac6d2f0aef222fc2846f80d72db1f3e3480d
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
ARM: dts: msm8226: Add qrd pvt device tree

QRD PVT device will use different pmic version
which have different hardware design that has to
be distinguished with original DVT and EVT.

Change-Id: I770e4bd9e77ac4257762dd7b06b5d8ad334efcfa
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
msm: Add image version reporting node into socinfo

Get smem block, which stores image version strings for all images and
export those strings to userspace through sysfs entries.

Change-Id: Ifb1a3d0670e6199e0d0d8da752c17bdda370bfe2
Signed-off-by: Yulian Shandorov <jshandorov@codeaurora.org>
msm: Add nodes in socinfo, to store APPS image version in SMEM

- Nodes for image_version, image_crm_version and image_variant updated in
order to store APPS image version.
- We get this info from userspace and pass it to SMEM.
- UGO write access added to select_image node, in order DIAG daemon
to be able to change it from userspace.

Change-Id: I57841c3c39ae1b7177f1a6592818a51ccb93cf97
Signed-off-by: Yulian Shandorov <jshandorov@codeaurora.org>