Commit graph

585293 commits

Author SHA1 Message Date
Subbaraman Narayanamurthy
7454353292 misc: qpnp-misc: change from spmi to platform driver
qpnp-misc driver supports some miscellaneous stuff which is
needed on certain PMICs. Change it to a platform driver similar
to other PMIC peripheral drivers.

Change-Id: I3f60bbe88616db82b568cc528f076368afd105ca
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-03-08 14:05:21 -08:00
Hemant Kumar
e45656bfce usb: gadget: f_gsi: Fix NULL ptr dereference
When usb composition switch happens upon cable disconnect and
function bind fails, function's config pointer is set to NULL.
This is resulting in to NULL ptr dereference when config is
accessed from APIs which are called asynchronously and out
side of the usb core driver(i.e. dwc3) context. Fix the
issue by directly accessing gadget pointer from gsi driver
context in those APIs.

Change-Id: I1006881ae1838e8ddc8fa5e9ef501f4c658b54e7
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-03-08 13:35:09 -08:00
Puja Gupta
fcb2e0761d ARM: dts: msm: Allow modem MBA to be loaded in carveout for MSM8998
Add sub-device node to allow mba to be able to load in carveout memory
region for MSM8998.

CRs-Fixed: 2006100
Change-Id: Iff3a83afad159f475d23a579c72d0c7c41c622c8
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2017-03-08 13:19:54 -08:00
Chandan Uddaraju
0c193ad038 mdss: display-port: fix DP issue when framework reboots
When framework reboot happens, HPD node is toggled
by the display framework. Make sure to send cable
disconnect event to framework when HPD is set to
'low' state.

CRs-Fixed: 1116934
Change-Id: If59ec7c81264ff76b661cdfd8e6b70356a6e1544
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2017-03-08 12:48:08 -08:00
Chandan Uddaraju
4e8e859bf0 mdss: display-port: add support for suspend and resume events
Add support for suspend and resume events that are
triggered by the run time system. In particular, transition
the clock (link and core) and regulators state depending
on whether the suspend or resume is being processed.

CRs-Fixed: 1103664
Change-Id: I4e3de9b32963c71dfded0f695dc7734b8121e19a
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2017-03-08 12:47:45 -08:00
Ajay Singh Parmar
5dd2911526 msm: mdss: dp: fix link training routine for VGA monitors
Fix the link training routine by removing the updates to
the state control register and the corresponding memory
barrier to complete the register write. This changes fixes
the link training failures seen with VGA monitors over the
Type-C/VGA dongle interface.

CRs-Fixed: 2008753
Change-Id: I501833e02d24d6aa12351eb0bd067a08ad597ed0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2017-03-08 12:47:06 -08:00
Tatenda Chipeperekwa
49237b208d msm: mdss: dp: disable audio engine on teardown_done
Disable the DP audio engine on receiving the teardown_done
callback from the audio codec. This ensures that the DP
engine is in the disabled (MUTE) state in preparation for
the next audio session.

CRs-Fixed: 2006127
Change-Id: I7c984531d308501690ede36ea959391ebef7599f
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-03-08 12:47:01 -08:00
Tatenda Chipeperekwa
75b4841b5e msm: hdmi: edid: update incorrect interlaced field
Update the interlaced field for the 1920x1080i60
resolution to show that the mode is in fact interlaced.
This will provide external display clients with the
correct information regarding this resolution.

CRs-Fixed: 2006873
Change-Id: I30f5da1e49e35a81f65508f2766118a58d12ceb4
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-03-08 12:46:51 -08:00
Tatenda Chipeperekwa
950f7db384 msm: mdss: dp: separate audio and video notifications
Separate the audio and video notifications while processing
the display hotplug events to ensure that the audio subsystem
is notified only when the display is in the correct state. In
particular, the audio subsystem should only be notified once the
mainlink is ready and the DP controller is in SEND_VIDEO state.
This will ensure that the DP audio engine is able to acknowledge
the audio unmute request, which will result in the AFE port being
configured correctly.

CRs-Fixed: 2007534
Change-Id: I702c1de6d4eb10e001d97e1d7e7c545ff481a401
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-03-08 12:46:45 -08:00
Tatenda Chipeperekwa
2367aa4dc1 msm: mdss: dp: set failsafe link parameters on EDID failure
Set the link parameters that correspond to the failsafe resolution
if there is a failure in reading or parsing the EDID data. This
will allow the display to be configured with the failsafe
resolution and prevent the driver from going into a bad state.

CRs-Fixed: 2002794
Change-Id: I5882e66eee6073da6484903956abdcb3db05a5ea
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-03-08 12:46:27 -08:00
Ajay Singh Parmar
cc54970685 msm: ext_disp: do not check flags for connection request
Do not check flags for connection requests as it may result
in not processing any subsequent requests that have new
flags added incrementally from the previous connection.

