Commit graph

581269 commits

Author SHA1 Message Date
Nicholas Troast
d4b9ff94df power: align qcom drivers with msm-4.9 kernel
The power directory structure has changed in kernel version 4.9. Align
msm-4.4 with this new directory structure.

Change-Id: Iba729f8ef33245ea78cdc05276ba8f5593191509
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-01-17 12:21:07 -08:00
Nicholas Troast
cbd28f4381 qcom-charger: smb-lib: fix return of an uninitialized variable
rc could be returned without being initialized. Initialize it.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Change-Id: I044f74c7853e6853ae41734a95a4d86569c60457
2017-01-17 12:21:06 -08:00
Nicholas Troast
6b20920b2d qcom-charger: qpnp-fg: fix oob array access and uninitialized return
pos is incremented by bytes_read which could exceed the boundary of
kbuf. Fix this by checking the bounds of pos.

resched_ms is used when uninitialized. Initialize it.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Change-Id: I3a01d59bb5ed53666307a5210a684c7d9fd654fc
2017-01-17 12:21:05 -08:00
Nicholas Troast
f0ea5d918d qcom-charger: msm_bcl: fix out of bounds array access
param_type is used for array access before the boundary check. Check the
boundary before using param_type.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Change-Id: I3d1fb4ada3182c533e5b937717962dc513837e78
2017-01-17 12:21:05 -08:00
Hemant Gupta
24a389ae5f HID: uhid: Remove mutex_unlock while waiting
Because of recently introduced kernel change, previous change to
unlock mutex is not required as HID device addition is now done in
worker thread instead of main thread. Previous code flow was blocking
as uhid_hid_set_report was called from main thread which is not the
case now. Previous code flow was
uhid_char_write->uhid_dev_create2->uhid_hid_raw_request->
uhid_hid_set_report->__uhid_report_queue_and_wait->
wait_event_interruptible_timeout which is now changed to
uhid_char_write->uhid_dev_create2.

CRs-Fixed: 1112380
Signed-off-by: Hemant Gupta <hemantg@codeaurora.org>
Change-Id: I11c3e5628484739acc208deff84a82f34b1b7beb
2017-01-17 07:56:23 -08:00
Laxminath Kasam
5faffa091e ASoC: Audio bringup fixes for SDM660
Update fixes for SDM660 external and internal
codec variants from audio.

Change-Id: Id2a05700e96f4670181d510d6bce7bccc2919bfc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-01-17 21:06:56 +05:30
Hamad Kadmany
2c79dad3a7 wil6210: set dma mask to reflect device capability
11ad device supports 48 bit addresses, reflect that
by setting the dma mask accordingly to be able to
map skbs using 48 bits.

HW has limitation that all vrings should share the same
msb bits out of the 48 bits address. To overcome that,
for vrings mapping use 32 bit addresses only.

Change-Id: I7f710129ba61356f7f29ec69c885f60a31246151
CRs-Fixed: 1109659
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
2017-01-17 16:48:25 +02:00
Utkarsh Saxena
1c6f439b4e ARM: dts: msm: Disable IPA in SDA630
IPA needs to be kept disabled in SDA630 APQ platform.

Change-Id: I26831c989edee3f94f6cbafbb9955d669c546442
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
2017-01-17 19:20:12 +05:30
Utkarsh Saxena
c6cc24902b msm: ipa: Enable 2x fast clock
External gcc clock is operating in 2x,
IPA clock to be in sync up with gcc clock,
enable 2x fast clock in IPA.

Change-Id: I47dc00452c7a52c967838ee0c4db6eaf754e5ae6
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
2017-01-17 18:23:07 +05:30
Taniya Das
7a9931fca2 clk: qcom: Add support for GPLL0 active clock for CPU
CPU clocks would require to vote on active only instance of GPLL0, so add
the clock and also update the parent names for the CPU clocks.

Change-Id: Id8c7f76170a1cc94fe045b8ba975aaa42c4b3819
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-01-17 18:16:55 +05:30
Taniya Das
3f5e9fb490 clk: qcom: Add support for multiple PLL software instances
There could be use cases where the PLL could support various software
instances for various peripherals or for cpu. In those cases PLL need to
support aggregation logic for the voting and devoting on the PLL.

