Commit graph

576674 commits

Author SHA1 Message Date
Linux Build Service Account
4fc7d493eb Merge "sched: Set curr/prev_window_cpu pointers to NULL in sched_exit()" 2016-10-25 18:31:05 -07:00
Linux Build Service Account
9f8e4e930a Merge "soc: qcom: use interruptible wait_for_completion API" 2016-10-25 18:31:04 -07:00
Linux Build Service Account
cdb01bf466 Merge "ARM: dts: msm: enable VDD_GFX CPR aging adjustments for msmcobalt v2" 2016-10-25 18:31:03 -07:00
Linux Build Service Account
8114dc9b37 Merge "ASoC: msmcobalt: Add independent clock support on codec" 2016-10-25 18:31:03 -07:00
Linux Build Service Account
6c6aeff205 Merge "ASoC: wcd934x: Update CPR register defaults" 2016-10-25 18:31:02 -07:00
Linux Build Service Account
a1989e62bc Merge "drivers: soc: Initialize return var to default value" 2016-10-25 18:31:01 -07:00
Linux Build Service Account
0861ec02cc Merge "soc: qcom: Use a deferrable timer base for the msm watchdog" 2016-10-25 18:30:59 -07:00
Linux Build Service Account
349ce03687 Merge "qpnp-fg-gen3: Fix storing nominal capacity to actual capacity" 2016-10-25 18:30:58 -07:00
Linux Build Service Account
6cc1473d14 Merge "USB: pd: Fix compilation issues for 32 bit support" 2016-10-25 18:30:57 -07:00
Linux Build Service Account
df72265f5a Merge "ASoC: wcd9335: Fix register sequence for CPE configuration" 2016-10-25 18:30:55 -07:00
Linux Build Service Account
e4fab74617 Merge "ASoC: msmcobalt: Add CPE ECPP DAI instance for ECPP path" 2016-10-25 18:30:55 -07:00
Linux Build Service Account
82f8a0f9ac Merge "ARM: msm: dts: add second CPE session for msmcobalt" 2016-10-25 18:30:54 -07:00
Bhalchandra Gajare
06f5b93af0 ASoC: wcd-dsp-mgr: fix restart logic when codec comes back online
During subsystem restart, when restart of the codec DSP is attempted,
the status is already moved to codec up whereas driver is checking
for codec down. This causes the initialization of components to be
skipped and codec dsp does not come back online. Change fixes the
condition check to make sure the correct sequence is followed.

CRs-Fixed: 1080392
Change-Id: I05345b8f5d108e59863ee4e37ed75fd32a284ee5
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-25 18:05:07 -07:00
Bhalchandra Gajare
0fa1d41b8a ASoC: wcd934x-dsp-cntl: fix memory enable/disable sequence
Enabling only the required memory for codec DSP helps reduce power
consumption with codec DSP is not used. Update the memory enable/
disable sequence such that the switchable memory domain is enabled
only when the codec DSP is being used.

CRs-Fixed: 1075303
Change-Id: I0552bf8a48c214b89e160fe4df145973f02c2788
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-25 17:47:18 -07:00
Olav Haugan
95ceec13f7 sched: Fix compilation issue with reset_hmp_stats
reset_hmp_stats was moved to another file and when CONFIG_CFS_BANDWIDTH
is enabled there is code still referencing this in the original file
causing compilation error.

Change-Id: Iab7fc8551b628c443ce751026b06c5ff4ebba39a
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-10-25 13:13:09 -07:00
Olav Haugan
6812bb69d0 sched/fair: Fix compilation issue
Code does not compile with CONFIG_CFS_BANDWIDTH.

Change-Id: Idb74e9df4fcb55085ac869f5ba273cef4a3eb9eb
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-10-25 10:40:11 -07:00
Subbaraman Narayanamurthy
7a1b6d0276 leds: qpnp-wled: Fix configuration of AVDD TRIM and OVP registers
Currently the AVDD TRIM registers are being configured incorrectly.
Update the sequence to configure the TRIM register and the OVP
register based on predetermined values mapped to the target voltage
specified in the device tree. Also add support for performing
masked writes to the wled registers.

