Commit graph

571452 commits

Author SHA1 Message Date
Devesh Jhunjhunwala
94d2a9fd5d leds: qpnp-flash-v2: add regulator support
Add support to control regulators required for
flash-led. The pmicobalt_bob regulator is one
such regulator required by the flash-led device.

CRs-Fixed: 1024187
Change-Id: I1515fba2fb04c0b4d21828af3cea6d322262ab14
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-07-11 18:56:23 -07:00
Chun Zhang
01d202d756 leds: qpnp-flash-v2: add callback for max current query
Flash LED is a high energy aggregator from system as it is capable
to provide current up to 3750mA for illumination. Therefore, it
should be used with caution especially when battery state of charge
is low. Therefore, add a function which can be used by clients like
camera to query the flash current limit before using flash LED. This
protects the system from a possible UVLO condition.

CRs-Fixed: 964855
Change-Id: I17fa4f28cc151e3a3ad89d284995a3fa770bec68
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-07-11 18:56:22 -07:00
Chun Zhang
9eb8b67fe9 leds: qpnp-flash-v2: add support for strobe configuration
Flash LED module supports various kinds of strobe support. Strobe
type can be hardware or software, active high or low, and level or
edge trigger. Add support for configuring strobe type through
device tree properties.

CRs-Fixed: 1024187
Change-Id: Ief6a610c82b7f645966c596f543a1d30f7a40dcc
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-07-11 18:56:22 -07:00
Shiv Maliyappanahalli
8a547c50fe msmcobalt: Add delay to check ADSP state during SSR
During SSR(subsystem restart), add a delay when ADSP state
is not yet ready. This will avoid excessive logging when
ADSP state is not ready.

Change-Id: I7e127d97cdd22409d4e70788a7cf2013593d3bfe
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2016-07-11 18:56:21 -07:00
Shiv Maliyappanahalli
6746aed411 ASoC: qdsp6v2: Fix apr registration failure in q6core
It is possible that core service can register with APR in
different contexts and may result in apr_register returning
EALREADY error while core service gets a NULL handle.

Avoid the race condition by holding command lock to ensure
that apr_handle does not get overwritten.

Change-Id: I8863185651fde8d29b5b8d8f183544bf0f215dbe
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2016-07-11 18:56:20 -07:00
Shubhraprakash Das
81670a3954 media: videobuf2: Increase max buffers
Increase the maximum video buffers to 64 as with camera 64
buffers are allocated and used.

CRs-Fixed: 1039456
Change-Id: I37d91c4f7e5d98333cf6be3c75168e134ae78060
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2016-07-11 18:56:20 -07:00
Skylar Chang
17c0378ccd msm: ipa3: fix the double ipa3_pre_init issue
With smmu enabling, ipa3_pre_init is actually
probed twice and causing the crash, the fix
is to do only once.

Change-Id: I20bd718c8cb70029c4dd46c52dbece326b90ef80
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-07-11 18:56:19 -07:00
Viswanadha Raju Thotakura
7b99fa6203 ARM: dts: msm: Change camera mount angle for msmcobalt
Change rear camera mount angle to fix inverted preview
for msmcobalt MTP design.

CRs-Fixed: 1021009
Change-Id: I31a49465545e4b9a562b66bff7353d91817205f2
Signed-off-by: Viswanadha Raju Thotakura <viswanad@codeaurora.org>
2016-07-11 18:56:18 -07:00
Shiv Maliyappanahalli
5f0a4b1fef drivers: soc: set apr handle to NULL on glink_open error
After sub system restart, opening glink channel while
lpass transport is not up results in failure and returns
error pointer. APR glink client although returns error for
the first glink command, does not set the apr handle to NULL
and incorrectly assumes err pointer as a valid handle when
opening the channel again.

Fix this by updating the apr handle to NULL when glink_open()
fails.

Change-Id: I53a219b1ebed5bc3593d500d80d580aac6431ab5
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2016-07-11 14:27:35 -07:00
Abdulla Anam
f55cbb3385 msm: vidc: add ion_handle checking before mapping buffers
Compare ion handles in driver instead of matching fds
to check if a buffer is already mapped or not.

Bug: 28747768