CRs-Fixed: 2007353
Change-Id: Ie867d13d25267962315444797cf21bf57850f088
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2017-03-08 12:24:43 -08:00
Sathish Ambley
df22d81402 msm: ADSPRPC: Null check for file session context during release
While releasing the device, check if the file session context is NULL
to make sure we are not dereferencing it during file free.

Change-Id: I310271189cf710b81c5182b936189fd57ddedd7b
Acked-by: Vishnu Karthik <vikarthi@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
2017-03-08 10:55:48 -08:00
Jack Pham
261c9dda82 usb: gadget: f_fs: Fix out-of-bounds string access
At the end of ffs_epfiles_create() a message is logged with
the name of the epfile, however this epfile pointer is only
valid in the body of the preceding for-loop. After the loop
exits, it is now pointing one past the allocated array and
results in an out-of-bounds memory access when formatting
the string.

Since there could be multiple ep's created, the name may not
be important to log. Replace it with the count instead. Also
while ffs_epfiles_destroy() doesn't have the same problem,
do the same there anyway for symmetry.

Change-Id: I10551f9c1e056f215ec59335cbf1cde2bad6cc04
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-03-08 09:52:54 -08:00
Linux Build Service Account
c78ba94d64 Merge "diag: Add NULL pointer checks in mask updates" 2017-03-08 06:51:07 -08:00
Linux Build Service Account
405c831196 Merge "soc: qcom: Free qmi handle in a worker thread" 2017-03-08 06:51:06 -08:00
Linux Build Service Account
70e1d5859a Merge "supply: qcom: add battery.o earlier" 2017-03-08 06:51:05 -08:00
Linux Build Service Account
bfc0e4b108 Merge "ARM: dts: msm: Enable Short-Circuit (SC) interrupt for LCDB on PM660L" 2017-03-08 06:51:04 -08:00
Linux Build Service Account
3a5e2a2080 Merge "msm: ADSPRPC: Handle SSR, daemon kill for audio PD" 2017-03-08 06:51:03 -08:00
Hamad Kadmany
2ff7365847 wil6210: use napi_complete_done
To enable gro_flush_timeout, a driver has to use
napi_complete_done() instead of napi_complete().

Change-Id: I2ea853bb57e15021c001d16d7d1fe7e7ae0c58e7
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
2017-03-08 15:53:48 +02:00
Neeraj Upadhyay
a1d6abf78d ARM: dts: msm: Add kaslr offset IMEM entry for sdm630
Enable the msm-imem-kaslr_offset node for sdm630
which preserve the randomized kernel offset.

Change-Id: Icb4b6a94a702f07b99513ebd16ebc949b49d919c
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-03-08 16:23:34 +05:30
Ankit Sharma
1450b9c7da msm: qpnp-haptic: Disable auto resonance on LRA frequency deviation
Disable Auto-resonance if calibrated LRA frequency deviates more
than +/- 25% of initial LRA frequency and change error polling
frequency to 20ms.

While at it, fix the calculation of deviation error percent for
LRA rate code.

CRs-Fixed: 1099718
Change-Id: I329415992d3932e389e95995c1503c15ba282b19
Signed-off-by: Ankit Sharma <ansharma@codeaurora.org>
2017-03-08 13:30:31 +05:30
Siba Prasad
192cfe16ca mmc: bus: Handle error in case bus_ops suspend fails
bus_ops->suspend may fail due to some reason
(for e.g. due to flush timeout). In such cases,
if we return error to PM framework from here without
calling pm_generic_resume then mmc request may get stuck
since PM framework will assume that mmc bus not suspended
(because of error) and it won't call resume again.

Thus fix this by calling pm_generic_resume in case of error
from bus_ops->suspend in mmc_bus_suspend.

Change-Id: Iaef485d0b47b005aa88e61cd77a2b7b65931def1
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Signed-off-by: Siba Prasad <sibap@codeaurora.org>
2017-03-08 11:55:31 +05:30
Ritesh Harjani
7246b95041 mmc: mmc: Handle error case in mmc_suspend
Currently in case if suspend is failed due to some
reason then the error case is not handled properly :-
1. w.r.t. suspend_clk_scaling claim_host counters are going bad.
2. In case of any error after halting and disabling cmdq -
the error is returned to the PM framework and it assumes that
card is not suspended, whereas CQ remains disabled. This causes
I/O requests hangs since no request can be processed any further.

Fix this by handling error cases properly.

