Commit graph

575689 commits

Author SHA1 Message Date
Nicholas Troast
4dcc8dbd38 smb-lib: notify userspace upon usb plugin interrupt
Currently userspace will be notified whenever the Type-C changed
interrupt fires. The charging status reflects whether or not the charger
has a valid input power source. The valid input power source status
follows vbus and not the Type-C changed logic, so in some cases the
charging status may not yet be updated when the userpace is notified
that the USB power supply has changed.

Send a USB power supply changed event when both the Type-C changed
interrupt fires, and the USB plugin interrupt fires.

Change-Id: I50cdd8c706b10f08dc7f322ea02358f3dbce521e
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-09-30 12:27:31 -07:00
Subbaraman Narayanamurthy
4f7f110863 of_batterydata: add snapshot of DT bindings documentation for batterydata
This DT bindings documentation snapshot is taken as of msm-3.18
'commit b428af643156 ("power: qpnp-fg: configure thermal coefficients based on battery type")'

While at it, change the name used in the documentation from
Qualcomm to Qualcomm Technologies, Inc.

CRs-Fixed: 1068593
Change-Id: Ib359e41b7381149a270a5772540bbc80f920919f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-09-30 12:25:52 -07:00
Deepak Katragadda
1d6bb9392a ARM: dts: msm: Remove clocks listed under GPU, PCIE, USB & MDSS GDSC nodes
The core and peripheral memory retention bits no longer need to
be set and cleared by the GDSC driver on MSMCOBALT. Instead, the
individual client drivers will use the clk_set_flags API as needed
to toggle these bits.

CRs-Fixed: 1069091
Change-Id: I898f627ce90251166a5f4314daca61e5ba958e6b
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-09-30 11:51:43 -07:00
Kuirong Wang
cbd3e0cb06 ASoC: msm: Update the error handling when APR sends packet failed
Update the error handling when APR sends packet failed so that audio
driver can perform proper error recovery.

CRs-Fixed: 1050605
Change-Id: I6210e244e6299ec747836f40d03e92c15c6e53ee
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2016-09-30 10:56:00 -07:00
Hareesh Gundu
ed1836956c msm: kgsl: Change GPU clock gating sequence for A4XX and A5XX
Disable SP clock before programming the clock gating control
registers and enable back SP clock.

CRs-Fixed: 1061048
Change-Id: Ic19a8a67fe0e192c9c7c3f855c7eb33901ca2adc
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2016-09-30 10:52:19 -07:00
Siddartha Mohanadoss
69bf754535 iio: rradc: Remove scaled support for battery thermistor
The battery thermistor values are not scaled to the
appropriate units from the ADC code on the round robin
ADC (RRADC) channel data registers. Remove support to
read the scaled results for this channel and expose
only reading the raw ADC code.

Change-Id: I6ff45d25f18063cbed70181b22ab0b07b4da4dc1
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-09-30 10:46:43 -07:00
Subbaraman Narayanamurthy
ff753ada17 power: qpnp-fg-gen3: fix SRAM encodings
There are some encoding changes to the following configurations
in pmi8998 SRAM. Update them.

For both v1.1 and v2.0,
- No sign bit for charge termination current

For v2.0,
- 6 bit encoding for empty voltage and vbatt_low

While at it, fix the SRAM byte location from byte 2 to byte 3 for
configuring empty voltage threshold in pmi8998v2.0.

CRs-Fixed: 1068592
Change-Id: I3a301aed1b23ab78aa86b24c11eb750502adab2f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-09-30 10:41:55 -07:00
Liam Mark
c156aa8e2a msm: secure_buffer: Add VMID_CP_CAMERA_PREVIEW
Add support for VMID_CP_CAMERA_PREVIEW

Change-Id: Ifacc1ff95262c6240283d19cf02dcac37933c141
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2016-09-30 10:25:26 -07:00
Lior David
14a5790885 wil6210: extract firmware version from file header
Currently the FW version is taken from the sw_version field
of the FW ready event. This version is based on internal
version control revision and it is difficult to map to actual
FW version.
Fix this by using the actual FW version stored in the FW file
header record.