CRs-Fixed: 1026885
Change-Id: Ifd18d8689351c4a6a22c988d359fb413be19e142
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: Abdulla Anam <abdullahanam@codeaurora.org>
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2016-07-11 14:27:17 -07:00
Praveen Chavan
c108070ffa msm: vidc: update the check to ignore extradata plane in dqbuf
userptr may or may not be a null-value. Checking for this field
to qualify a plane as extradata has no merit. Ignore that check.

Bug: 28747768
CRs-Fixed: 1026885
Change-Id: I08d85ef462f09003aaa17f6ebc5d27de7083796f
Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2016-07-11 14:27:02 -07:00
Shiraz Hashim
50044eb1b4 iommu/iommu-debug:: initialize variables before use
Initialize return values to their default before being
used.

Change-Id: Ie4dd908657573e5110bce65931d5507125da4c40
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
2016-07-11 14:26:46 -07:00
Shiraz Hashim
81218366f1 iommu/io-pgtable-fast: validate data before use
Return error on data allocation failure to prevent use
after free case.

Change-Id: I9d173756e277c9006220c02c209309167f179609
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
2016-07-11 14:26:28 -07:00
Shiv Maliyappanahalli
87b1536fb3 msmcobalt: enable audio over HDMI
Add HDMI audio back end and associated apis to
configure channel, format and sample rate to
enable audio over HDMI.

Change-Id: Ieef8a2658f9730a9268041ac93ea3958489f2eae
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2016-07-11 14:26:14 -07:00
Shiv Maliyappanahalli
62101aeaa9 ARM: dts: msm: enable audio over HDMI for msmcobalt
Add device tree entries to enable audio
over HDMI.

Change-Id: Ie9bb609f9681580d90e5ec35b89e587758c272d4
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2016-07-11 14:26:01 -07:00
Maya Erez
3299b78b6f wil6210: fix chan check in wil_p2p_listen
In wil_p2p_listen chan is checked to protect against NULL
pointer access only before setting channel = chan->hw_value.
Add a global parameter check to cover all accesses to chan.

Change-Id: Ib975c99b3b87998c357251a37f4862cbbf68697d
CRs-Fixed: 1026286
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-07-11 14:25:47 -07:00
Hamad Kadmany
6af6a921f7 wil6210: add module parameter for alternate interface name
Add a module parameter alt_ifname that when set, will name
the primary network interface wigig<N> instead of the default
wlan<N>. This helps platforms such as android where we need to
clearly separate the WIGIG interface from the default wireless
interface.

Change-Id: Ie1cd3ccf777e84665075bc3b6d9fffa7d897de49
CRs-Fixed: 982931
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-07-11 14:24:42 -07:00
Sudheer Papothi
1f1574bb18 ASoC: wcd9335: Fix traversing of source dapm widgets
Parsing of audio routing in ASoC core has been changed in
kernel 4.4 to use new variables. Update the codec driver
to traverse to source dapm widget using new variables.

Change-Id: I8c545248f23c73ff9fb470705f1c17175a8e4e0b
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-07-08 11:52:42 -07:00
Meng Wang
aa0b21c907 mfd: wcd9xxx-irq: check if wcd9xxx_res irq is 0 before using it
During SSR, wcd9xxx_res irq lock is destroyed as part of resource
cleanup. If driver tries to access wcd9xxx_res irq lock before it's
initialized, it could cause crash. Check if wcd9xxx_res irq is 0
before using it to avoid crash.

CRs-Fixed: 1003482
Change-Id: I959caf7b305e965b84e8204168194bbfda72dc52
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2016-07-08 11:52:42 -07:00
Surendar karka
feb8b93c02 ASoC: msm: Dynamic allocation of loopback sessions
Allocate looback sessions dynamically and add support
for multiple loopback sessions.

CRs-Fixed: 986695
Change-Id: I4a0b0ed4f6679da016b1b460cb597bc7fa2afa12
Signed-off-by: Surendar karka <sukark@codeaurora.org>
2016-07-08 11:52:41 -07:00
Srinivas Ramana
531693f77c defconfig: Add initial 32-bit defconfig for msmfalcon
Add initial defconfig file for booting msmfalcon

