Commit graph

585125 commits

Author SHA1 Message Date
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
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
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
Linux Build Service Account
d7cded90e8 Merge "ARM: dts: msm: remove hph_en nodes for sdm660 qrd" 2017-03-07 06:25:12 -08:00
Linux Build Service Account
b8f5c40e55 Merge "ASoC: msm: qdsp6v2: set pointer to NULL after free" 2017-03-07 06:25:11 -08:00
Linux Build Service Account
3238c76389 Merge "ASoC: msm: add support for VI sense recording" 2017-03-07 06:25:08 -08:00
Linux Build Service Account
5313eed1b9 Merge "ARM: dts: msm: Add support for ANC headset detection on MSM8998" 2017-03-07 06:25:07 -08:00
Linux Build Service Account
9695aa22f6 Merge "ASoC: msm: qdsp6v2: add memset of adm open before usage" 2017-03-07 06:25:06 -08:00
Linux Build Service Account
5f1177f04a Merge "ASoC: msm: qdsp6v2: Support to set session start delay" 2017-03-07 06:25:01 -08:00
Linux Build Service Account
353fafc458 Merge "defconfig: msm: Enable KASLR on sdm660 target" 2017-03-07 06:25:00 -08:00
Linux Build Service Account
4f433ac662 Merge "ARM: dts: msm: Update APC0/1 CPR voltage margins for sdm660" 2017-03-07 06:24:59 -08:00
Linux Build Service Account
c1906072dc Merge "ARM: dts: msm: config SD card GPIO on SDM660 QRD" 2017-03-07 06:24:59 -08:00
Linux Build Service Account
5bd32b9102 Merge "power: qcom: smb-lib: enable HVDCP auth IRQ before APSD rerun" 2017-03-07 06:24:54 -08:00
Linux Build Service Account
3e5d23c301 Merge "mmc: sdhci: add err_state to sdhci_dumpregs func" 2017-03-07 06:24:53 -08:00
Manaf Meethalavalappu Pallikunhi
db2c9496c8 drivers: lmh_dcvsh: Use allocated variable for LMH DCVSh sensor name
LMH DCVSh device uses stack memory for sensor name and passes
this stack variable pointer as devname argument while registering
LMH DCVSh interrupt. But interrupt framework saves this pointer and
try to dereference data in a different context. It leads to a
stack-out-of-bounds issue.

To fix this issue, use allocated memory variable to store sensor
name and pass the same while registering interrupt.

==================================================================
BUG: KASAN: stack-out-of-bounds in strcpy+0x24/0x50 at
addr ffffffc0d37e3ac0
Read of size 1 by task kworker/0:1H/593
==================================================================
page dumped because: kasan: bad access detected
kworker/0:1H Tainted: G  W  4.4.21+ #1
------------------------------------------------------------------
Call trace:
[<ffffff900808a78c>] dump_backtrace+0x0/0x2c0
[<ffffff900808aa70>] show_stack+0x24/0x30
[<ffffff90084bd8c4>] dump_stack+0xbc/0xf8
[<ffffff9008263ce8>] kasan_report+0x3b0/0x4f8
[<ffffff900826308c>] __asan_load1+0x24/0x50
[<ffffff90084c8c54>] strcpy+0x24/0x50
[<ffffff90080b2fc8>]
		trace_event_raw_event_irq_handler_entry+0x134/0x180
[<ffffff900813e718>] handle_irq_event_percpu+0x33c/0x3e0
[<ffffff900813e828>] handle_irq_event+0x6c/0xb0
[<ffffff9008143bf4>] handle_fasteoi_irq+0x10c/0x1d4
[<ffffff900813d750>] generic_handle_irq+0x40/0x50
[<ffffff900813dbcc>] __handle_domain_irq+0xb0/0xe4
[<ffffff9008081ab8>] gic_handle_irq+0xd8/0x1a0
Memory state around the buggy address:
ffffffc0d37e3980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
ffffffc0d37e3a00: f1 f1 04 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4 f2 f2
ffffffc0d37e3a80: f2 f2 00 00 00 00 00 00 f4 f4 f2 f2 f2 f2 00 00
                                           ^
ffffffc0d37e3b00: 00 00 00 00 00 00 f2 f2 f2 f2 00 00 00 00 00 00
ffffffc0d37e3b80: 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
==================================================================

CRs-Fixed: 2015855
Change-Id: I22bd8ff4cd6d6a2389be37c35e23fb86221de5c6
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2017-03-07 04:37:23 -08:00
Manu Gautam
3e96eebc6b usb: xhci: Set bulk EP maxpacket to 8 for buggy FS devices
Some FS devices report maxpacket size as 4 for their BULK EPs
which is incorrect as per USB specification. This results in
ep_config command to controller timing out and enumeration fails.
As minimum maxpacket size for FS is 8, override the same for such
devices.

CRs-fixed: 1002876
Change-Id: I70c2210b4eb93f557eef306fcbc11308b7b33e07
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2017-03-07 04:05:13 -08:00
Amit Nischal
3e6f31c583 clk: qcom: Fix null pointer exception
Add null pointer check before dereferencing pointers.