CRs-Fixed: 1082047
Change-Id: I4c99b598d5f484368712eab239f7de70b727c2aa
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-25 10:17:06 -07:00
Subbaraman Narayanamurthy
73518d1b29 leds: qpnp-wled: add a secure write API
Currently, for doing a secure write to the peripheral register,
secure access is acquired at the call site before writing to the
register. Optimize this by adding an API to do secure writes.
When a secure write is attempted, it should be atomic and not
raced with normal write. Add a mutex lock to synchronize the
normal and secure writes. While at it, fix the data parameter
passed to qpnp_wled_write_reg() as that doesn't really need a
pointer.

CRs-Fixed: 1082047
Change-Id: I6a678d9133b06dda2de1c6cfe4bbafacc594f299
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-25 10:07:19 -07:00
Subbaraman Narayanamurthy
0fec3cabfe leds: qpnp-wled: add support to read pmic revid
There are some features which needs to be enabled based on the
PMIC. PMIC information such as subtype, revision can be obtained
from revid peripheral. Hence add support to read pmic revid.

CRs-Fixed: 1082047
Change-Id: If0646f5ae111f75ababc405cbd2f7bcea899360e
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-25 10:06:42 -07:00
Alex Sarraf
c38f93d110 input: misc: hbtp_input: Add support for multiple AFE
Add support for both HI04 and JDI/Rohm with DDIC
synchronization.

Change-Id: Ib6bddd5f43b41660304d240db39f4e273ede3af0
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
2016-10-25 10:00:15 -07:00
Anirudh Ghayal
e8267988c3 platform: qpnp-revid: Add REVID details for PM/PM2FALCON
Add PMIC subtype details for PMFALCON and PM2FALCON.

CRs-Fixed: 1082022
Change-Id: Iad90353f66cf5ad7f83e3fc252d82cec45abce60
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-10-25 19:29:30 +05:30
Amit Nischal
0d9fffccf6 clk: qcom: Change clock index for mmssnoc_axi clock for MSMfalcon
The clock index used for registering the clock and
the index used by clients for clk_get does not match.
Fix the same by updating to the clock index used by clients.

Change-Id: I1b614cb70aa43087c122ce6c42305491e5f5b34b
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
2016-10-25 18:52:59 +05:30
Shantanu Jain
4a643cd131 input: touchscreen: fix compilation errors for Goodix driver
Fix compilation errors for Goodix touch driver for msm-4.4
kernel after porting the driver. This includes replacing the
deprecated api(s) with proper ones and changing code for
proper compilation.

Change-Id: I2abd67a8ff647165ddedb385e80f8705d73d3100
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-25 16:49:09 +05:30
Purushottam Kushwaha
0d7846f7e6 cfg80211: Add support to configure a beacon data rate
This allows an option to configure a single beacon tx rate for an AP.

Signed-off-by: Purushottam Kushwaha <pkushwah@qti.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-repo: git://git.kernel.org/cgit/linux/kernel/git/jberg/mac80211.git
Git-commit: a7c7fbff6a408d00431c705bbe3dfc5f51e3f1c4
CRs-fixed: 1025311
Change-Id: I5f9627964d86c51cb8fb0c5c5f7c9f5f2e19b3e7
Signed-off-by: Purushottam Kushwaha <pkushwah@codeaurora.org>
2016-10-25 15:05:04 +05:30
Gaurav Kohli
6d1dd1c4db ARM: dts: msm: Add support for Modem PIL on msmtriton
Add support for Modem PIL which facilitates the loading of Modem
firmware, authentication and bringing it out of reset.

Change-Id: I42a47e4386ca7a1bbbec428c8d2cbe307634cd1e
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2016-10-25 02:07:09 -07:00
Gaurav Kohli
8800c8568a ARM: dts: msm: Add support for Modem PIL on msmfalcon
Add support for Modem PIL which facilitates the loading of Modem
firmware, authentication and bringing it out of reset.