Change-Id: Ie5148a75452dccc555989a454996b945956f94e5
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-01-17 18:10:59 +05:30
Sandeep Panda
6401cc2155 ARM: dts: msm: fix vsync gpio pinctrl functionality for sdm660
Fix the DSI TE vsync gpio function name for sdm660 target as
per pinctrl framework.

Change-Id: Ie411514e5ce1f1d98cb205be17f51834917bf4b5
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-01-17 16:43:31 +05:30
Amey Telawane
6dc3fddc7b ARM: dts: msm: add qpdi support for sdm660
Add QPDI support for sdm660. QPDI is used for
PMIC debug interface through SD card slot.

CRs-fixed: 1112330
Change-Id: I265be6186f43c60e552d026fda3b71f491c61d9f
Signed-off-by: Amey Telawane <ameyt@codeaurora.org>
2017-01-17 15:26:30 +05:30
Anirudh Ghayal
62767bec28 ARM: dts: msm: Update resource names for CX / MX regulators on PM660L
The regulator resource names for PM660L S3(CX) and PM660L S5(MX)
needs to be "rwcx" and "rwmx" respectively. Fix it.

Change-Id: I83670ad15bd53647d00d8c3c50b7d45174d7ddd1
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-01-17 14:53:14 +05:30
Jiangen Jiao
923b11d089 ARM: dts: msm: Add QRD SDM630 EVT2 SKU1 dts file
Add device tree support for QRD630 EVT2 SKU1 board.

Change-Id: I8cea2b9b0995905297d69951694178dccfea65f7
Signed-off-by: Jiangen Jiao <jiangenj@codeaurora.org>
2017-01-17 16:13:10 +08:00
Linux Build Service Account
a51b7f6000 Merge "scsi: ufs: fix deadlock between clock scaling and shutdown" 2017-01-16 23:06:13 -08:00
Linux Build Service Account
a532239b3e Merge "arm64: insn: remove BUG_ON from codegen" 2017-01-16 23:06:11 -08:00
Linux Build Service Account
4af58b8ac7 Merge "ARM: dts: msm: add battery data information for SDM660/SDM630 MTP/CDP" 2017-01-16 23:06:11 -08:00
Linux Build Service Account
b27dee6e83 Merge "msm: ADSPRPC: add profiling counters" 2017-01-16 23:06:10 -08:00
Linux Build Service Account
91c4cf4d3c Merge "soc: qcom: service-notifier: fix object corruption" 2017-01-16 23:06:09 -08:00
Linux Build Service Account
b3a739e9c7 Merge "sound: usb: Map interface context information to interface number" 2017-01-16 23:06:08 -08:00
Linux Build Service Account
79383e7ce6 Merge "ARM: dts: msm: Add BCL mitigation configuration for sdm660" 2017-01-16 23:06:06 -08:00
Linux Build Service Account
113ae9eec8 Merge "ARM: dts: msm: Vote for BIMC GFX clock for SDM660 GPU" 2017-01-16 23:06:05 -08:00
Linux Build Service Account
aa69f1412e Merge "ARM: dts: msm: configure default CMA region for sdm660" 2017-01-16 23:06:04 -08:00
Linux Build Service Account
6364866dde Merge "soc: qcom: Return actual return code when piltz_resc_init fails" 2017-01-16 23:06:03 -08:00
Linux Build Service Account
8b00f97fdc Merge "drivers: thermal: lmh_dcvs: Update Low threshold with high threshold" 2017-01-16 23:06:02 -08:00
Linux Build Service Account
139f2435cb Merge "icnss: Increase QMI timeout value" 2017-01-16 23:06:01 -08:00
Linux Build Service Account
c5ddf84f69 Merge "ARM: dts: msm: Enable icnss device node for SDM660" 2017-01-16 23:06:00 -08:00
Linux Build Service Account
10ba72d5b9 Merge "soc: qcom: glink: Change cleanup sequence in remote close" 2017-01-16 23:05:59 -08:00
Linux Build Service Account
45413398c4 Merge "ARM: dts: msm: Add support for msm8998 QRD SKUK EVT3 board" 2017-01-16 23:05:58 -08:00
Linux Build Service Account
0e87a29195 Merge "seemp: use local stack mem when encoding params" 2017-01-16 23:05:57 -08:00
Linux Build Service Account
83874a41c1 Merge "msm: camera: avoid invalid memory access" 2017-01-16 23:05:56 -08:00
Manoj Prabhu B
c015bcde8f diag: Prevent possible NULL pointer dereferencing
This patch removes the NULL check for item after
it is being accessed.