Change-Id: I37ac0cf1845c96e6d9e0f8fffd6481e8c32efa50
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 13cd9f758a555d1ab547b0dbed3f9d1e529230c3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1063261
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-09-30 08:07:57 -07:00
Xiaojun Sang
0e29472b1c ASoC: soc: change audio drivers to use %pK
Change all audio driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.

CRs-Fixed: 1052832
Change-Id: I9ff5cf06b019c566973eb609bf5d37969b98d31d
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2016-09-30 15:41:24 +05:30
Hareesh Gundu
df7dd145f0 msm: kgsl: Fix dispatch_q NULL dereference
Add a NULL check for dispatch_q which will avoid
NULL pointer dereference in dispatcher_do_fault().

Change-Id: I429aa91f9c5fa92ce2e8b23cc4911454744f75c9
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2016-09-30 02:51:28 -07:00
Pavankumar Kondeti
e91d6ecf73 arm: topology: Allow specifying the CPU efficiency from device tree
The efficiency of a CPU can vary across SoCs depending on the cache size,
bus interconnect frequencies etc. Allow specifying this from the device
tree. This value overrides the default values hardcoded in the efficiency
table.

Change-Id: If2885675ce3d7b43c3b2568fe1e29a76f48a5c3d
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-09-30 12:29:19 +05:30
Srivatsa Vaddagiri
4ac03df1e1 arm: topology: Define arch_get_cpu_efficiency() API for scheduler
On a HMP system, scheduler needs to know efficiency factor
(instructions-per-cycle) for various cpus. This is so that scheduler
can estimate bandwidth consumption of tasks on each cpu, based on
their efficiency factor.

This patch defines arch_get_cpu_efficiency() API in ARM32 architecture.
It depends on hard-coded "efficiency" factor for various cpu types
(available in 'table_efficiency' data structure) and device-tree
providing information on cpu-type for every cpu.

Change-Id: I561bace8a813a35a9fc624fca4861c5b1109b69b
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-09-30 12:29:08 +05:30
Xiaojun Sang
20a18f9828 ASoC: soc: change audio cpe drivers to use %pK
Change cpe driver to use %pK instead of %p.
%pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.

CRs-Fixed: 1052832
Change-Id: I741d9e5c5b415011348e862c3f1ee4fe28c3969f
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2016-09-29 23:02:33 -07:00
Walter Yang
3653c5fdb5 ASoC: wcd934x: send TX/RX PGD register CFG to AFE
AFE requires TX/RX PGD register CFG info based on different wcd
codecs. Send this info when AFE configs are set at initialization.

Change-Id: I0da3d41fe8c1d03baacf2f2a9d2e141c9721981b
CRs-Fixed: 877188
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2016-09-29 22:16:30 -07:00
Nicholas Troast
3603cc87ba qpnp-smb2: add missing battery psy properties for healthd
healthd expects battery voltage, current, temperature, and technology from
the battery power supply. Add them.

Change-Id: I85f589030903ead938af2712875eb5daa81710d9
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-09-29 21:08:05 -07:00
Nicholas Troast
a3946ad93e qpnp-fg-gen3: add algorithm flags debugfs file
The fuel gauge has several algorithm flags which are useful for
debugging. Add a debugfs file called alg_flags to expose them.

Change-Id: Ibeeea88e2e0745e98e8bfdfa3e086263d82e7bac
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-09-29 21:08:05 -07:00
Vidyakumar Athota
3c4d75c367 ASoC: wcd934x: add decimator 5 and 6 volume controls
Decimator 5 and 6 volume controls are missing in wcd934x
codec. Add missing decimator volume controls.

Change-Id: I86f4f7bd2e337f7cc404ba7fb7905d18f67e604c
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-09-29 19:26:12 -07:00
Prashanth Bhatta
71adcb3196 icnss: Ignore PD down if WLAN FW doesn't exists
During Modem SSR, PD down notification gets notified by
service-notifier. There are cases where in WLAN firmware may not
be available on Modem side. Handle PD down notification
gracefully in case WLAN firmware doesn't exists.

CRs-fixed: 1072772
Change-Id: Ibfe29a3950fabfcf8baa5d08b15e0f056dcc1f2a
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2016-09-29 18:45:12 -07:00
Prashanth Bhatta
4448b9111f icnss: Handle graceful Modem shutdown
With the current implementation, all the PD down notifications
are treated as crash but PD down notification can happen because
of graceful Modem shutdown also. Handle the case such that if the
PD down notification happens which is not a crash then bring down
WLAN driver and firmware gracefully.