Change-Id: I3e700bdae21b6e18b28cf5982e42e73d7ae953a5
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2016-10-25 02:00:53 -07:00
Gaurav Kohli
3ff1fcbead soc: qcom: pil-q6v5: Add support for qdspv62.1.5 reset
Update the reset sequence to support qdspv62-1-5 for MSMFALCON.
Also Enable one more memory bank during reset sequence for MSMFALCON.

Change-Id: Ib0d27c13c0ebdfac629c1469c9a91a0b84d03640
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2016-10-25 02:00:36 -07:00
Amit Nischal
76d0d08e11 clk: msm: Add COMMON_CLK branch memory flags
clk_set_flags would fail for clients using the
branch memory flags as the macros vary between the
COMMON_CLK_QCOM and COMMON_CLK_MSM. Fix the same by
adding the enum definitions.

Change-Id: I30cd3fb0435e085e76a60043b80b6ff7aded2819
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
2016-10-25 10:04:39 +05:30
Syed Rameez Mustafa
5c647926d0 sched: Set curr/prev_window_cpu pointers to NULL in sched_exit()
trace_sched_update_task_ravg relies on NULL pointers to ensure that
it doesn't access them. Make sure that when a task exits, these
pointers are set to NULL. Otherwise any call to update_task_ravg()
between sched_exit() and releasing the task structure will access
bogus pointers. In some cases those memory locations are unmapped
and cause a kernel panic.

Change-Id: I9eebb4fb35aca2c8424bfb29ae9d833650dc5ad4
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-10-24 18:44:02 -07:00
Osvaldo Banuelos
3dabb862f0 clk: osm: msm: allow WDOG status register to be enabled via debugfs
Enabling WDOG status register by default has power penalty.
Add support to allow the register to be configured via debugfs
instead.

CRs-Fixed: 1081757
Change-Id: I13156d82f544cd28a1579c23b18182c879c85767
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-10-24 17:39:33 -07:00
Vidyakumar Athota
b51f826e9f soc: qcom: use interruptible wait_for_completion API
Device suspend fails because of un-interruptible blocking read
function. Use wait_for_completion_interruptible API instead of
wait_for_completion to allow device suspend.

Change-Id: Ia537e776d0b322d56cd6003f95cdded5e695ceeb
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-10-24 17:03:40 -07:00
Yuanyuan Liu
0b2474a9bf icnss: Do top level reset when timeout to pull register state
When system timeouts to pull register state, we do wsi error
recovery, which causes an AHB bus hang. Fix this by doing top
level reset instead of wsi error recovery.

CRs-Fixed: 1080014
Change-Id: Ic5dbac9c2cd31f3193ede7cdc64249f7514e3e98
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-10-24 16:42:57 -07:00
Sudheer Papothi
d6a2581efd ASoC: wcd934x: Trigger codec DSP subsystem restart
When there is a fatal error on ADSP, audio subsystem restart(SSR)
gets triggered. As a part of audio SSR, trigger codec DSP
SSR to reset the codec DSP state.

Change-Id: Id9cbda04a4c36070e52919d3a34ebc871ac22a8e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-10-24 15:22:02 -07:00
David Collins
bb57d8b8e1 ARM: dts: msm: enable VDD_GFX CPR aging adjustments for msmcobalt v2
Enable VDD_GFX CPR aging adjustments for MSMCOBALTv2 parts with
CPR fusing revision greater than or equal to 2.  At most 15 mV
can be added onto the open-loop and closed-loop voltage as a
result of an aging measurement at runtime.  This maximum 15 mV
adjustment was previously accounted for in the fixed open-loop
and closed-loop voltage adjustments.  Therefore, remove 15 mV
from both the open-loop and closed-loop voltage adjustments for
all corners.