CRs-Fixed: 1108407
Change-Id: Ie57e4e2f0d626f8780c7424d295fa05bf4147ece
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2017-01-17 10:18:43 +05:30
Ashay Jaiswal
001025bd4a ARM: dts: msm: add battery data information for SDM660/SDM630 MTP/CDP
Add battery profile information for MTP platform and configure
CDP as battery less platform.
While at it, update the slave-id for temp-alarm peripheral on
PM660L.

CRs-Fixed: 1111867
Change-Id: Ife776c32c82bb9167a413fda62798000d5174170
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-01-17 10:06:12 +05:30
zhaoyuan
42017fe489 ARM: dts: msm: Add QTC800H device node to SDM660 QRD SKUs
Add QTC800H device node (hbtp_input) for SDM660 QRD. Add AVDD
and VDDIO power rail for power on/off sync. Also add reset pin
configuration.

Change-Id: I0fb11c27ffae7a9eae55f8f9dc76d71929e68afa
Signed-off-by: zhaoyuan <yzhao@codeaurora.org>
2017-01-17 12:24:32 +08:00
Lei Chen
5b99232cd8 ARM: dts: msm: enable display panel for msm8998 HDK
s6e3ha3 wqhd command amoled panel will be used for msm8998 HDK,
so enable it for msm8998 HDK.

Change-Id: I83fcb7b9894e7faf1c719559223df45843ed52d7
Signed-off-by: Lei Chen <chenl@codeaurora.org>
2017-01-17 09:34:38 +08:00
Puja Gupta
d5cba10d72 soc: qcom: pil: Fix kernel pointer leak
Replace WARN with pr_warn so that stack trace is not printed with the
message.

CRs-Fixed: 1111653
Change-Id: Id1c7bbe8a528199261455ba7901e9df81913aef8
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2017-01-16 16:14:21 -08:00
Sathish Ambley
df3c528a59 msm: ADSPRPC: add profiling counters
Added profiling counters for measuring RPC performance and
by default profiling is disabled.

Change-Id: I6a79dde638e751998ac37948f826639a161ff4a2
Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
2017-01-16 16:05:12 -08:00
Kyle Yan
72354e375b soc: qcom: Return actual return code when piltz_resc_init fails
Propagate error code upwards when piltz_resc_init fails. Previous return
prevented probe from retrying when piltz_resc_init returns -EPROBE_DEFER.

Change-Id: I217f13eb4bff321ae1b7583f5d2614b6c9589987
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-01-16 15:10:06 -08:00
Linux Build Service Account
4b3736890b Merge "usb: phy: qusb2: Enable phy auto-resume" 2017-01-16 13:29:53 -08:00
Linux Build Service Account
ed2eb1070d Merge "USB: dwc3-msm: Set speed as high speed if no speed information" 2017-01-16 13:29:52 -08:00
Linux Build Service Account
78f6511c28 Merge "ARM: dts: msm: Add support of IPA for SDM630" 2017-01-16 13:29:51 -08:00
Linux Build Service Account
74aecd0f81 Merge "ARM: dts: msm: Disable IPA in SDA658/660" 2017-01-16 13:29:50 -08:00
Linux Build Service Account
fc8e309f19 Merge "power: reset: fix compilation errors when dload disabled." 2017-01-16 13:29:50 -08:00
Linux Build Service Account
bb64ae8a47 Merge "ARM: dts: msm: Update Camera CSIPHY clock for SDM660" 2017-01-16 13:29:49 -08:00
Patrick Fay
377c09d738 perf: Fix NULL pointer ref in exclude_idle update
Commit 573979dee2 ("perf: Add support for exclude_idle attribute")
registers an idle callback routine armv8pmu_idle_update. Currently
the idle update routine might be called before the pmu has allocated
all the per_cpu structures. This can result in a null pointer
reference. Change arm_pmu_device_probe to allocate the structures
via cpu_pmu_init() before the init_fn() call (which eventually does the
idle_notify_register call). Change a branch to out_free to
out_destroy as out_free doesn't cleanup what was allocated in
cpu_pmu_init(). Also have armv8pmu_idle_update check that the
structure is not null before using it.