Change-Id: I8691eebcb0e2d089720505475aa0297efce5cca5
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Signed-off-by: Siba Prasad <sibap@codeaurora.org>
2017-03-08 11:41:48 +05:30
Bingzhe Cai
ec53c2750d ARM: dts: msm: enable SSC based sensors for QRD SDM630
Add device node for SSC sensor device for QRD SDM630.
It allows userspace client to read sensor related
information.

Change-Id: I9913274b778cdc4b148cfff2388da0642094b2b0
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2017-03-08 13:26:16 +08:00
Ray Zhang
b401bcb128 ARM: dts: msm: enable display for SDM660 PM660A QRD
rm67195 fhd command panel will be used for SDM660
PM660A QRD, so enable display panel for that.

Change-Id: I10ba8a01eef0fa61d7ee9c583225ea73deda8a2b
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
2017-03-07 21:22:59 -08:00
Rupesh Tatiya
04123e01e2 ARM: dts: msm: set pm660 L6/L9/L19 to not follow HW_EN1 for wcn3990
There is leakage of ~300-400uA current in Bluetooth page scan scenarios
when L6/L9/L19 follow HW_EN1.

CRs-Fixed: 2011978
Change-Id: I1940c6c4638ae588b1b8126967d252d7cad06a51
Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
2017-03-08 09:14:50 +05:30
Walter Yang
66afe3e45e ARM: dts: msm: Modify pm660 gpio3 to 10uA pulldown
As per pm660 gpio spec, the default state of gpio3
should be 10uA pulldown.
Modify the device node accordingly.

CRs-Fixed: 2015641
Change-Id: I6a5596453c75fbc86dac3830da52c2876b7e7d42
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2017-03-07 18:09:48 -08:00
Veerabhadrarao Badiganti
a7291efc55 mmc: host: sdhci: Add new host_op for clearing ice configuration
Add new host op for clearing ice configuration.
This config_end host op need to invoked for clearing ice configuration,
once mmc request processing is completed.

Change-Id: Ifc5569ae88748599b75ef5b3e625249ecd667762
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-03-08 07:33:59 +05:30
Anirudh Ghayal
38bb2f628d ARM: dts: msm: Enable Short-Circuit (SC) interrupt for LCDB on PM660L
The SC interrupt handles the SC events and disables the module
if it persists.

CRs-Fixed: 1083319
Change-Id: I18e37440159089103c5ba89a9a2d793d9aafe433
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-03-08 06:54:03 +05:30
Anirudh Ghayal
85d260aee8 regulator: qpnp-lcdb: Handle short-circuit (SC) event
Handle the SC event in normal and TTW mode. Check if the
SC event is valid and re-enable the module to check
if it goes away. Disable the module altogether if the
SC event persists.

CRs-Fixed: 1083319
Change-Id: I20bd3ca0bd3cf273a2607656e3f51bde1eaf2dc6
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-03-08 06:53:56 +05:30
Linux Build Service Account
74efdfc1b9 Merge "ASoC: msm: qdsp6v2: Support app type for NOIRQ" 2017-03-07 16:55:52 -08:00
Linux Build Service Account
f2c96c8928 Merge "drivers: soc: add size check" 2017-03-07 16:55:51 -08:00
Linux Build Service Account
ac95e8f4e5 Merge "usb: xhci: Set bulk EP maxpacket to 8 for buggy FS devices" 2017-03-07 16:55:50 -08:00
Linux Build Service Account
e994a9c99d Merge "ARM: dts: msm: Add kaslr offset IMEM entry for sdm660" 2017-03-07 16:55:49 -08:00
Linux Build Service Account
4b7a5c696f Merge "icnss: set vdd-0.8-cx-mx regulator optional for icnss driver" 2017-03-07 16:55:48 -08:00
Linux Build Service Account
0d8cb86769 Merge "ARM: dts: msm: update cti gpio configuration on sdm660" 2017-03-07 16:55:47 -08:00
Linux Build Service Account
83c0e1120d Merge "wil6210: include moduleparam.h" 2017-03-07 16:55:46 -08:00
Zhen Kong
c83a067a9a qseecom: return app_id correctly when looking up and loading app
When __qseecom_check_app_exsits() and __qseecom_load_fw() get app_id
from TZ, they save it to function's return value then return back.
But "app_id" is of type uint32, "ret" is int32, this will return
incorrect app_id to the caller if app_id is larger than 0x7FFFFFFF.
Thus make change to return app_id correctly.

Change-Id: I2ef98d64490c480d5416ee24ec6ca9aca9c8ca8a
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-03-07 15:29:38 -08:00
Prashanth Bhatta
dbcf3eb96d icnss: Remove WARN_ON
For QMI timeout issues ICNSS_ASSERT macro invokes WARN_ON but
there can be cases of multiple QMI timeouts and those may cause
to spit out lot of WARN_ON message to kernel log. Because of
this, kernel log buffer may overlap and miss logs which may be of
use for debugging the QMI timeout issue. Remove WARN_ON by making
ICNSS_ASSERT as a dummy macro.