CRs-fixed: 1065232
Change-Id: I63f3e0747ffc1e703a068c6ac649e6242f285b9b
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2016-09-29 18:43:41 -07:00
Venkat Gopalakrishnan
ca91fa16a7 scsi: ufs: gate ref_clk during aggressive clk gating
Gate ref clock along with other ufs clocks during aggressive
clock gating. The latencies involved in voting/devoting ref clk
is acceptable. This will allow faster XO shutdown instead of
gating off the clock during 3s idle runtime suspend.

Change-Id: I6e160f62f3600adf28997d5bb2868d1924208d42
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-09-29 18:21:13 -07:00
Yeleswarapu Nagaradhesh
406b8c31f1 ASoC: wcd934x: Add support for HPH surge recovery
Add support for headphone surge recovery (up to -80v)
on wcd934x audio codec.

Change-Id: Ibcf4a0be857db7054e9a95ad8f78483f4cbc6dd4
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-09-29 18:07:32 -07:00
Phani Kumar Uppalapati
46451883c7 ASoC: wcd934x: Add pre/post HPHL/R PA off notifications
Send headphone left/right PA off notifications in pre/post
events for client drivers like MBHC, to update their status
correctly.

Change-Id: I2a27e9f59bd5d1ce99245df51cde9e6eb4133387
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-09-29 18:05:49 -07:00
Manu Gautam
d69c50aa2a usb: xhci: clean up command queue on HC halt failure as well
'Commit c9cabb7ee02bcb0c ("usb: xhci: clean up command queue when
halting"); fixes deadlock condition when some commands are pending
at the time of usb_remove_hcd() or when controller is halted.
That change cleans up command queue if halting of controller is
successful. But, this deadlock may still be seen in case if due
to some reason halting of controller fails. To handle that scenario
as well cleanup command queue irrespective of controller halt
succeeds or fails.

Change-Id: I2c88fca3614af7fe58bc858898449d47546da247
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2016-09-29 17:20:19 -07:00
Phani Kumar Uppalapati
709398bcf7 ASoC: wcd934x: Use correct API for force enable micbias
Use correct soc-dapm API - soc_dapm_force_enable_pin()-
for force enable standalone micbias. This function executes
in dapm_mutex locked context.

Change-Id: Iff6f3ff779f69e0b3e42dba035330c2efe7352ce
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-09-29 16:44:10 -07:00
Phani Kumar Uppalapati
64f1a464c4 soc-dapm: Fix double mutex lock
dapm_mutex lock is acquired from soc_dapm_force_enable_pin_unlocked
function which will cause double lock because the same mutex is
acquired in soc_dapm_force_enable_pin(). Fix this issue by removing
dapm_mutex acquire from soc_dapm_force_enable_pin_unlocked function.

Change-Id: I21374ba6c92d6fbc088af7660f5ada32be725991
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-09-29 16:40:05 -07:00
Chinmay Sawarkar
94db527dbe ARM: dts: msm: Update VMEM bw for msmcobalt
For each voltage corner, vote for VMEM bw such that,
the bw is maximised within that voltage corner.

CRs-Fixed: 1063680
Change-Id: I34193b9971321543bd16262d7b2e817fe26bdd6d
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2016-09-29 15:17:16 -07:00
Liam Mark
18786d91c4 iommu: msm: add EXPORT_SYMBOL for msm_dma_unmap_all_for_dev
Add EXPORT_SYMBOL for msm_dma_unmap_all_for_dev function.

Change-Id: If7d8615d50b7104e85482f0efab155a7b4a41321
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2016-09-29 14:38:54 -07:00
Yuanyuan Liu
e11d240bc7 icnss: Add support for disabling vbatt notification
ICNSS monitors runtime phone power. When phone power
crosses either high or low threshold, ICNSS sends
vbatt notification to WLAN FW. FW then should vote for
different regulator power mode based on the notification.
Add support for disabling this feature and disable it
for now until WLAN FW support voting for different
regulator power mode.