Change-Id: I44487bfcb4e21d76948cd836ad2dae18bc3d22f4
CRs-Fixed: 1081084
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-10-24 15:21:45 -07:00
Sudheer Papothi
80e0e34f04 ASoC: msmcobalt: Add independent clock support on codec
WCD9335 codec has single master clock supply widget for both
playback and recording paths. Adding separate clock supply
for playback and recording paths will help handle low power
audio recording usecases without affecting playback usecases.
Change is to enable separate clock supply widgets for playback
and recording paths.

CRs-Fixed: 1022917
Change-Id: Ia02a1ffed911498dd6eb5df246e6da68a7802a92
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-10-24 15:21:19 -07:00
Phani Kumar Uppalapati
66d2648b11 ASoC: wcd934x: Update CPR register defaults
Update wcd934x codec register defaults to enable
CPR hardware block for reducing the power consumption
in rock bottom sleep mode.

CRs-Fixed: 1081673
Change-Id: Ib75655d52e5d85d649ebfcb971caf3f5b0b6dc80
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-10-24 14:59:38 -07:00
Phani Kumar Uppalapati
9d9b34eb90 drivers: mfd: Mark CPR bank registers as volatile
Mark CPR bank registers as volatile so that
writes to these registers get updated correctly
in hardware.

CRs-Fixed: 1081673
Change-Id: I92d0511b4e9912dfa346378784d811f6606df205
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-10-24 14:54:06 -07:00
Subbaraman Narayanamurthy
01109ac391 qpnp-fg-gen3: Fix storing nominal capacity to actual capacity
Currently, nominal capacity is stored back to the actual capacity
only when the actual capacity is non-zero. However, that can be
true when the battery is inserted for the first time. This makes
the actual capacity to be stored only when a capacity learning
cycle completes. Other algorithms like to use actual capacity
before that. Fix it.

Change-Id: I346085ec722f491f96181ef1beb383710b441f4b
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-24 14:05:44 -07:00
Sudheer Papothi
8bfdc09623 ASoC: wcd934x: Add support for audio subsystem restart
When there is a fatal error on ADSP, audio subsystem becomes
unresponsive. Add support for audio subsystem restart that
helps to recover ADSP and codec from the crash without
rebooting the entire system.

CRs-Fixed: 1069188
Change-Id: I2939e9fd37e96f37101b93dabd86cfdaaf06907f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-10-25 02:17:26 +05:30
Vikram Mulukutla
1d60d26f96 soc: qcom: Use a deferrable timer base for the msm watchdog
It is possible that normal CFS latencies in the presence of
very heavy task load causes timer migration to be delayed
in hotplug paths. This may in turn prevent the watchdog kthread
from waking up, resulting in a bark.

Technically the watchdog is supposed to be a last-resort
failure recovery; even in this stressful hotplug scenario
the device is *usable*, just incredibly slow. It is arguable
that the watchdog should not have fired in this case, and
the petting mechanism should handle this scenario.

Move the timer to a deferrable timer base. We are really not
using the "deferrable" aspect of the timer, but the fact that
we (msm) also changed deferrable timers to run on any CPU.
This underlying change will allow the watchdog timer to be
handled on any CPU.

This completely depends on the fact that we don't have to
pet the watchdog when *all* CPUs go idle, which would
make sense from a power perspective anyway.

Change-Id: Ie389e28ff890a805854f921e4cd491a296a32925
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-24 12:33:46 -07:00
Sudheer Papothi
8e77be66f9 drivers: mfd: wcd934x: Set MBHC registers to volatile
MBHC mechanical detection, electrical detection and micbias
registers are not getting updated in hardware after subsystem
restart results in no IRQ during headset plug insertion.
Set these MBHC registers to volatile for headset plug
detection to work properly.