Change-Id: I0d5d76a2385f40f64ec5d811f7bcde82f1c44877
CRs-fixed: 2016253
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2017-03-07 14:51:51 -08:00
Liam Mark
1a52a7f7d0 ARM: dts: msm: add MBA carveout for msm8998
Add MBA carveout to make HLOS carveouts in sync
with version 7.1 of the memory map.

Change-Id: I34d531dc7e01e66305d155d44fb0850a699f6d5b
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2017-03-07 14:48:00 -08:00
Jordan Crouse
bf04d45e73 drm/msm: Remove DRM_MSM_NUM_IOCTLS
The ioctl array is sparsely populated but the compiler will make sure
that it is sufficiently sized for all the values that we have so we
can safely use ARRAY_SIZE() instead of having a constantly changing
#define in the uapi header.

Change-Id: Ic0dedbad39f30abb8ce340289089d2f3a5f6fe36
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-03-07 14:27:47 -07:00
Jordan Crouse
a8cbfeb8b0 drm/msm: Move QTI specific ioctls to avoid conflict
To avoid conflicting with upstream changes when upgrading the kernel
version, move QTI specific ioctls to start at command number 0x40.
This provides plenty of space for the upstream ioctl list to grown
before there are conflicts.

Change-Id: Ic0dedbadad9d3a24467f3d5992104754e31cd769
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-03-07 14:27:47 -07:00
Alexy Joseph
53804ded4f ASoC: msm: qdsp6v2: Support app type for NOIRQ
App type is required to send the calibration
for the modules in a topology that would
be selected for ULLPP. For this, expose
a mixer control. App type will be sent
if the ULLPP is used for NOIRQ.

CRs-Fixed: 2009687
Change-Id: I7c8349d5827dffe32c0db35262d54cb7c1dba1a9
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
2017-03-07 12:28:47 -08:00
Abhijeet Dharmapurikar
6abd30face supply: qcom: add battery.o earlier
The initialization code in battery.c creates important votables like
FCC, FV which every many other charging drivers are dependent on.
The dependent charging drivers keep probe deferring until the votables
are created.

Ensure that battery.c's initialization code is invoked before other
drivers get added.

Change-Id: I52990baef7f7c4095e635728511e120c1dbe5e9d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-03-07 11:38:26 -08:00
Sathish Ambley
748b6dc2a1 msm: ADSPRPC: Create debugfs file with process name
During device open create a debugfs file with name as the current
process name.

Change-Id: I7cb1c4a950b2498932f930eb79cb936952c0781d
Acked-by: Vishnu Karthik <vikarthi@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
2017-03-07 11:21:09 -08:00
Prasad Sodagudi
6b68820719 arm64: Remove orig_addr_limit check in do_page_fault
Remove the orig_addr_limit check against KERNEL_DS in
do_page_fault handler for permissions faults. This
check is part of UAO and PAN features and these features
are disabled by default.

Change-Id: I5de760b983edcf14d1c0bee2a53dc091ceca31da
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2017-03-07 11:08:25 -08:00
Ashay Jaiswal
90986348e0 qcom: smb-lib: force 9V for QC2.0 adapter
In case of USBIN-USBIN based parallel charging configuration
hardware based INOV is disabled and adapter output voltage of
QC3.0 adapter is controlled by userspace daemon. But in case
of QC 2.0 based adapter there is no such daemon to control
adapter output voltage, thus force 9V adapter output when a
QC 2.0 adapter is detected.

While at it, cancel icl_change_work before scheduling it in
order to make sure work is scheduled for next interval.

CRs-Fixed: 2015927
Change-Id: I198f8299b5cd0a62c518815c33088bb5e38c8505
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-03-07 23:38:36 +05:30
Ashay Jaiswal
d8ffd48003 power: qcom-charger: add OTG workaround for PM660
PM660 support configurable delay for softstart done with
minimum value of 3msec and thus OTG can be configured to
a minimum value till softstart completes. Add a PM660
specific workaround to set OTG current limit to 250mA before
enabling OTG mode and reconfigure the current back to desired
value once OTG softstart completes.

CRs-Fixed: 2016131
Change-Id: Iabb9e1c55cc59453825795e045d7fcc6caf8f33e
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-03-07 23:38:24 +05:30
Linux Build Service Account
35731dbb93 Merge "ASoC: Add backend user count checking" 2017-03-07 06:25:14 -08:00
Linux Build Service Account
c5b24f3221 Merge "ASoC: wcd934x: mark AIF4 MAD TX as ignore suspend" 2017-03-07 06:25:13 -08:00