CRs-Fixed: 1070294
Change-Id: I63241a198040122fcc4f26b728795e39822dbdc8
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-09-29 13:51:08 -07:00
Harshdeep Dhatt
3f25aa2b78 msm: kgsl: Do not free gpuaddr range if unmap fails
Currently, we free up the gpuaddr range whether unmap
succeeds or fails. If it fails and we free up the gpuaddr
range, there is a possibility that a later allocation will
overlap with this range. Mapping this new range leads to a
BUG_ON() in the iommu driver which thinks that we are
overwriting an existing mapping. To avoid this, we never
free the failing gpuaddr range, effectively removing it
from being re-used for any future mappings.

CRs-Fixed: 1072834
Change-Id: I57dfd6abe6c928dbe4df1bcc682d4093040ccb9f
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-09-29 14:40:50 -06:00
Skylar Chang
1966a333f8 mam: ipa: always add default flt rule at the end
Change the logic in IPA driver to always add the default
catch-all filtering rule at the end.

Change-Id: Id442844226398a66813a7ec59c662afea0af2778
Acked-by: Shihuan Liu <shihuanl@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-09-29 11:27:54 -07:00
Linux Build Service Account
46692be6dd Merge "net: cnss: Add support to get fw files for QCA SDIO target" 2016-09-29 11:21:14 -07:00
Linux Build Service Account
36b224f262 Merge "icnss: update logs for QMI rejected messages" 2016-09-29 11:21:13 -07:00
Linux Build Service Account
25303294bd Merge "Migrate mpq demux driver from kernel 3.18 to 4.4" 2016-09-29 11:21:12 -07:00
Linux Build Service Account
6e395a551f Merge "Migrate demux driver from kernel 3.18 to 4.4" 2016-09-29 11:21:11 -07:00
Linux Build Service Account
97706eea54 Merge "usb: dwc3: fix overriding core clock rate to default max" 2016-09-29 11:21:11 -07:00
Linux Build Service Account
bc716d0f35 Merge "msm: pcie: verify EP is accessible before conf restore" 2016-09-29 11:21:10 -07:00
Linux Build Service Account
cc2b944d66 Merge "soc: qcom: pil: add PBL spare error status" 2016-09-29 11:21:09 -07:00
Linux Build Service Account
a888aabc80 Merge "ASoC: wcd934x: enable rate converter clock for AANC" 2016-09-29 11:21:08 -07:00
Linux Build Service Account
6d162862f4 Merge "ASoC: msmcobalt: Enable msmcobalt to use audio notifier" 2016-09-29 11:21:06 -07:00
Linux Build Service Account
f5b7228107 Merge "drivers: soc: Add Audio Notifier, PDR, and SSR drivers" 2016-09-29 11:21:05 -07:00
Linux Build Service Account
c5d7e7b615 Merge "msm: ipa3: hal: change FnR prints to low" 2016-09-29 11:21:04 -07:00
Linux Build Service Account
87eb81341d Merge "msm: ipa3: change FnR prints to low" 2016-09-29 11:21:03 -07:00
Linux Build Service Account
1b35a9d9cb Merge "soc: qcom: glink: Fix uninitialzed return value." 2016-09-29 11:21:02 -07:00
Linux Build Service Account
f8a523fad1 Merge "soc: qcom: glink_ssr: Fix uninitialized variable" 2016-09-29 11:21:01 -07:00
Linux Build Service Account
793392fb5f Merge "msm: kgsl: Add memory and periphery clock control for A540" 2016-09-29 11:21:00 -07:00
Linux Build Service Account
e18b1f64de Merge "ASoC: wcd934x: Avoid pop during dsd path tear down" 2016-09-29 11:20:58 -07:00
Linux Build Service Account
71acb6aa27 Merge "ARM: dts: msm: enable more FG interrupts for PMICOBALT" 2016-09-29 11:20:57 -07:00
Linux Build Service Account
2d26c815e5 Merge "qcom-charger: fg-util: add float decode function" 2016-09-29 11:20:56 -07:00
Linux Build Service Account
c3e6753c03 Merge "ARM: dts: msm: modify VDD_APC0/1 CPR voltages for msmcobalt v2" 2016-09-29 11:20:56 -07:00