Change-Id: Iaec3a17e5eed952ba0abdcffbf321ad942486769
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-10-24 12:15:48 -07:00
Hemant Kumar
61efc17ecf usb: dwc3: gadget: Remove dev_WARN_ONCE in dwc3_gadget_ep_disable
In case of usb bus suspend at the time of disconnect, rmnet function
suspend disables the endpoint. Same endpoint gets disabled again as
result of handling gadget driver disconnect. This generates warning
message and dumps the call stack. This may cause message flooding
as a result of multiple usb plug in/plug out. Hence replace
dev_WARN_ONCE with dev_dbg and log this event in debug buffer.

CRs-Fixed: 1081547
Change-Id: I64f0f5b15cc5d9185e415f0b26e276e111c885ec
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-10-24 11:05:25 -07:00
Satyajit Desai
2b5e9d5cb6 coresight: tmc: skip tmc read if mem allocaiton failed
Add NULL pointer check to ensure that we do copy to user only
when we were able to allocate memory for ETR.

Change-Id: I09b4bc37617811fd4acd86a7e4f5ef91630675df
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
2016-10-24 10:57:41 -07:00
Subbaraman Narayanamurthy
f410c92004 smb-lib: update displaying battery overvoltage in health property
Currently, smb2 charger is configured to not end the charging
cycle when battery overvoltage occurs. However, when the battery
overvoltage status is read, it will be displayed through health
property. Improve this by reading the battery voltage and check
whether it is within 40mV headroom above float voltage. If it is
above that threshold then continue with displaying overvoltage
status.

CRs-Fixed: 1079363
Change-Id: I45847f446c91c80a5110d80b59a0ae4b8e2c40e5
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-24 10:35:08 -07:00
Amey Telawane
04d8e866cb ARM: dts: msm: add support for etm and cpu-cti on msmfalcon
Add support for CPU-CTI and ETM for msmfalcon. ETM is used
for collecting trace data and CPU-CTI is used for cross
triggering.

Change-Id: Ibee5689216d9115cb4888fb8593734eaef6c7f9f
CRs-fixed: 1056777
Signed-off-by: Amey Telawane <ameyt@codeaurora.org>
2016-10-24 22:51:05 +05:30
Benjamin Chan
c6f19b4fa5 msm: sde: Fix SDE rotator clock disable sequence
It is necessary to follow a certain order when disabling the rotator
clock. Not doing so might lead to clock actually not turning off and
cause power leakage.

CRs-Fixed: 1081010
Change-Id: I16e500aa87813cd3a1e18f134ea1ed145b9e1ef8
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2016-10-24 08:25:53 -07:00
Vijayavardhan Vennapusa
99d25c7fcd USB: pd: Fix compilation issues for 32 bit support
Compilation errors are seen from qpnp-pdphy.c and policy_engine.c
drivers, when try to compile for 32 bit support. Hence fix those
errors for 32 bit support getting compiled successfully.

Change-Id: I0c496a73feb83c640f9a135f98ec393d1096b205
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-10-24 17:15:29 +05:30
Shantanu Jain
6d44e59f44 input: touchscreen: replace macros used inside the functions
Define new device tree properties to replace the macros used
in the driver functions.
Remove hrtimer calls which is not being used in the current
driver code.

Change-Id: I29b9ea41df467d0092be8005733016843dc26f60
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-24 17:02:58 +05:30
Ashish Jain
9c4a39fcd6 ASoC: msm: Enable Media Format converter for all resampling usecases
With support of playback for native 384kHz, it is recommended to avoid
resampling in afe even for non fractional rates, hence enable media
format converter in all usecases whenever resampling is needed.

Change-Id: I94b9091b8349d6388fbe5c29eabe3666c86e5cce
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
2016-10-24 03:27:13 -07:00
Praneeth Paladugu
9bdfb919ed msm: vidc: Update log level for power collpase
Update Power collapse log messages to VIDC_PROF to be in
sync with other clock related logs. Today these logs are
at VIDC_DBG and VIDC_INFO which also has lot of other logs.

Change-Id: Id69802df24c4eaf4d8e9bc0c438d250090f9a38f
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
2016-10-23 22:00:47 -07:00