Commit graph

575134 commits

Author SHA1 Message Date
Kiran Gunda
26a9b037ef msm: msm_bus: introduce bus topology for msmfalcon
Introduce bus topology for msmfalcon. This is a representation
of the bus connections in the SOC and allows the bus driver
to setup bandwidth requests from clients for the paths desired.

Change-Id: If58f6c5b48a023ba7f9212758d71930116156008
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2016-09-14 13:19:53 +05:30
Kiran Gunda
6fcd5d81e4 msm: msm_bus: add new master/slave ids
Introduce new master/slave ids to identify
the corresponding master/slaves for the
bandwidth aggregation done by the bus driver.

Change-Id: Ibed309284b47ba3f22ccbac45c750f3e366ec40e
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2016-09-14 13:10:05 +05:30
Rama Krishna Phani A
db91b2eba7 msm: sps: Avoid pipe disconnect while IRQ is in progress and viceversa
Client driver may disconnect pipe while some data is still
pending on the pipe and might not need IRQ for that data. Current
implementation might result in crash in case disconnect and IRQ happens
on same pipe in parallel. Implement lock to avoid pipe disconnect
while IRQ is in progress for that pipe and viceversa.

Change-Id: Icf43c0a18cfc1644270b684a792632a6c81f1797
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
2016-09-13 23:39:34 -07:00
Amir Samuelov
fb272b7bd6 defconfig: enable spss-utils driver for msmcobalt
Enable Secure Processor Subsystem (SPSS) Utilities driver.
This driver selects the firmware file for SPSS PIL.

Change-Id: Ia9e710b9c75f2d8cffee26373ec8e56a20323563
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-09-13 23:37:39 -07:00
Amir Samuelov
bbd9711a0d ARM: dts: msm: add spss_utils to msmcobalt
Add device tree info for Secure Processor Subsystem Utilities driver.

Change-Id: I2657705131fcbbcc63a723b3badb3f43135b4408
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-09-13 23:36:58 -07:00
Meng Wang
825b295840 ASoc: wcd9335: correct native playback widget on msmcobalt
On msm-4.4, conditional paths are not supported for
supply widgets. Using SND_SOC_DAPM_MUX instead of
using Switches to connect to the native supply.

CRs-Fixed: 1066167
Change-Id: If015dbad0e168e41f1c8c86b502d4cf5fb592045
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2016-09-14 14:17:15 +08:00
Thierry Reding
f6a5df1fdf regulator: core: Fix nested locking of supplies
commit 70a7fb80e85a ("regulator: core: Fix nested locking of supplies")

Commit fa731ac7ea04 ("regulator: core: avoid unused variable warning")
introduced a subtle change in how supplies are locked. Where previously
code was always locking the regulator of the current iteration, the new
implementation only locks the regulator if it has a supply. For any
given power tree that means that the root will never get locked.

On the other hand the regulator_unlock_supply() will still release all
the locks, which in turn causes the lock debugging code to warn about a
mutex being unlocked which wasn't locked.

Cc: Mark Brown <broonie@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Fixes: fa731ac7ea04 ("regulator: core: avoid unused variable warning")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 70a7fb80e85ae7f78f8e90cec3fbd862ea6a4d4b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[ashayj@codeaurora.org: Fix the regulator bug which was re-introduced by
commit f145f4]

CRs-Fixed: 1065539
Change-Id: I376a6412bb65a1e193647eab54ad993df4c2c24f
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-09-14 11:12:45 +05:30
Phani Kumar Uppalapati
d8e6734002 ASoC: wcd934x: Add support for HPH idle detection
WCD934X audio codec supports idle detection over headphone
path to reduce power consumption when the audio signal
level is low. Add support to enable headphone idle detection
in the wcd934x codec driver.

CRs-fixed: 1066588
Change-Id: I8d67fa4055898db31b47f87b6659484aeb08f58f
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-09-13 20:16:55 -07:00
Vamsi Krishna Samavedam
b73866cdb1 sound: usb: Send explicit device disconnect to clients
Explicitly send device disconnect notification to client
so that client can disable audio streams. This will in turn
enable sound usb driver to release usb device and notify device
removal to user-space. User-space will clean up audio session.
Without this change sound usb driver is blocking usb device
release till audio streams are disabled. However, audio streams
are only disabled when user-space cleans up audio session on usb
device removal which is blocked. This change is trying to fix
this deadlock condition by notifying device disconnect to clients
explicitly.