Change-Id: Ie1198fc1783804c61467889c68656d6e8c9c9edf
Signed-off-by: Patrick Fay <pfay@codeaurora.org>
2017-01-16 11:52:33 -08:00
Hemant Kumar
c179cf3889 sound: usb: Map interface context information to interface number
Driver is dynamically allocating memory based on bNumInterface from
device configuration descriptor and stores interface context
information using bInterfaceNum. Device can advertise
bInterfaceNum >= bNumInterface which results into out of bound memory
access. Hence create a mapping between interface context index and
interface number. Use this mapping to find unused context index or
load the context information of an interface.

Change-Id: Ic99b10abe662088c2c030526135689f7c78c595a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-01-16 11:30:09 -08:00
Satya Durga Srinivasu Prabhala
06a774048f soc: qcom: service-notifier: fix object corruption
Below object corruption observed from service-notifier while executing
WLAN PDR tests. While executing WLAN PDR tests, Modem crashed, which
resulted into use after free condition. Add mutex lock to fix the issue.

   ===============================================
   BUG kmalloc-1024 (Tainted: G        W  O   ): \
                              Poison overwritten
   -----------------------------------------------

   INFO: 0xffffffc0ba5c4d30-0xffffffc0ba5c4d3a. \
                   First byte 0xff instead of 0x6b
   INFO: Allocated in qmi_handle_create+0x4c/0x320 \
                      age=80203 cpu=0 pid=27134
        alloc_debug_processing+0x124/0x178
        ___slab_alloc.constprop.62+0x4ec/0x5d0
        __slab_alloc.isra.59.constprop.61+0x48/0x74
        kmem_cache_alloc_trace+0xd4/0x25c
        qmi_handle_create+0x4c/0x320
        root_service_service_arrive+0x3c/0x1e8
        process_one_work+0x234/0x40c
        worker_thread+0x2e0/0x410
        kthread+0xf4/0xfc
        ret_from_fork+0x10/0x40
   INFO: Freed in qmi_handle_destroy+0x154/0x16c \
                              age=50 cpu=1 pid=22765
        free_debug_processing+0x27c/0x354
        __slab_free+0x74/0x3ac
        kfree+0x21c/0x290
        qmi_handle_destroy+0x154/0x16c
        root_service_service_exit+0xf0/0x110
        ssr_event_notify+0x74/0x84
        notifier_call_chain+0x58/0x8c
        __srcu_notifier_call_chain+0x9c/0xc0
        srcu_notifier_call_chain+0x38/0x44
        subsys_notif_queue_notification+0x40/0x54
        notify_each_subsys_device.isra.9+0x18c/0x1b0
        subsystem_restart_wq_func+0x2f4/0x5a8
        process_one_work+0x234/0x40c
        worker_thread+0x2e0/0x410
        kthread+0xf4/0xfc
        ret_from_fork+0x10/0x40

Change-Id: Iebc0871220547c2d6f026db1dffafe30b854b199
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2017-01-16 10:37:08 -08:00
Ram Chandrasekar
823b91650d drivers: thermal: lmh_dcvs: Update Low threshold with high threshold
LMH DCVS driver doesn't change the low threshold from HLOS. When there is
new request to lower the high threshold, the low threshold will be
modified if the new high threshold is lower than the existing low
threshold. But the low threshold is not increased when the high
threshold is moved back again.

Update the LMH DCVSh driver to always update the low threshold value
when there is a new high threshold request. The new low threshold will
be 0.5C less than the high threshold.

Change-Id: I356e47de585ae81bd27859f790f673b31ae5ba72
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2017-01-16 10:33:00 -07:00
Manaf Meethalavalappu Pallikunhi
31f4d79f79 ARM: dts: msm: Add BCL mitigation configuration for sdm660
Add battery voltage, current and low SoC thresholds for sdm660.
The BCL module will mitigate the CPU's, when battery reaches
the low voltage threshold, high current threshold or low
state of Charge.

Change-Id: Ie6cf0498bd7ad869640efc602d2573b6def7d5b7
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2017-01-16 22:36:39 +05:30