Change-Id: I6935c6de9009532570e1becad4ef1c1ee095d7c4
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2016-07-08 11:52:40 -07:00
Subbaraman Narayanamurthy
f357fc8f60 ARM: dts: msm: add Tri-color RGB LEDs on pmicobalt
Add RGB LEDs that are present on pmicobalt. These LEDs are used
for applications like notification of charging indicator and
other user defined applications.

Since LPG channels 3,4 and 5 are assigned for Blue, Green and
Red LEDs on pmicobalt, keep them enabled in device tree.

CRs-Fixed: 1037821
Change-Id: I1a40bbe46e689d8c98f31cfef3a6743856288127
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-07-08 11:52:39 -07:00
Trilok Soni
f9d0fd115f arm64: topology: Export arch_get_cpu_efficiency API
Export arch_get_cpu_efficiency API since it can be called
by the modules. Update topology header file too.

CRs-Fixed: 1038542
Change-Id: Ie2ab84b02a8fb4070a0e86f09f52db9aa4163003
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2016-07-08 11:52:39 -07:00
Devesh Jhunjhunwala
3ab333cd26 leds: qpnp-flash-v2: Fix safety timer configuration
The mask and enable values being used are incorrect for the
safety timer. Fix it. Also take this opportunity to update
all relevant macros to use the GENMASK(h,l)/BIT(x) macros.

CRs-Fixed: 1024187
Change-Id: Ibdd139c98aa289f1d6b8545b953e79a1187284e9
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-07-08 11:52:38 -07:00
Devesh Jhunjhunwala
f657fd36ba ARM: dts: msm: Add current property for flash-led for pmicobalt
Add the qcom,current-ma property which is used to specify the
default current value to be used for the flash and torch devices.
This property is used by clients of the flash device.

CRs-Fixed: 1024187
Change-Id: I3670eaa65efc9d1efb29fb30500fb9067885b446
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-07-08 11:52:37 -07:00
Devesh Jhunjhunwala
154574cfc6 leds: qpnp-flash-v2: Add operational current property
Add the qcom,current-ma property to specify the operational
current for the flash led. Also limit the minimum flash current
to 25mA since currents below this value cause unstable flash
operation.

CRs-Fixed: 1033071
Change-Id: Ia133b6c0cf0c21484f61631f04cba0d1112c9d48
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-07-08 11:52:36 -07:00
Meng Wang
69feba98b2 ARM: dts: msm: remove VMBMS feature for msmcobalt
VMBMS is used for accuracy improvement during voice call. It is
not supported on msmcobalt. It is moved to FG driver,
VMBMS is not needed anymore. Remove it from msmcobalt device tree.

CRs-Fixed: 1038038
Change-Id: Ib01b649633ef8d7e15791fa9b1bd0d7a3fbffc5d
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2016-07-08 11:52:35 -07:00
Mayank Rana
4b9c8b0b53 usb: phy: qusb-v2: Add USB QUSB PHY for newer platform
This change adds USB QUSB PHY v2 driver which is compatible
for USB QUSB PHY having major revision as 2.

Change-Id: I1751352ebbe38d4b8c7886085d15043c2e5244f5
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-07-07 16:02:07 -07:00
Devesh Jhunjhunwala
5706479242 ARM: dts: msm: Add torch nodes to flash-led for pmicobalt
Add support for torch mode by adding torch nodes to the
flash-led device for pmicobalt. Also update the dt-bindings
documentation accordingly.

CRs-Fixed: 1024187
Change-Id: I640106abcf05949f2570efd42f925f1f73bdaa81
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-07-06 15:43:46 -07:00
Hariram Purushothaman
bb4f495a72 msm: camera: Return HAL buffer to fix drain issues
Return the HAL buffer to avoid drain issue
and provide the get buf by index interface so clients
can get buffer based on index.

CRs-Fixed: 1018651
Change-Id: I20329a6834f5f1498388c39b1dd95db2896b3239
Signed-off-by: Hariram Purushothaman <hariramp@codeaurora.org>
2016-07-06 15:43:27 -07:00
Nicholas Troast
d6c6b61a88 qcom-charger: qpnp-smb2: expose AICL settled current through USB psy
There is a requirement to expose the settled input current limit via a
power supply property. Add it.