Change-Id: I9d96a3d0e7d00ffc2c2eb83a0d2384a21fe994ae
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
2017-03-07 17:05:51 +05:30
Utkarsh Saxena
03cbd472f6 msm: ipa: Fix updating the repl_trig_thresh for LAN_CONS
Replenish trigger threshold for LAN_CONS is calculated
before updating the rx_pool_sz. This can result into
division by 0 which can make the system unstable.
Make a change to update the rx_pool_sz before updating
the replenish trigger threshold.

Change-Id: I62f6c114ce7aee571833ef05146ab75cab0fb5d2
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
2017-03-07 16:44:12 +05:30
Shantanu Jain
0ead35930f input: touchscreen: remove data pointer from driver structure
Remove data pointer from the driver structure which is obtained
from user-space. Exclude it from driver structure and move it
outside as another global data pointer.
The definition of CMD_HEAD_LENGTH is meant to exclude the
last member (*data) from the copy from userspace. This change
is meant to keep the definition of CMD_HEAD_LENGTH simple,
and handle the data separately.

Change-Id: I62f14c744e5c331718b6d84f67a4e89b511c9f44
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2017-03-07 16:36:42 +05:30
Manaf Meethalavalappu Pallikunhi
ec2354506c ARM: dts: msm: No need to disable CXIP LM feature in KTM for sdm630
This reverts commit f4070db5b9
("ARM: dts: msm: Disable CXIP LM feature for sdm630") since
CXIP LM hardware feature is disabled by default for sdm630.

Change-Id: I3a2e033ce3e7f22f4b87e3e63b1942555ce8d7d4
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2017-03-07 02:56:26 -08:00
Ingrid Gallardo
26c3c0aa7c msm: mdss: update check bw check for ab/ib
Update the bandwidth check for those cases where only
ab changes and ib is greater than ab. The current
logic takes the max of both and since ib is max, the
vote will not kick-in. This change is intended to
solve this problem.

Change-Id: Icbd6d9aa5221784bc1c88ae1965c944503ac78dc
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2017-03-07 16:07:39 +05:30
Taniya Das
161b113017 clk: qcom: Add separate aggre2_noc clock voters for SDM660/630
Separate out the aggre2_noc voters so that individual voters could vote on
these clocks and voter clock would aggregate the clock rates before sending
a request to RPM.

Change-Id: I8ef30af257d2f37ec5af6aa5e3d1b69e5ba8ec8c
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-03-07 15:58:32 +05:30
Tharun Kumar Merugu
1d18a9fdb5 msm: ADSPRPC: Handle SSR, daemon kill for audio PD
Handle SSR, daemon kill and restart scenarios for audio PD

Change-Id: If9c9e98642ad69866b19a7c0ea19160dcb357d34
Acked-by: Chenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2017-03-07 01:48:04 -08:00
Avaneesh Kumar Dwivedi
fb7aadf142 soc: qcom: Free qmi handle in a worker thread
This change on arrival of ssr event schdule a worker thread,
which when run carry out task of qmi handle destruction.
It is a desired change to make ssr notification callback as
light as possible and avoid blocking it for long in corner cases.

Change-Id: I832fabce7569b1b8b966b7c49cda1b00cff2c472
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
2017-03-07 15:13:31 +05:30
Vijayavardhan Vennapusa
59b6f20843 USB: composite: Fix double release of spin_unlock_irqsave
Commit b953b45ed08c ("USB: composite: Release spinlock before
WARN()") introduced a bug where it leads to calling spin_unlock_
irq_save twice in case of delayed_status zero. Hence fix the issue
by returning from composite_setup_continue() right after WARN() in
case of delayed_status zero.

Change-Id: I33c77ec8a2f97fcd94cffb416e57f3c77d6789f2
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-03-07 14:56:20 +05:30
Linux Build Service Account
4ffd6a18c4 Merge "drm/msm/sde: fix color component order for UBWC formats" 2017-03-06 22:43:48 -08:00
Linux Build Service Account
dc255d3cee Merge "ARM: dts: msm: Setting alignment size of adsp cma region to 8MB for SDM660" 2017-03-06 22:43:42 -08:00
Linux Build Service Account
67d173f7e9 Merge "ARM: dts: msm: Add SPDM feature for sdm660" 2017-03-06 22:43:41 -08:00
Linux Build Service Account
05cbf8d351 Merge "ARM: dts: msm: setting alignment size of adsp cma region to 8MB for SDM630" 2017-03-06 22:43:41 -08:00
Linux Build Service Account
00f85231bc Merge "ARM: dts: msm: Allow modem MBA to be loaded in carveout for SDM630" 2017-03-06 22:43:40 -08:00
Linux Build Service Account
2ab20ffb7b Merge "ARM: dts: msm: add MBA carveout for sdm630" 2017-03-06 22:43:39 -08:00
Linux Build Service Account
5f92ec65b9 Merge "lpm-levels: Return from idle enter for negative mode" 2017-03-06 22:43:39 -08:00
Linux Build Service Account
fb2e8b97fa Merge "clk: qcom: Update the source clock for 24MHz MCLK" 2017-03-06 22:43:38 -08:00
Linux Build Service Account
f3ecd02343 Merge "msm: camera: Validate size param before allocating memory" 2017-03-06 22:43:37 -08:00
Linux Build Service Account
f35c117cc0 Merge "msm:cci: Add protection for race condition in cci queue access" 2017-03-06 22:43:36 -08:00