Change-Id: I7e5a8aca84a7a620bb61eb0ace8a6b6c622f89de
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
2016-09-13 19:30:41 -07:00
Puja Gupta
d7532eb42e soc: qcom: Add subsys state with service notifier notification
Propagate subsystem state received from SSR notification back to the
service notifier clients so they can know if subsystem crashed.

CRs-Fixed: 1066446
Change-Id: I5418d298290623ac66a2b64108a1f5dab034e5f3
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2016-09-13 18:43:40 -07:00
Amit Nischal
f556cace66 scsi: ufs: Add support for reset controller framework
The current api which performs the clock reset is moved to use the reset
framework, so support the changes in ufs driver for the same. The reset
framework requires to get reset handle and perform assert/deassert of the
resets.

Change-Id: I78d833639772cf541e563cbf9fae1aa75ec6a7da
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
2016-09-13 18:02:30 -07:00
Puja Gupta
be0955d8cf soc: qcom: pil: Change clock disabling sequence
Disable clocks in reverse order of the way you enable them so as to
avoid clock stuck_on warnings.

CRs-Fixed: 1066446
Change-Id: I071df5d5848878e5ff7b514bf9089c011a0c6a69
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2016-09-13 17:29:33 -07:00
Walter Yang
cc0ec8435f ASoC: msm: Create the codec entry for wcd934x codec
Create codec entry for wcd934x codec so that userspace can retrieve
the codec info.

CRs-Fixed: 1063367
Change-Id: Ie846b5edf1d8aaecce5140986dad8da69d608d5a
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2016-09-14 08:24:07 +08:00
Walter Yang
24bf042aef ASoC: wcd934x: Add codec version check for wcd934x
As there are many hardware version of wcd934x codec. Add version
check in the code so that userspace can get the version info.

CRs-Fixed: 1063367
Change-Id: Ia320380d568426c2d7a414a832980a556ff27f0f
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2016-09-14 08:11:38 +08:00
Puja Gupta
f68a3b56e4 soc: qcom: pil: Correct notification path in subsys_stop
Send SUBSYS_BEFORE_SHUTDOWN notification to clients before doing
graceful shutdown so that clients can do their end of housekeeping.

CRs-Fixed: 1066446
Change-Id: I77b248c51914651aea4b27d7c5a3d5d784b1e542
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2016-09-13 14:40:47 -07:00
Jeff Vander Stoep
1a565f59cb FROMLIST: security,perf: Allow further restriction of perf_event_open
When kernel.perf_event_open is set to 3 (or greater), disallow all
access to performance events by users without CAP_SYS_ADMIN.
Add a Kconfig symbol CONFIG_SECURITY_PERF_EVENTS_RESTRICT that
makes this value the default.

This is based on a similar feature in grsecurity
(CONFIG_GRKERNSEC_PERF_HARDEN).  This version doesn't include making
the variable read-only.  It also allows enabling further restriction
at run-time regardless of whether the default is changed.

https://lkml.org/lkml/2016/1/11/587

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