Change-Id: I1a7b77e3a64da245afd0c4f73c8d04627a061ada
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-07-06 15:43:16 -07:00
Hemant Kumar
acb4a10799 usb: xhci: Add helper APIs to return xhci dma addresses
dma address of secondary event ring, transfer ring and
device context base address are required to pass to
remote entity. Remote entity uses these addresses to
program xhci controller registers.

Change-Id: Ie0756d646a396a11b41b93e886bca9aff636ee5d
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-07-06 15:43:05 -07:00
Hemant Kumar
350d4585e1 usb: xhci: Add support for secondary interrupters
Implement APIs to dynamically allocate and free secondary
event rings based upon interrupter number. Also add exported
APIs in usb core layer which allows secondary event ring
management via remote processor entity.

Change-Id: I5ee7d44d6cad8e35e22d3c1a027a1eec5d208585
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-07-06 15:43:00 -07:00
Hemant Kumar
b27f238201 sound: usb: Add helper APIs to enable audio stream
Adding helper API to find usb substream context information
using card number, pcm device number and direction. This usb
substream is used to enable/disable by issuing SET_ALT
command to device. Also add disconnect call back to perform
any clean up required.

Change-Id: I252f5171bd94b5ab096eb1a2f053f29a8c049c3b
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-07-06 15:42:43 -07:00
Phani Kumar Uppalapati
55cdf93234 ASoC: pcm: Update RX shutdown sequence
Update RX shutdown sequence so that codec
path gets tear down first followed by cpu dai.
This will avoid slim port underflow/overflows
when slim data protocol is changed.

Change-Id: I6e3582fa010d18d4e0ccfde319dfc4d81af1351f
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-07-06 15:42:22 -07:00
Bhalchandra Gajare
9464621a10 ASoC: core: Fix possible NULL pointer de-reference
Fix the soc_find_component function to make sure either the of_node or
the name is provided to compare against the registered components to fix
possible NULL pointer de-reference.

CRs-fixed: 925138
Change-Id: Ic1f02c341c06cadcfe6de638ff6c86e51845e59f
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-07-06 15:41:25 -07:00
Yuanyuan Liu
b72eb30dea icnss: Add support of enable HW debug from module parameter
Add support of enable HW debug feature from ICNSS module parameter.
The setting will be passed to WLAN FW through QMI during subsequent
WLAN enable.

Change-Id: I02036d79fca38ff9ac71c70de8aa144b9cfb2f59
CRs-Fixed: 980027
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-07-06 15:41:14 -07:00
Tatenda Chipeperekwa
f47beac193 msm: mdss: hdmi: fix deep color enable and audio clock
Enable deep color only for msmcobalt platform. Furthermore,
adjust the pixel clock reported to the audio driver when
deep color is enabled so that it matches the clock configured
when the interface is turned on.

CRs-Fixed: 1034047
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Change-Id: I48a767f7673defe60156c305e39f1ce4aa44306b
2016-07-06 15:41:02 -07:00
Maulik Shah
f600d8b9ec msm-core: Move get_user out side critical section
get_user is not needed inside critical section. Move
it outside to avoid kernel crash due to sleeping
function called from invalid context.

Change-Id: I29a54dca6620dc75356067ce6ff9a0931b4d0724
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2016-07-05 15:36:22 -07:00
Aravind Venkateswaran
a6a26ac3c4 msm: mdss: dsi: update ULPS entry/exit sequence
Disable low power receiver and contention detection receiver
(LPRX and CDRX) along with lane LDOs when entering ULPS.
Similarly, enable LPRX, CDRX and the lane LDOs when exiting ULPS.
This fixes some issues where ULPS exit was failing resulting in
the display panel becoming unresponsive.

CRs-Fixed: 1035315
Change-Id: I3ed7eeb463aff6c77962d4f1d46b27e7fb5dd103
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-07-05 15:36:02 -07:00
Shiv Maliyappanahalli
569a62b8dd msmcobalt: fix channel configuration for SLIMBUS
Channel count for SLIM_RX_6 port cannot be set
since get_port_idx() returns invalid port id which
resulting in invalid channel configuration for headset
usecase. Fix by adding SLIM_RX_6 case in get_port_idx().

