ARM: dts: msm: configure APC supply regulator S2 to auto mode for msm8226

Configure PMIC PM8226 regulator SMPS 2 for auto mode.  When
operating in auto mode, the regulator automatically switches
between PWM (high power) and PFM (low power) modes based upon
real-time current consumption.  This results in lower aggregate
power consumption since PFM mode has lower ground current than
PWM mode.

Change-Id: I4868a965e033000a27d55db43f37140910eeba8b
CRs-Fixed: 522545
Signed-off-by: David Collins <collinsd@codeaurora.org>
wcnss: Download NV during SSR

If CAL data is already available, then based on the intial design it is
belived that only CAL needs to be downloaded to WCNSS during SSR.
However that design was incorrect, FW always needs the NV after a
reset. So download NV (and CAL if available) during SSR.

Change-Id: I624d40ac3e195997c9638f62fcdb0e88f0cc749e
CRs-Fixed: 557561
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
ASoC: wcd9xxx: Do not use current source if micbias is already enabled

Some targets share the same micbias for handset mic and headset mic.
When any recording is in progress from handset mic and if headset
is inserted, we shouldn't be using current source for the detection
as the micbias is already enabled. Check if micbias is already enabled
or not and if it is already enabled, detect the headset insertion using
micbias not with current source.

Change-Id: I269c2320ed735fa07f6b77ebffe4d2a1a8163da9
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
msm: ADSPRPC: Add checks for erroneous values

Check for invalid parameters passed in user invocation
and validate the return values using appropriate macros.

Change-Id: If529873d025ac0c13725efbedda5a58fae327722
Acked-by: Sathish Ambley <sambley@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
arm/dts: msm8974: Change qseecom device tree setting

set the flag of support-bus-scaling and change ab & ib
value to support bus bandwidth scaling.

Change-Id: Ia509729675b5c8ce13a9367f8909dc29a1c89944
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
msm: sps: Add probe deferral support in sps driver

Add probe deferral support in sps driver.

Change-Id: If65d2ebbcdece256fdfa000097ac25874c9a5000
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
input: touchscreen: Change late_init call to module_init

Change late_initcall usage in goodix driver to module_init.

Change-Id: I59681138448584fc7a04c95dc8af3d4c3d395ff0
CRs-fixed: 563946
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
ASoC: msm: Add support for external EC reference point

Add mux to sound card topology with output of mux routed
to CS voice uplink front-end as way to indicate external
EC reference point. Currently, MI2S_TX is the only
AFE input port defined for this MUX. This change is required
if external EC is to be used with external speaker.
CRs-Fixed:575788

Change-Id: Ic6f190414f060fbe0844a1b7038a787a07b5a820
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
input: touchscreen: Convert Goodix driver to dev_pm_ops

Convert Goodix driver to dev_pm_ops.
Add return type and parameters for suspend/resume for
Goodix driver.

Change-Id: I5243d9ab801f6964e675ad37c2161beda3586dfe
CRs-fixed: 567703
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
msm: mdss: Fix MDP hang issue for H2V1 interleaved formats

MDSS HW with decimation block present, uses two SMP clients, Y and UV,
regardless of YUV surface is interleaved or planar. Current code takes
care of planar format but not interleave YUV. Fix this by temporarily
converting those formats to pseudo-planar while calculating SMP
requirements.

CRs-Fixed: 568011
Change-Id: I917f7dfd848144bcc4a6c463cd20fb302c432cc5
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
clock-mdss-8974: Switch HDMI clocks to use the new PLL implementation

This change cleans up the HDMI VCO/PLL implementation. It implements
the HDMI VCO clock and uses generic div and mux clocks to align to
the HDMI PLL architecture.

CRs-Fixed: 456315
Change-Id: I19ef344aafc954935cd6d236f3725bf168658ec9
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: clock-mdss-8974: Enable AHB clock before register access

Enable the MDSS AHB clock for proper HDMI PHY PLL register
access. Disable the MDSS AHB clock after register access.

Change-Id: Ice8e723333f3c041bc1cffa2ebc8d7d40a8817d2
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: clock-mdss-8974: Proper hdmi set rate

Do not call set rate if the rate is zero. Reset the flag which sets
the rate on cable disconnect so that next cable connect can set the
rate again.

Change-Id: Ieb8eed3760c4b285182ae47d732352771d13b020
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: clock-mdss-8974: Dynamic HDMI PHY-PLL configuration

Implement the  HDMI PHY PLL calculator to dynamically configure the
HDMI PLL VCO to any supported pixel rate within the supported range.

Change-Id: I5665509aeaf54132ae711e3c4c9be542b25b8241
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
ASoC: msm: remove event_abort and enabled flags from RESET_EVENTS callback

After ADSP SSR RESET_EVENTS is called if audio enabled flag is 0,
omx component cannot release resource properly. And when event_abort is 1,
OMX event handler is exited without releasing resources.

Change-Id: I03e883a7a7f6283d9778c0ec279622af59f4dd09
Signed-off-by: Fred Oh <fred@codeaurora.org>
camera_v2: Use JPEG_DBG instead of JPEG_ERR for some messages

Avoid printing by default a number of debug messages, to decrease
the ioctl latency in the dual JPEG use case.

Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Change-Id: I1cfd16270282587cbf1821d34f658af80fe69fd1
ASoC: msm: update endpoint based DAP table for REMOTE_SUBMIX

Update endpoint parameters table for REMOTE_SUBMIX and FM
endpoints used for Miracast devices in DAP driver.

Change-Id: I9bda1d884f93c131149b3cae0f22a0113020d6e7
Signed-off-by: Jitendra Singh Naruka <jnaruk@codeaurora.org>
ASoC: wcd9306: Fixup the DAPM routing as per codec capabilities

Add mixer controls to enable sharing the same RX path between headphones
and lineout.

CRs-fixed: 536156, 545348
Change-Id: Ie62e5b8a92935a7dc25a9385ba816b6862977071
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
power: qpnp-charger: fix charging timer

The driver miscalculated the time in minutes. Fix the way it calculates
the value to program for the expected charger timer.

Moreover, before programming a new timer value, the timer had to be
disabled. Update the driver to do this. While at it, fix the register
definitions for CHGR_TCHG_MAX_EN and CHGR_TTRKL_MAX_EN.

Change-Id: I0c798aecf13e2186a9e0684f3168bf16e65c27b6
CRs-Fixed: 575809
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
defconfig: msm: Enable KSM for msm8610

Kernel Samepage Merging (KSM) saves memory by merging
pages with the same content.

Change-Id: I89468761e03b08c4700d2aa0f7c8ccad45dd0550
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>