Git-repo: https://android.googlesource.com/kernel/common.git
Git-commit: 012b0adcf7299f6509d4984cf46ee11e6eaed4e4
[d-cagle@codeaurora.org: Resolve trivial merge conflicts]
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
Bug: 29054680
Change-Id: Iff5bff4fc1042e85866df9faa01bce8d04335ab8
2016-09-13 12:23:33 -07:00
Ben Hutchings
a647f40d2b BACKPORT: perf tools: Document the perf sysctls
perf_event_paranoid was only documented in source code and a perf error
message.  Copy the documentation from the error message to
Documentation/sysctl/kernel.txt.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-doc@vger.kernel.org
Link: http://lkml.kernel.org/r/20160119213515.GG2637@decadent.org.uk
[ Remove reference to external Documentation file, provide info inline, as before ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Bug: 29054680
Change-Id: I13e73cfb2ad761c94762d0c8196df7725abdf5c5
Git-repo: https://android.googlesource.com/kernel/common.git
Git-commit: b79154b8f7702f6e8a56ce9f1355f841cec16c37
[d-cagle@codeaurora.org: Resolve trivial merge conflicts]
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2016-09-13 12:19:28 -07:00
Kangjie Lu
4e09e763eb net: fix infoleak in rtnetlink
The stack object “map” has a total size of 32 bytes. Its last 4
bytes are padding generated by compiler. These padding bytes are
not initialized and sent out via “nla_put”.

Change-Id: I41f4745f24720c7af5ab08dc4274224d7fe4dcfe
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-repo: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
Git-commit: 5f8e44741f9f216e33736ea4ec65ca9ac03036e6
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2016-09-13 12:17:27 -07:00
David Collins
14d435eaf2 regulator: cpr3-regulator: fix potential aging uninitialized variable usage
If cpr3_ctrl_clear_cpr4_config() returns an error at the
beginning of the cpr3_regulator_measure_aging() function, then
goto cleanup is called.  After that, the *_restore values are
written back into hardware registers.  Unfortunately, these
*_restore variables are uninitialized in this code path.
Correct this issue.

Change-Id: I906613a00137925c9903ac6c01771c459594864f
CRs-Fixed: 1066407
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-09-13 11:53:18 -07:00
Joonwoo Park
04f14aa884 cpuset: handle race between CPU hotplug and cpuset_hotplug_work
A discrepancy between cpu_online_mask and cpuset's effective_cpus
mask is inevitable during hotplug since cpuset defers updating of
effective_cpus mask using a workqueue, during which time nothing
prevents the system from more hotplug operations.  For that reason
guarantee_online_cpus() walks up the cpuset hierarchy until it finds
an intersection under the assumption that top cpuset's effective_cpus
mask intersects with cpu_online_mask even with such a race occurring.

However a sequence of CPU hotplugs can open a time window, during which
none of the effective CPUs in the top cpuset intersect with
cpu_online_mask.

For example when there are 4 possible CPUs 0-3 and only CPU0 is online:

  ========================  ===========================
   cpu_online_mask           top_cpuset.effective_cpus
  ========================  ===========================
   echo 1 > cpu2/online.
   CPU hotplug notifier woke up hotplug work but not yet scheduled.
      [0,2]                     [0]

   echo 0 > cpu0/online.
   The workqueue is still runnable.
      [2]                       [0]
  ========================  ===========================

  Now there is no intersection between cpu_online_mask and
  top_cpuset.effective_cpus.  Thus invoking sys_sched_setaffinity() at
  this moment can cause following:

   Unable to handle kernel NULL pointer dereference at virtual address 000000d0
   ------------[ cut here ]------------
   Kernel BUG at ffffffc0001389b0 [verbose debug info unavailable]
   Internal error: Oops - BUG: 96000005 [#1] PREEMPT SMP
   Modules linked in:
   CPU: 2 PID: 1420 Comm: taskset Tainted: G        W       4.4.8+ #98
   task: ffffffc06a5c4880 ti: ffffffc06e124000 task.ti: ffffffc06e124000
   PC is at guarantee_online_cpus+0x2c/0x58
   LR is at cpuset_cpus_allowed+0x4c/0x6c
   <snip>
   Process taskset (pid: 1420, stack limit = 0xffffffc06e124020)
   Call trace:
   [<ffffffc0001389b0>] guarantee_online_cpus+0x2c/0x58
   [<ffffffc00013b208>] cpuset_cpus_allowed+0x4c/0x6c
   [<ffffffc0000d61f0>] sched_setaffinity+0xc0/0x1ac
   [<ffffffc0000d6374>] SyS_sched_setaffinity+0x98/0xac
   [<ffffffc000085cb0>] el0_svc_naked+0x24/0x28

The top cpuset's effective_cpus are guaranteed to be identical to
cpu_online_mask eventually.  Hence fall back to cpu_online_mask when
there is no intersection between top cpuset's effective_cpus and
cpu_online_mask.

CRs-fixed: 1058529
Change-Id: I83ee4619feff2ca7452119c9baecb6ffde755287
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: cgroups@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: <stable@vger.kernel.org> # 3.17+
Signed-off-by: Tejun Heo <tj@kernel.org>
2016-09-13 10:32:11 -07:00
Viswanadha Raju Thotakura
26cdd44df4 msm: camera: Add support for camera on version 2 of msmcobalt
EQ bias is enabled in of msmcobalt version 2 csiphy.
Differentiate this setting with new version 2 camera dt file.

CRs-Fixed: 1050172
Change-Id: I5781453f2b2a81b9cf5f7fb643e021b53879583e
Signed-off-by: Viswanadha Raju Thotakura <viswanad@codeaurora.org>
2016-09-13 10:19:45 -07:00
Yuanyuan Liu
5466d309b4 icnss: Provide client_id in ind_register request
Provide client_id in ind_register QMI request message so that
WLAN FW can identify different clients.

CRs-Fixed: 1065341
Change-Id: I2d79daa72fb87a7d3c0818563a88e94f36af48b8
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-09-13 09:54:06 -07:00
Linux Build Service Account
9b82a4c589 Merge "qseecom: allocate sglistinfo buffer for kernel clients" 2016-09-13 05:43:56 -07:00
Linux Build Service Account
fb4fb712c9 Merge "firmware_class: Add missing change during kernel upgrade" 2016-09-13 05:43:55 -07:00
Linux Build Service Account
9ed8bfe3f2 Merge "Merge branch 'tmp-bab1564' into msm-4.4" 2016-09-13 05:43:53 -07:00
Linux Build Service Account
d58d587e95 Merge "scsi: ufs-qcom: configure ufs clocks core memory" 2016-09-13 05:43:52 -07:00
Linux Build Service Account
212c5900df Merge "ARM: dts: msm: enable aggre1 ufs hw ctl clock for msmcobalt" 2016-09-13 05:43:51 -07:00
Linux Build Service Account
48e1a69c5f Merge "icnss: Add support of monitoring vph_pwr" 2016-09-13 05:43:50 -07:00
Linux Build Service Account
44da37be57 Merge "crypto: msm: qce50: allocate iovec out of cacheable memory" 2016-09-13 05:43:49 -07:00
Linux Build Service Account
732c56a77c Merge "slim: msm: Avoid registration with notifier if service is not located" 2016-09-13 05:43:48 -07:00
Linux Build Service Account
d3747e3e27 Merge "slim: ngd: Avoid warning associated with TASK_INTERRUPTIBLE" 2016-09-13 05:43:47 -07:00
Linux Build Service Account
3ff89558ca Merge "scsi: ufs: dump hw regs on link failures" 2016-09-13 05:43:46 -07:00
Linux Build Service Account
a10e3ceacb Merge "scsi: ufs-qcom: dump additional testbus registers" 2016-09-13 05:43:44 -07:00
Linux Build Service Account
ea716e4b58 Merge "ARM: dts: msm: add stm dts support for msmfalcon" 2016-09-13 05:43:43 -07:00
Linux Build Service Account
f22aa5fe4b Merge "clk: qcom: Add gate clocks in GCC driver for MSM8996" 2016-09-13 05:43:42 -07:00
Linux Build Service Account
10a152cda4 Merge "clk: qcom: Clean up the MSM8996 Global Clock Control (GCC) driver" 2016-09-13 05:43:40 -07:00
Amir Samuelov
bc718d5081 soc: qcom: add secure processor subsystem (spss) utils driver
The spss-util driver provides utilities required for the SPSS.
It provides the fuse state for key selection.
It provides the SPSS HW version.

Change-Id: I70c37d64db351db86e3d1d5dddb810257c68d72f
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-09-13 04:35:26 -07:00
Abinaya P
278a037a7d input: it7258_ts_i2c: rename regulator_set_optimum_mode function
The function regulator_set_optimum_mode() has been renamed to
regulator_set_load(). So update the driver accordingly.

Change-Id: I7d69a4529368918f159a25769f497e6425838460
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
2016-09-13 03:20:20 -07:00
Shantanu Jain
4e02797d45 input: touchscreen: Correct return value check in Goodix driver
Correct return value check of gtp_read_fw_version, called in probe
of the Goodix driver. The return value is actually the number of
registers read through gtp_i2c_read() function call.
Also change the error message of gtp_check_product_id.

Change-Id: I0b643e250a487f08a19555237802b020b0873d1a
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-09-13 01:47:03 -07:00
Shantanu Jain
431c5aa98a input: touchscreen: Clean code for i2c_read and i2c_write
Use standard initializer code in gtp_i2c_read and
gtp_i2c_write functions for Goodix touchscreen driver.

Change-Id: Id954be61a0b4596339a659928fb630c5c5538a9a
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-09-13 01:46:56 -07:00
Shantanu Jain
5741a47581 input: touchscreen: Use proper conventional functions for debug
Replace non-standard debug function with the conventional
functions in Goodix driver. And remove unnecessary debug
function used in Goodix driver.

Change-Id: Ia89d225333c1309710aab67b9c406784567e3050
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-09-13 01:46:49 -07:00
Meng Wang
c3d1fc7a13 ARM: dts: msm: add new clk for native playback on msmcobalt
MSM GPIO 69 is used as a clock for native playback
on msmcobalt. Add the GPIO 69 configuration along with
pinctrl information.

CRs-Fixed: 1066167
Change-Id: Icd3e82a754867c0f16035a5f3eb7f86ee57c7281
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2016-09-13 00:38:09 -07:00
Bingzhe Cai
24a8120f34 input: touchpanel: fix security issues in GT915 driver
There are multiple buffer overflow and input validation issues
in Goodix gt915 driver, fix these issues by adding data length
check and change file system node mode.

Change-Id: I5173fc1ca021fd45c939c7c8a4f460651330de5b
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-09-12 23:53:48 -07:00
Shantanu Jain
0ddb25d00e input: touchscreen: Add dynamic detection support to Goodix driver
Add dynamic detection support to goodix driver, where
the driver tries to read the chip id and make sure
it is communicating with the right chip.

gtp_read_version is modified to gtp_read_fw_version
which reads the firmware version from the controller
and will be used during fw update process.

Change-Id: I2dc51b84f817413da6bf9b266e2fe7e0bb09c4bc
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-09-12 23:53:38 -07:00
Bingzhe Cai
90d5e14e32 input: touchscreen: modify report event according to MT protocol B
Multi-touch(MT) protocol B use input_mt_report_slot_state()
instead of send ABS_MT_TRACKING_ID event directly, so modify
the driver to follow the protocol and remove redundant protocol
A code.

Change-Id: I542e61fabaaa04fcf5fb7e454e10599511f18e39
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-09-12 23:52:59 -07:00
Shantanu Jain
c39dd15cf7 input: touchscreen: release all touches before suspend
Release all touches before going to suspend for goodix
gt9xx TS driver.

Change-Id: Ia3446f3c23be4fe29bfea5f85b22e8b903cffb9e
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-09-12 23:52:52 -07:00
Figo Wang
6ae8594368 input: makefile: Add makefile and kconfig for GT9xx CTP
Add Makefile and Kconfig to build Goodix GT9xx Touchscreen
Driver.

Change-Id: Ibbcdcbb4563bc022d6e4034c37bc633eb9b34315
Signed-off-by: Figo Wang <figow@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-09-13 11:38:59 +05:30
Gaurav Kohli
62dec45139 firmware_class: Add missing change during kernel upgrade
Add missing change for request_firmware_nowait so third party
drivers are able to load their firmware

Change-Id: Ic6b842a717bde9c2bc50a7c7845c7c50ac05be25
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2016-09-12 22:32:22 -07:00
Linux Build Service Account
087b488761 Merge "net: rmnet_data: Define the skb recycle handler for transports" 2016-09-12 21:29:53 -07:00
Linux Build Service Account
8250f066ca Merge "clk: msm: clock: Register the mnoc_maxi_clk after the vmem_maxi_clk" 2016-09-12 21:29:53 -07:00