Change-Id: Iadd3e995d044198c711f744c11b62cec2f7902c0
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2016-07-05 15:35:48 -07:00
Aravind Venkateswaran
94dbc90bb4 msm: mdss: dsi: enable LPRX and CDRX only for logical data lane 0
The low power receiver (LPRX) and contention detection receiver (CDRX)
need to be enabled only for the physical data lane corresponding to the
logical data lane 0. Modify the code to implement this while accounting
for any possible data lane swap configurations.

CRs-Fixed: 1035315
Change-Id: I0082109fc3c0a56af3f181ae0b063c56aa7095f2
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-07-05 15:35:31 -07:00
Arun Kumar Neelakantam
a619160ab2 ARM: dts: msm: Add node for QSEE IPC IRQ bridge for msmcobalt
Add the device for bridging an Inter-Processor Communication(IPC)
interrupt from a remote subsystem directed towards Qualcomm Technologies,
Inc. Secure Execution Environment(QSEE).

CRs-Fixed: 1021749
Change-Id: Ib86b3f70a71f222f0ddc1ea49c75cd7d94c47546
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2016-07-05 15:35:19 -07:00
Ingrid Gallardo
c458c3a519 ARM: dts: msm: add jdi landscape panel for msmcobalt
Add required settings for command mode and video
mode jdi lanscape panels in msmcobalt CDP/MTP. Add
panels to the list of supported panels so they can
be selected at runtime from kernel command line.

Change-Id: Iae1361997653784c4248b0d2ed2a7deac3bc4d4b
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-07-05 15:35:07 -07:00
Ingrid Gallardo
e7276ab8c0 ARM: dts: msm: configure display 5v panel supply GPIO for msmcobalt
Add support to configure the gpio51 that controls
the 5v supply required by multiple panels.

Change-Id: I45e190261330ffe2f742ae0c460fc53270e165c2
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-07-05 15:34:55 -07:00
Siddartha Mohanadoss
6e8583cdf3 thermal: tsens: Enable TSENS controller health monitor
Temperature sensor (TSENS) driver health monitor periodically
sets a very low temperature threshold on the critical trip zone
and polls to check if the trip is set. This is done on a deferred
workqueue and helps provide indication on the health of the
TSENS controller.

Change-Id: I4b16db429fead5c731dec289f0360682c92775b8
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-07-05 15:34:41 -07:00
Siddartha Mohanadoss
3c541a8f37 ARM: dts: msm: Update TSENS sensors for msmhamster
Temperature sensor (TSENS) driver provides clients ability
to read on-die temperature sensors. Update the total
number of sensors supported for msmhamster on TSENS
controller 1 and corresponding sensor controller index.

Change-Id: I8c9ba4ed230c94d124f9c02e9e18a77cdb6befa5
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-07-05 15:34:38 -07:00
Siddartha Mohanadoss
52e8201e7b thermal: tsens: Enable TSENS for msmhamster
Temperature sensor (TSENS) driver provides ability to
thermal clients to read from on-die temperature sensors.
msmhamster supports reading from 20 on-die temperature
sensors and clients can set temperature thresholds and
receive notification.

Change-Id: I57e98f2182d0c44e9c7cffec3528bb926a878fb8
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-07-05 15:34:24 -07:00
Siddartha Mohanadoss
b55de1ea89 ARM: dts: msm: Disable TSENS on RUMI and SIM platform
Temperature sensor (TSENS) driver supports perodic monitoring
of the TSENS controller and can cause a false positive on
RUMI and SIM platform if the temperature values are
not valid. Therefore disable the driver on these platforms.

Change-Id: I9d38f6f1580eafef9de841418b9a9f022ef30b69
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-07-05 15:34:18 -07:00
Banajit Goswami
0d8b39635c ASoC: msm: q6dspv2: add SLIMBUS6 RX routings for Slimbus 7/8
Slimbus TX 7 and 8 would need to be connected to Slimbus RX 6
for different use cases using loopback in AFE. Updated necessary
routings for supporting the loopback.

CRs-Fixed: 1036018
Change-Id: I46c797a6550884bf42a2d7763590047d2e750906
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-07-05 15:34:03 -07:00