OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
8 years agoregulator: cpr3-mmss-regulator: add support for msmcobalt partial binning
David Collins [Wed, 27 Apr 2016 00:33:50 +0000 (17:33 -0700)]
regulator: cpr3-mmss-regulator: add support for msmcobalt partial binning

Add support for the partial binning open-loop voltage fuse values
used on MSMCOBALT chips.  Raise the voltage applied for lower
corners when specified by the fuse values in order to ensure
stability.

Change-Id: Ia3f95778d0dab1be9d15fa95d1fc5624606689ec
CRs-Fixed: 1009279
Signed-off-by: David Collins <collinsd@codeaurora.org>
8 years agoicnss: Add support to configure voltage regulator
Hardik Kantilal Patel [Thu, 25 Feb 2016 04:05:46 +0000 (09:35 +0530)]
icnss: Add support to configure voltage regulator

Add voltage regulator support to power the WLAN hardware.

CRs-Fixed: 982993
Change-Id: Ic36ac920497d05131ef8162a42ee5318600a3473
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
8 years agomsm: mdss: Properly free memory in error case
Ping Li [Thu, 21 Apr 2016 00:09:36 +0000 (17:09 -0700)]
msm: mdss: Properly free memory in error case

Free previously allocated memory in error return cases to avoid
memory leak.

CRs-Fixed: 1005989
Change-Id: I9676eb2c75e7be42b1b1901194ba5c2a206dbeb3
Signed-off-by: Ping Li <pingli@codeaurora.org>
8 years agomsm: mdss: Add NULL check before de-allocating framebuffer
Ping Li [Fri, 15 Apr 2016 23:54:21 +0000 (16:54 -0700)]
msm: mdss: Add NULL check before de-allocating framebuffer

Add NULL check before de-allocating framebuffer to avoid NULL
pointer de-reference.

CRs-Fixed: 1003106
Change-Id: I0f3c44671d3ca1b665e91ad314513bb743f23d3c
Signed-off-by: Ping Li <pingli@codeaurora.org>
8 years agomsm: mdss: Fix memory leak in panel_debugfs_create_array func
Ping Li [Fri, 29 Apr 2016 21:42:46 +0000 (14:42 -0700)]
msm: mdss: Fix memory leak in panel_debugfs_create_array func

Fix the potential memory leak in panel_debugfs_create_array func
by freeing the allocated memory in error return case.

CRs-Fixed: 1005536
Change-Id: If2bf7dbe7caedfa42337639fea739974f99960b4
Signed-off-by: Ping Li <pingli@codeaurora.org>
8 years agoARM: dts: msm: Add Synaptics regulator voltage and current for msm8996
Alex Sarraf [Tue, 3 May 2016 00:42:18 +0000 (17:42 -0700)]
ARM: dts: msm: Add Synaptics regulator voltage and current for msm8996

Add voltage and current specs for regulators for the
Synaptics driver.

Change-Id: I94c7d5b20fc73ba49b0c8613297f0514fedb3d97
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
8 years agomsm: mdss: Properly set the PP feature cfg_payload in layers
Ping Li [Wed, 20 Apr 2016 01:52:10 +0000 (18:52 -0700)]
msm: mdss: Properly set the PP feature cfg_payload in layers

Set the PP feature cfg_payload properly to avoid invalid pointer
cases.

CRs-Fixed: 1004933
Change-Id: I44314b49a6ebb5dedfdedfcddd88c12eabd1f125
Signed-off-by: Ping Li <pingli@codeaurora.org>
8 years agomsm: mdss: Correct block id check for mdss_mdp_misr_table
Ping Li [Fri, 15 Apr 2016 22:27:36 +0000 (15:27 -0700)]
msm: mdss: Correct block id check for mdss_mdp_misr_table

DISPLAY_MISR_LCDC block doesn't have corresponding mdss_mdp_misr_table,
this change corrects the block id check for mdss_mdp_misr_table.

CRs-Fixed: 1001224
Change-Id: I74b03c31542d4b239eb2ffdc4dc6345dff5eab86
Signed-off-by: Ping Li <pingli@codeaurora.org>
8 years agomsm: sde: Correct rotator chroma alignment for nv12 ubwc
Alan Kwong [Tue, 10 May 2016 01:07:43 +0000 (21:07 -0400)]
msm: sde: Correct rotator chroma alignment for nv12 ubwc

Correct rotator chroma alignment to 128 byte for nv12 ubwc format.  Chroma
block artifacts are seen without this correction.

CRs-Fixed: 1013358
Change-Id: I715094188dc2b61c04879f8f6ce7b2c8f2d815c5
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
8 years agoARM: dts: msm: Add apps port entries for audio slimbus on msmcobalt
Sagar Dharia [Fri, 29 Apr 2016 22:40:32 +0000 (16:40 -0600)]
ARM: dts: msm: Add apps port entries for audio slimbus on msmcobalt

Add apps side data port entries for audio slimbus instance based
on audio usecases.

CRs-Fixed: 1003083
Change-Id: I4fd83519ab75a1d979573b63761676f7c99593d4
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
8 years agoARM: dts: msm: Add PD PHY peripheral to pmicobalt
Jack Pham [Fri, 1 Apr 2016 01:50:53 +0000 (18:50 -0700)]
ARM: dts: msm: Add PD PHY peripheral to pmicobalt

Add device node for the USB PD PHY peripheral found in PMICOBALT.
Reference this from the USB3 node as its extcon device as it
provides notifications of cable insertion/removal.

Change-Id: I42916b13e5d28dd3f3b0ed40c53767cbd7ae32b1
Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agodefconfig: msmcortex: Enable USB PD drivers
Jack Pham [Fri, 1 Apr 2016 01:53:02 +0000 (18:53 -0700)]
defconfig: msmcortex: Enable USB PD drivers

Enable USB_PD_POLICY and QPNP_USB_PDPHY drivers which
support USB Power Delivery.

Change-Id: I44a385af5c68b0bf656fc705a07251850fb38fde
Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agousb: pd: Add sysfs entries
Jack Pham [Fri, 4 Mar 2016 23:48:37 +0000 (15:48 -0800)]
usb: pd: Add sysfs entries

Add sysfs attributes that will live under /sys/class/usbpd/usbpd0
which will give state information such as:

   - received PDOs from the peer source
   - whether an explicit contract is established
   - selecting a new PDO (thereby sending a Request message)
   - current and supported power, data roles

Change-Id: I5c3cf9a0239c0274709a1771e4fda8c6f5baaa77
Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agousb: pd: Add Protocol layer and Policy Engine
Jack Pham [Fri, 19 Feb 2016 21:04:37 +0000 (13:04 -0800)]
usb: pd: Add Protocol layer and Policy Engine

This change adds protocol layer handling as well as the
policy engine state machine.

Change-Id: I5323f82192960d1fd7d3a20baf040d6d80c06be5
Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agousb: pd: Add QPNP Power Delivery PHY driver
Hemant Kumar [Mon, 29 Feb 2016 20:01:27 +0000 (12:01 -0800)]
usb: pd: Add QPNP Power Delivery PHY driver

The QPNP PD PHY resides in the PMIC and handles USB Power Delivery
data transmission and reception over the CC lines. This driver
communicates to this device over SPMI or I2C buses. Introduce APIs
that upper layers will use to implement the protocol layer and
policy engine.

Change-Id: I75dec23c297fd5e07d14741e6627b473012b7a01
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agousb: pd: Add initial support for USB Power Delivery
Jack Pham [Thu, 17 Mar 2016 07:27:10 +0000 (00:27 -0700)]
usb: pd: Add initial support for USB Power Delivery

Add PD policy engine driver. This driver will interact
with the charger/Type-C module via power_supply framework,
and in turn notify the USB controller on when to begin/end
data operation using extcon. For this initial patch this
driver is simply acting as a pass-through between Type-C
connection states and relaying them as USB/USB_HOST
notifications.

Change-Id: Ieba8e68761beef83a572b75b6b5f3b7ab7802e9e
Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agodefconfig: arm64: msmcortex: enable QPNP_SMB2 support for msmcobalt
Nicholas Troast [Fri, 8 Apr 2016 21:20:53 +0000 (14:20 -0700)]
defconfig: arm64: msmcortex: enable QPNP_SMB2 support for msmcobalt

Enable QPNP_SMB2 device support for the msmcobalt platform.

CRs-Fixed: 1005389
Change-Id: I0ecabc0febd38ad55cee69bb415a0856a3e83a73
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agoARM: dts: msm: add VBUS and VCONN regulators for msmcobalt
Harry Yang [Thu, 7 Apr 2016 01:26:53 +0000 (18:26 -0700)]
ARM: dts: msm: add VBUS and VCONN regulators for msmcobalt

QPNP SMB2 charger controls enabling VBUS and VCONN regulators.

- VBUS is used to support OTG connected devices
- VCONN is used to support Type-C powered cables

Add regulator devices for VBUS and VCONN.

CRs-Fixed: 1005389
Change-Id: Ia8dd2d6c8d51765dc49bdfa15565aed09c6a3893
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agoARM: dts: msm: add QPNP SMB2 charger device to PMICOBALT
Nicholas Troast [Fri, 8 Apr 2016 21:00:24 +0000 (14:00 -0700)]
ARM: dts: msm: add QPNP SMB2 charger device to PMICOBALT

Add the QPNP SMB2 charger device that is present in PMICOBALT.

CRs-Fixed: 1005389
Change-Id: I03be96c229095b666d8e1a84c718989d84ec506e
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agoqcom-charger: introduce QPNP SMB2 charger driver
Nicholas Troast [Thu, 25 Feb 2016 23:42:17 +0000 (15:42 -0800)]
qcom-charger: introduce QPNP SMB2 charger driver

The QPNP SMB2 charger driver supports the charger peripheral present in
the PMICOBALT chip.

This charger peripheral is common among other chips, therefore the
driver uses the smb library to support all common functionality.

Register access is provided by the parent device via regmap. Interrupts
are controlled by the parent device, and handlers are registered by the
QPNP SMB2 charger driver.

The power supply framework is used to communicate battery and usb
properties to userspace and other driver consumers such as fuel gauge,
USB, and USB-PD.

VBUS and VCONN regulators are registered for supporting OTG, and powered
Type-C cables respectively.

CRs-Fixed: 1005389
Change-Id: I160ce3c8caae6999f52590099cf6d1de957dbbaf
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Harry Yang <harryy@codeaurora.org>
8 years agoqcom-charger: introduce SMB charger library
Nicholas Troast [Mon, 28 Mar 2016 19:26:44 +0000 (12:26 -0700)]
qcom-charger: introduce SMB charger library

A library of common structures and functions that should be used by all
charger drivers that support an SMB charger peripheral.

The library includes high level register read/write access, interrupt
handlers, voter callbacks, and power supply property getters. It should be
extended with any functionality that can be leveraged by an SMB charger
peripheral.

All drivers that support an SMB charger peripheral should define their own
struct smb_charger to interface with the library.

CRs-Fixed: 1005389
Change-Id: I36796332af667874c1246ec35984122d45de6938
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Harry Yang <harryy@codeaurora.org>
8 years agoqcom-charger: pmic-voter: allow NULL callbacks
Nicholas Troast [Thu, 5 May 2016 17:59:01 +0000 (10:59 -0700)]
qcom-charger: pmic-voter: allow NULL callbacks

Consumers may not want to specify a callback, especially for boolean
votables which only care about the state of the client votes rather than
reacting to a change in the effective result.

CRs-Fixed: 1005389
Change-Id: I72274126a382ef8e32d89e1e8aa98348aaaac420
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agoandroid: binder: Don't use sched_preempt_enable_no_resched.
Riley Andrews [Wed, 2 Sep 2015 03:31:12 +0000 (20:31 -0700)]
android: binder: Don't use sched_preempt_enable_no_resched.

The correct function is prempt_enable_no_resched(). The other
function is reserved for the scheduler core.

Change-Id: Ib36697de003f6a59a608a0024d5351dc15ff8715
Signed-off-by: Todd Kjos <tkjos@google.com>
Git-commit: 776e5bca6446b3aac03b4685b4f4f72446ddcba0
Git-repo: https://android.googlesource.com/kernel/msm
[odhyade@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Omprakash Dhyade <odhyade@codeaurora.org>
8 years agoandroid: binder: Use wake up hint for synchronous transactions.
Riley Andrews [Tue, 1 Sep 2015 19:42:07 +0000 (12:42 -0700)]
android: binder: Use wake up hint for synchronous transactions.

Use wake_up_interruptible_sync() to hint to the scheduler binder
transactions are synchronous wakeups. Disable premption while waking
to avoid ping-ponging on the binder lock.

Change-Id: Ic406a232d0873662f80148e37acefe5243d912a0
Signed-off-by: Todd Kjos <tkjos@google.com>
Git-commit: 443c026e90820170aa3db2c21d2933ae5922f900
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Omprakash Dhyade <odhyade@codeaurora.org>
8 years agosoc: qcom: glink: Fix ssr race condition in glink_close
Chris Lew [Sat, 30 Apr 2016 23:11:26 +0000 (16:11 -0700)]
soc: qcom: glink: Fix ssr race condition in glink_close

Add else statement in glink_close for a race condition where the
xprt state is set to GLINK_XPRT_DOWN and glink_close runs before
the channel is migrated.

CRs-Fixed: 988266
Change-Id: I4de6530f1fbffd9f3acd1fa539cf756364ea32ac
Signed-off-by: Chris Lew <clew@codeaurora.org>
8 years agoicnss: Update icnss logs
Yuanyuan Liu [Sat, 7 May 2016 00:12:04 +0000 (17:12 -0700)]
icnss: Update icnss logs

Enable important kernel logs which are essential for cold boot debug.
Remove unnecessary log for normal behavior.

CRs-Fixed: 1013082
Change-Id: I5234f0511fa1c81072e740386e90e07f5e813dd0
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
8 years agoregulator: labibb: fix standalone mode configuration
Subbaraman Narayanamurthy [Fri, 1 Apr 2016 02:43:09 +0000 (19:43 -0700)]
regulator: labibb: fix standalone mode configuration

Currently, standalone mode is treated as a mode along with other
modes, LCD and AMOLED. Rather than keeping it like that, LCD and
AMOLED mode configurations should be allowed along with the way
LAB and IBB modules are controlled, i.e. standalone or dual.

Remove the standalone mode from the list of modes and keep it as
a configurable parameter via device tree. This way, LCD and
AMOLED modes can be configured along with the way LAB/IBB needs
to be controlled (dual or standalone).

Add support for parent supply to LABIBB device so that LAB and
IBB regulators can vote for MBG when operating in standalone
mode.

CRs-Fixed: 996961
Change-Id: I56882e3a5a01b017e1ba9cd63ab36933a3d469e7
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agoRevert "regulator: labibb: avail of simpler regulator registration api"
Subbaraman Narayanamurthy [Tue, 26 Apr 2016 02:02:49 +0000 (19:02 -0700)]
Revert "regulator: labibb: avail of simpler regulator registration api"

This reverts commit 0324b74b3953 ("regulator: labibb: avail of
simpler regulator registration api").

LABIBB regulator driver still needs to obtain init_data from
the device tree not just for the regulator name but it is for
a subsequent change which will pass the parent supply name via
init_data to register with the regulator framework. Hence bring
it back.

Since of_get_regulator_init_data() is brought back, we need to
pass rdesc to that function as the number of arguments got
changed.

CRs-Fixed: 1008400
Change-Id: I027a9ddbbbf6ff0ba7886151e5336d190ac3ce25
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agoregulator: qpnp-labibb: Add logic to skip second SWIRE command
Anirudh Ghayal [Tue, 1 Mar 2016 10:58:56 +0000 (16:28 +0530)]
regulator: qpnp-labibb: Add logic to skip second SWIRE command

On newer AMOLED panels the second SWIRE command is expected to
control the AVDD voltage. However, the PMI8950/PMI8994 IBB module
interprets this command for VDISN and incorrectly reduces its voltage.

Add DT properties 'qcom,skip-2nd-swire-cmd' to skip the second
SWIRE command and 'qcom,swire-2nd-cmd-delay' to explicitly specify
the delay between the first and second SWIRE command.

CRs-Fixed: 938038
Change-Id: I617a8490784efd760651b3ec8780cc4fd4b17bae
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agomsm: ipa3: Send limited chained descriptors to IPA
Ghanim Fodi [Thu, 5 May 2016 23:43:26 +0000 (16:43 -0700)]
msm: ipa3: Send limited chained descriptors to IPA

As part of SSR IPA driver code, Filtering and Routing Q6 tables
are being cleaned by pointing to empty tables.
This is done via DMA_SHARED_MEM IPA immediate command to change
SRAM tables pointers. Today code send one command per tables, but
all are chained in single transaction. This will hit the chain
size limitation defined by GSI IPA_IF TLV size.
Change the code to send the commands in smaller chains.

CRs-Fixed: 1012322
Change-Id: I03e9e92c2e01d1fece7e13dd412ea6128210f1fb
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
8 years agoARM: dts: msm: Add VADC_HC and BTM channels for msmcobalt
Siddartha Mohanadoss [Thu, 28 Apr 2016 21:58:56 +0000 (14:58 -0700)]
ARM: dts: msm: Add VADC_HC and BTM channels for msmcobalt

Clients of VADC_HC and BTM include reading voltage phone
power, system thermistors for thermal mitigation such as
msm_therm, case_therm, XO therm. Add the supported VADC
and BTM channels for the msmcobalt platforms.

Change-Id: I87d0b7c8280a57b88a9b9e7c6a2710e4694a2c0b
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agomsm: mdss: enable additonal clocks
Abhijit Kulkarni [Tue, 12 Apr 2016 22:48:52 +0000 (15:48 -0700)]
msm: mdss: enable additonal clocks

Need to enable clk_mmss_mnoc_ahb_clk before turning on the ahb_clk,
as there is a core fsm dependency between these clocks.

CRs-Fixed: 1008505
Change-Id: I9c87fee27c6a6ef875100c9fc1b9d0cb7c14a2b5
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
8 years agothermal: qpnp-adc-tm: Support refreshed BTM driver
Siddartha Mohanadoss [Thu, 28 Apr 2016 21:12:44 +0000 (14:12 -0700)]
thermal: qpnp-adc-tm: Support refreshed BTM driver

The BTM (Battery temperature module) peripheral driver
on the PMIC (Power management IC) supports threshold
monitoring and notifies clients when thresholds are crossed.
PMCOBALT supports refreshed BTM peripheral register interface
and the driver uses compatible property qpnp-adc-tm-hc to
distinguish using the refreshed peripheral. The external
client interface with the driver remains the same. Updates
include handling the interrupt when the thresholds are
crossed,programming the threholds and configuring
the hardware based on the refreshed design.

BTM peripheral needs the VADC_HC peripheral to compute the
gain/offset that are used to reverse compute the threhold
values to ADC code. Some of the reverse computation API's
such as calculating thermistor thresholds require the
gain and offset values before computing the ADC code to
be programmed. This requires modification to the existing
calibration API in the VADC_HC driver to calculate
the reference calibration points and store these values
for clients to use in the reverse computation

Change-Id: I989cfa4f40e7f1671f04dfa9d4c3fe2ccbbc44ab
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agoARM: dts: msm: Add clocks MNOC AHB/AXI for smmu
Abhijit Kulkarni [Wed, 13 Apr 2016 00:12:55 +0000 (17:12 -0700)]
ARM: dts: msm: Add clocks MNOC AHB/AXI for smmu

Add additional required clocks mdss device tree to enable
mmss smmu functionality.

Change-Id: I09a7268861663761df716dd18f07069f6b1152ce
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
8 years agoARM: dts: msm: Add VBIF/Hysteresis support for mdss
Abhijit Kulkarni [Tue, 12 Apr 2016 22:46:39 +0000 (15:46 -0700)]
ARM: dts: msm: Add VBIF/Hysteresis support for mdss

VBIF/Hysteresis registers have to be setup for mdss module
of msmcobalt. Add default values in the device tree.

Change-Id: I4f106a39529f5e77591431bc3b4883a16d7b37f1
Signed-off-by: Sushil Chauhan <sushilchauhan@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
8 years agospmi-pmic-arb: check apid enabled before calling the handler
Abhijeet Dharmapurikar [Thu, 28 Apr 2016 03:39:46 +0000 (20:39 -0700)]
spmi-pmic-arb: check apid enabled before calling the handler

The driver currently invokes the apid handler (periph_handler()) once it
sees that the summary status bit for that apid is set.

However the hardware is designed to set that bit even if the apid
interrupts are disabled. The driver should check whether the apid is
indeed enabled before calling the apid handler.

CRs-Fixed: 1001770
Change-Id: I1415c41ec99ca4b767392ea3443691760f967953
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
8 years agospmi: pmic_arb: add a print in cleanup_irq
Abhijeet Dharmapurikar [Wed, 27 Apr 2016 01:31:39 +0000 (18:31 -0700)]
spmi: pmic_arb: add a print in cleanup_irq

The cleanup_irq() was meant to clear and mask interrupts that were
left enabled in the hardware but there was no interrupt handler
registered for it. Add an error print when it gets invoked.

CRs-Fixed: 1001770
Change-Id: Iccf0daadeb82b0fca29829424439ac225e2b3b88
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
8 years agospmi: pmic_arb: use appropriate flow handler
Abhijeet Dharmapurikar [Wed, 20 Apr 2016 03:06:46 +0000 (20:06 -0700)]
spmi: pmic_arb: use appropriate flow handler

The current code uses handle_level_irq flow handler even if the trigger
type of the interrupt is edge. This can lead to missing of an edge
transition that happens when the interrupt is being handled. The level
flow handler masks the interrupt while it is being handled, so if an edge
transition happens at that time, that edge is lost.

Use an edge flow handler for edge type interrupts which ensures that the
interrupt stays enabled while being handled - at least until it triggers
at which point the flow handler sets the IRQF_PENDING flag and only then
masks the interrupt. That IRQF_PENDING state indicates an edge transition
happened while the interrupt was being handled and the handler is called
again.

CRs-Fixed: 1001770
Change-Id: Id2554c9e6ed79188fa1b64728be464bda45f07ec
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
8 years agomsm: camera: Avoid exposing kernel addresses
Azam Sadiq Pasha Kapatrala Syed [Thu, 10 Mar 2016 23:01:06 +0000 (15:01 -0800)]
msm: camera: Avoid exposing kernel addresses

Usage of %p exposes the kernel addresses, an easy target to
kernel write vulnerabilities. With this patch currently
%pK prints only Zeros as address. If you need actual address
echo 0 > /proc/sys/kernel/kptr_restrict

CRs-Fixed: 987011
Change-Id: I6c79f82376936fc646b723872a96a6694fe47cd9
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
8 years agoclk: msm: clock-gcc-cobalt: Add new hw_ctl_clk type UFS clocks
Deepak Katragadda [Tue, 3 May 2016 18:53:02 +0000 (11:53 -0700)]
clk: msm: clock-gcc-cobalt: Add new hw_ctl_clk type UFS clocks

Add new UFS clocks to support enabling/disabling the hardware
dynamic gating for their corresponding branch clocks.

CRs-Fixed: 1012355
Change-Id: I4836ad8a775b0ec0375e37d27fcbe380e661a7b2
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoclk: msm: clock-local2: Add support for enabling clock HW_CTL
Deepak Katragadda [Tue, 3 May 2016 18:28:24 +0000 (11:28 -0700)]
clk: msm: clock-local2: Add support for enabling clock HW_CTL

Add a new hw_ctl_clk type to allow clock clients to enable
hardware dynamic gating of the clock branch.
Clients should use the clk_enable API on a separate hw_ctl_clk
clock structure to set this bit. Vice-versa for clearing it.
It is mandatory that the clients call clk_enable on the actual
branch clock before enabling the hw_ctl_clk clock.

CRs-Fixed: 1012355
Change-Id: I24e78353fa07f537bafc322dba6b1ffac913cd1d
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agosoc: qcom: Vote ATB clock before clear registers
Runmin Wang [Wed, 4 May 2016 17:51:19 +0000 (10:51 -0700)]
soc: qcom: Vote ATB clock before clear registers

Gladiator error driver depends on the ATB clocks to be voted.
Previously, clock voting is done after writing to gladiator
registers.

CRs-Fixed: 1011314
Change-Id: I4d18273c6fc63baf58db1a778a1aaf3cb55e4824
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
8 years agosoc: qcom: Add more details to error log for PIL debugging
Puja Gupta [Thu, 14 Apr 2016 22:46:44 +0000 (15:46 -0700)]
soc: qcom: Add more details to error log for PIL debugging

Add more detailed log to help debug when the ELF segments relocatable bit
is not set and pil_init_segment bails out.

Change-Id: Id8d941e69b70f1bcf709cedc969aa0500be92039
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
8 years agodefconfig: enable msm serial console on msmcortex perf config
Abhimanyu Kapur [Thu, 21 Apr 2016 18:19:31 +0000 (11:19 -0700)]
defconfig: enable msm serial console on msmcortex perf config

Enable serial uart console on the msmcortex perf config.

CRs-Fixed: 1008594
Change-Id: I928ddfb44dfd52e8ba70d637219e3b5fbcdf8fa7
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
8 years agosoc: qcom: add support for the socinfo v0.12 format
Se Wang (Patrick) Oh [Tue, 6 Oct 2015 23:41:47 +0000 (16:41 -0700)]
soc: qcom: add support for the socinfo v0.12 format

The v0.12 format adds three new fields:
uint32_t chip_family;
uint32_t raw_device_family;
uint32_t raw_device_number;

CRs-Fixed: 1013110
Change-Id: I1699ee96c65809a46331f94938c12fc1dd4d5384
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
8 years agoARM: dts: msm: Update the emergency hotplug threshold for MSMcobalt
Ram Chandrasekar [Thu, 5 May 2016 16:10:06 +0000 (10:10 -0600)]
ARM: dts: msm: Update the emergency hotplug threshold for MSMcobalt

As per recommendation update the emergency hotplug threshold
for MSMcobalt to 105C from 70C.

CRs-Fixed: 1010111
Change-Id: I69a5583e4e15499c54ce5b2ab0fe0538de303391
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: Configure low voltage restricion for msmcobalt
Ram Chandrasekar [Mon, 25 Apr 2016 22:34:18 +0000 (16:34 -0600)]
ARM: dts: msm: Configure low voltage restricion for msmcobalt

Configure thermal driver to do low voltage restriction for CX,
APSS and graphics rails, when temperature goes below 5 degree C.
This restriction will be cleared if the tsens temperature goes
above 10 degree C.

CRs-Fixed: 1010111
Change-Id: I36a1ba6adb9ce847ae552d904dff1bbd0ce3cb77
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: Configure lmh hardware for msmcobalt
Ram Chandrasekar [Fri, 15 Apr 2016 21:54:08 +0000 (15:54 -0600)]
ARM: dts: msm: Configure lmh hardware for msmcobalt

Configure the limits hardware with the interrupt to listen for.
limits hardware driver will interact with the trustzone to get
throttling information from the hardware.

CRs-Fixed: 1010120
Change-Id: I56a8396a12e9b96cbed554bb1aed5d6243e6240a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: Remove boot frequency mitigation for msmcobalt
Ram Chandrasekar [Fri, 15 Apr 2016 18:16:30 +0000 (12:16 -0600)]
ARM: dts: msm: Remove boot frequency mitigation for msmcobalt

With the LMH-DCVSh hardware the frequency mitigation in
the HLOS is not needed. Remove the boot-up frequency mitigation
in KTM for msmcobalt.

CRs-Fixed: 1010111
Change-Id: I105e98968b911f08b67c4e686e74ae6f7555d7be
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: Remove wrong pop_mem sensor alias for msmcobalt
Ram Chandrasekar [Thu, 7 Apr 2016 17:20:43 +0000 (11:20 -0600)]
ARM: dts: msm: Remove wrong pop_mem sensor alias for msmcobalt

temperature sensor 1 maps to cpu1 and not pop_mem. Remove
the pop_mem alias name defined for temperature sensor 1
in msmcobalt.

CRs-Fixed: 1010111
Change-Id: I69803580c9f747a0e2e5effa43d33f7a9a0d4e73
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agodefconfig: msmcortex: Enable LMH hardware and interface driver
Ram Chandrasekar [Mon, 9 May 2016 18:37:51 +0000 (12:37 -0600)]
defconfig: msmcortex: Enable LMH hardware and interface driver

Enable the LMH hardware and the LMH interface driver.
LMH hardware driver interacts with the LMH hardware and
uses the interface driver to register with thermal core.

CRs-Fixed: 1010120
Change-Id: I2e6f6a181902bee7e3bcb0f366e6ee21f8a4c442
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agodefconfig: msmcortex: Enable thermal drivers for msmcobalt
Ram Chandrasekar [Mon, 9 May 2016 18:26:37 +0000 (12:26 -0600)]
defconfig: msmcortex: Enable thermal drivers for msmcobalt

Enable kernel thermal driver.
kernel thermal driver can monitor, mitigate and provide interface
to thermal-engine to mitigate.

CRs-Fixed: 1010111
Change-Id: I02b4bc9cf66b2734be99c986d4a200f604145e0a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: define LMh SW override values for OSM device for msmcobalt
Osvaldo Banuelos [Wed, 27 Apr 2016 00:53:36 +0000 (17:53 -0700)]
ARM: dts: msm: define LMh SW override values for OSM device for msmcobalt

Define the three LMh SW override values per cluster to be used
by the OSM device.

Change-Id: I6279cdbc92d4e0d5786854722474e1dfb14e7198
CRs-Fixed: 1009097
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoclk: msm: osm: support programming LMh SW override values in set_rate()
Osvaldo Banuelos [Wed, 27 Apr 2016 00:48:47 +0000 (17:48 -0700)]
clk: msm: osm: support programming LMh SW override values in set_rate()

To ensure stable operation, it is necessary to place LMh SW override
votes when setting the new rate of the power and performance
CPU clocks. Add support for parsing these values from Device Tree
and programming them in clk_set_rate().

Change-Id: I60d90d546f155edb6c13c46e6c59c75e95848d6c
CRs-Fixed: 1009097
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agomsm: mdss: update CSC 10 bit matrix table with appropriate values
Ramkumar Radhakrishnan [Fri, 6 May 2016 22:21:44 +0000 (15:21 -0700)]
msm: mdss: update CSC 10 bit matrix table with appropriate values

Update CSC 10 bit YUV2RGB matrix table with appropriate values to
avoid any color conversion issues.

Change-Id: Iaf740873a6814cd9211acf4de4042c7cefecd64d
CRs-Fixed: 997593
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
8 years agomsm: mdss: align yuv bitstream plane size and stride appropriately.
Ramkumar Radhakrishnan [Fri, 6 May 2016 22:19:03 +0000 (15:19 -0700)]
msm: mdss: align yuv bitstream plane size and stride appropriately.

Add align function to align the values to non power of 2 and align
yuv bitstream plane size and stride appropriately.

Change-Id: I40695e9e7a99fe7c814d26fa7b5205370b7f9f64
CRs-Fixed: 997601
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
8 years agomsm: lmh_lite: Use dynamic memory for getting sensor list
Ram Chandrasekar [Fri, 29 Apr 2016 17:38:18 +0000 (11:38 -0600)]
msm: lmh_lite: Use dynamic memory for getting sensor list

LMH lite driver allocates DMA memory for getting the
sensor list from trustzone. DMA memory is not needed for
this operation, so use dynamic memory.

CRs-Fixed: 1010120
Change-Id: Ia7ef920a0f34334e49d76efc5ba233aa58aeb273
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agomsm: lmh_interface: Support new thermal core framework APIs
Ram Chandrasekar [Mon, 25 Apr 2016 21:54:17 +0000 (15:54 -0600)]
msm: lmh_interface: Support new thermal core framework APIs

Thermal core framework allows reading negative temperature and to
support that, thermal core APIs will read temperature in integer.

Inline with thermal core changes, modify the parameters to read
temperature to integer from signed long.

CRs-Fixed: 1010120
Change-Id: I975c11aa4e63e01ee3274a577b51b37c1c0f78cd
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agokernel: Restrict permissions of /proc/iomem.
Biswajit Paul [Mon, 9 Feb 2015 23:21:12 +0000 (15:21 -0800)]
kernel: Restrict permissions of /proc/iomem.

The permissions of /proc/iomem currently are -r--r--r--. Everyone can
see its content. As iomem contains information about the physical memory
content of the device, restrict the information only to root.

Change-Id: If0be35c3fac5274151bea87b738a48e6ec0ae891
CRs-Fixed: 786116
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
Signed-off-by: Avijit Kanti Das <avijitnsec@codeaurora.org>
8 years agomsm: ipa3: drain UL data for ECM/RNDIS tethering
Skylar Chang [Thu, 5 May 2016 17:08:09 +0000 (10:08 -0700)]
msm: ipa3: drain UL data for ECM/RNDIS tethering

In some cases modem will delay USB uplink pipe
for flow control. This will happen regardless of
tethering protocol. This change sends a QMI message
to modem to remove the delay on USB pipe in case
of USB cable disconnect.

CRs-Fixed: 1009199
Change-Id: I42cd716dcb87b814256a81418fecdff020f37d9d
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoARM: dts: msm: Add WCN3990 slimbus device tree
Sungjun Park [Wed, 6 Apr 2016 05:04:38 +0000 (22:04 -0700)]
ARM: dts: msm: Add WCN3990 slimbus device tree

Add WCN3990 slimbus slave device tree to support
bluetooth and FM audio.

Change-Id: I15a0abe365555a6695a7317e4d9cfae13a56c49e
Signed-off-by: Sungjun Park <sjpark@codeaurora.org>
8 years agomsm: mdss: hdmi: separate out hdmi panel functionalities
Ajay Singh Parmar [Wed, 20 Apr 2016 02:48:42 +0000 (19:48 -0700)]
msm: mdss: hdmi: separate out hdmi panel functionalities

Create a new file for hdmi panel related functionalities
for a cleaner approach. Move all the video, infoframe and
timing related programming to hdmi panel. Expose its
functionalities for other modules. Register the panel with
hdmi transmitter core so that it can access and program it.

Change-Id: Iff1cb13d7b42b6ecfe6fd1fc88a111875c3d6cfa
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
8 years agoARM: dts: msm: setup external clock sources for DP clock on msmcobalt
Chandan Uddaraju [Wed, 4 May 2016 22:49:26 +0000 (15:49 -0700)]
ARM: dts: msm: setup external clock sources for DP clock on msmcobalt

The DP RCGs exported by the MMSS clock controller (MMSS-CC)
can be sourced out of the DP PLL which is outside the MMSS-CC. Set up
these external clock sources to point to the DP PLL clocks.

CRs-Fixed: 1009740
Change-Id: Ia8f60ba711770c26e5b5919d2c39d7986403ece6
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
8 years agomsm: ipa3: enable rndis_ipa on msm-4.4
Skylar Chang [Thu, 5 May 2016 06:10:48 +0000 (23:10 -0700)]
msm: ipa3: enable rndis_ipa on msm-4.4

Change the feature flag to compile rndis_ipa
on cobalt target with msm-4.4 kernel, also
fix the compile warnings.

Change-Id: I82d3dd00e003d8eab63ca6bcc3bb91d51f122606
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoARM: dts: msm: add MDSS Display-Port PLL device node for msmcobalt
Chandan Uddaraju [Wed, 27 Apr 2016 22:16:25 +0000 (15:16 -0700)]
ARM: dts: msm: add MDSS Display-Port PLL device node for msmcobalt

List all the resources needed by the MDSS DP PLL device and add the
corresponding device node for msmcobalt. The DP PLL is the source for
all the branch clocks needed to drive pixel data over the DP interface.

CRs-Fixed: 1009740
Change-Id: I1a373a7602f8dbad3fb547690a87a28aea73aadd
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
8 years agoclk: qcom: mdss: add Display-port pll clock driver support
Chandan Uddaraju [Tue, 23 Feb 2016 00:43:23 +0000 (16:43 -0800)]
clk: qcom: mdss: add Display-port pll clock driver support

Add support for new Display-port  PLL clock driver to handle
different DP panel resolutions in msmcobalt. Add separate files
to support this new PHY PLL block.

CRs-Fixed: 1009740
Change-Id: Ic282c7e14fc6e23f4d044cb6a58249bdb4c8c2d8
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
8 years agoARM: dts: msm: define primary display interface for msmcobalt CDP
Aravind Venkateswaran [Fri, 1 Apr 2016 01:24:18 +0000 (18:24 -0700)]
ARM: dts: msm: define primary display interface for msmcobalt CDP

Set the primary display interface as the DSI device and the preferred
primary panel to be nt35597 dual-DSI (non-DSC) panel on msmcobalt CDP.

CRs-Fixed: 1000724
Change-Id: I8caa21c7b6a5f1e57cbd4c2bffeaa34e1e59d9c2
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
8 years agoARM: dts: msmcobalt: update CPU DAI list with SLIMBUS_7/8 DAIs
Banajit Goswami [Sat, 23 Apr 2016 01:56:03 +0000 (18:56 -0700)]
ARM: dts: msmcobalt: update CPU DAI list with SLIMBUS_7/8 DAIs

MSMCOBALT supports SLIMBUS_7 RX/Tx and SLIMBUS_8 Tx ports.
Add these ports to the CPU DAI list for passing to machine
driver.

Change-Id: I91306af6a2376fc76d51c62497e9723e6ec716e1
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoARM: dts: msm: add new CPU DAIs for SLIMBUS_7/8 Rx/Tx
Banajit Goswami [Wed, 20 Apr 2016 19:44:16 +0000 (12:44 -0700)]
ARM: dts: msm: add new CPU DAIs for SLIMBUS_7/8 Rx/Tx

Support for SLIMBUS_7 and SLIMBUS_8 Rx/Tx ports added to MSM audio
drivers. Add the right devices to probe/register these ports with
kernel at device bootup.

Change-Id: Id28b3d2fc5db4ec88ddbfa20b36047804d1fbdb6
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agomsm: lmh_interface: support new sequence print functions
Ram Chandrasekar [Thu, 14 Apr 2016 18:05:27 +0000 (12:05 -0600)]
msm: lmh_interface: support new sequence print functions

New sequence print functions doesn't return error on overflow.
Use the new API to check for overflow and then return error
from LMH interface driver.

CRS-FIxed: 1010120
Change-Id: I12c496f3c72398845a9039607b27112196afe38a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agomsm: thermal: Remove support for asynchronous cluster
Ram Chandrasekar [Tue, 3 May 2016 23:19:31 +0000 (17:19 -0600)]
msm: thermal: Remove support for asynchronous cluster

KTM has support for handling cluster with asynchronous cores within
a cluster. KTM can get the individual clock plans for the cores and
mitigate them separately. This feature is not supported in
hardware.

So remove the asynchronous cluster support from KTM.

CRs-Fixed: 1010111
Change-Id: I13348a16e2e1c11053cf5b99b921fd8ea65c7d89
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agomsm: vidc: Use Dcvs only when there is no resolution change
Rohit Kulkarni [Fri, 29 Apr 2016 20:40:32 +0000 (13:40 -0700)]
msm: vidc: Use Dcvs only when there is no resolution change

When driver detects that there is a dynamic resolution change
mid-stream it will not activate dcvs.

CRs-Fixed: 1007339
Change-Id: Ia5e5b42598b7e32360267e42665a5ce3880aaeee
Signed-off-by: Rohit Kulkarni <rkulkarn@codeaurora.org>
8 years agomsm: ipa: add a general function for assert
Amir Levy [Tue, 3 May 2016 05:54:50 +0000 (08:54 +0300)]
msm: ipa: add a general function for assert

In order to centralize IPA assert calls and add essential
data on assertion, replace some BUG calls in an ipa_assert wrapper.

CRs-fixed: 1006564
Change-Id: I6a9b679bb083c695908972b377e8779e2f1cca60
Signed-off-by: Amir Levy <alevy@codeaurora.org>
8 years agohwmon: qpnp-adc: Fix voltage scaling for VADC_HC peripheral
Siddartha Mohanadoss [Mon, 14 Mar 2016 19:43:59 +0000 (12:43 -0700)]
hwmon: qpnp-adc: Fix voltage scaling for VADC_HC peripheral

Incorrect voltage and temperature results are seen
during ADC reads from VADC_HC peripheral.

Fix setting the correct flag used to select the respective
peripherals scaling formula to return the correct voltage
and temperature readings for VADC_HC peripheral.

Change-Id: I6f4fe857996c8df996b6e4a0e4475a48740929fa
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agosoc: qcom: glink: Fix channel migration on fully open channel
Dhoat Harpal [Mon, 18 Apr 2016 15:31:02 +0000 (21:01 +0530)]
soc: qcom: glink: Fix channel migration on fully open channel

If process_open_event is delayed and glink has migrated to new transport,
process open event will be treated as a new open event and migration will
happen on fully open channel.

If channel is fully, open migration will not be allowed as client might
already be using the channel for communication.

Change-Id: I6c1760bc19f52e7d0c1c9834a72e2304f0ae28c8
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
8 years agomsm: clock: clock-gcc-cobalt: Support QSPI clocks on MSMHAMSTER
Deepak Katragadda [Wed, 4 May 2016 19:21:52 +0000 (12:21 -0700)]
msm: clock: clock-gcc-cobalt: Support QSPI clocks on MSMHAMSTER

Add programming support for the qspi_ref and qspi_ahb clocks
in the linux clocks driver.

CRs-Fixed: 1011840
Change-Id: Ic67b72b1e9341fec33bcdbde67f9e2c7e8045ec1
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoASoC: msmcobalt: add BT/FM audio support with WCN3990
Banajit Goswami [Sat, 9 Apr 2016 02:49:50 +0000 (19:49 -0700)]
ASoC: msmcobalt: add BT/FM audio support with WCN3990

Add machine driver code to support audio on MSMCOBALT based
boards with WCN3990 BT/FM chipset.

Change-Id: Ia23572f44775a04c8f8c67e9a61d6b9be8869b82
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: add loopback volume control for SLIMBUS_8_TX
Banajit Goswami [Wed, 2 Mar 2016 01:05:56 +0000 (17:05 -0800)]
ASoC: msm: qdsp6v2: add loopback volume control for SLIMBUS_8_TX

Add a new mixer control for volume control for SLIMBUS_8_TX AFE port
loopback.

Change-Id: Ifbf1778255edbe4901bd0860216ba1dd5a786047
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: msm: q6dspv2: add routes for SLIMBUS_7 and SLIMBUS_8
Banajit Goswami [Tue, 24 Nov 2015 18:14:23 +0000 (10:14 -0800)]
ASoC: msm: q6dspv2: add routes for SLIMBUS_7 and SLIMBUS_8

SLIMBUS_7 and SLIMBUS_8 would be used for BT-SCO and FM use
cases when using the second Slimbus instance. Add routes
to support voice call over BT-SCO and FM playbacki and capture
with these ports.

Change-Id: I5c558ee2dbe2de20b9ac3f042ae45a9431590778
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: msm: add Hostless DAI with SLIMBUS_8
Banajit Goswami [Tue, 24 Nov 2015 07:44:34 +0000 (23:44 -0800)]
ASoC: msm: add Hostless DAI with SLIMBUS_8

SLIMBUS_8 ports can be used for hostless audio playback and
capture use cases. Add Hostless Front-end DAI definitions
with Slimbus 8 ports.

Change-Id: Idc56625bb8fea263c3d530c8a9488eeb81fdd7e5
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: msm: q6dspv2: add support for Slimbus 7 and 8 ports
Banajit Goswami [Tue, 24 Nov 2015 17:49:29 +0000 (09:49 -0800)]
ASoC: msm: q6dspv2: add support for Slimbus 7 and 8 ports

Add support for SLIMBUS_7 and SLIMBUS_8 Rx and Tx ports for
MSM audio drivers.

Change-Id: I839ac07a3ee1e1e778c4d1e43d0bac89f01bd21a
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoARM: dts: msm: increase OSM LLM frequency and voltage hysteresis timers
Osvaldo Banuelos [Thu, 28 Apr 2016 00:08:06 +0000 (17:08 -0700)]
ARM: dts: msm: increase OSM LLM frequency and voltage hysteresis timers

Increase the OSM LLM frequency and voltage vote hysteresis timers
to the maximum allowed value of 327675 ns. This is necessary
to ensure stable operation when LLM port is enabled as client of
OSM.

Change-Id: I6b53b5a6187f0ac0e68f4ed54c7ae3ba0b062222
CRs-Fixed: 1009097
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoclk: msm: osm: increase timer resolution programming to nanoseconds
Osvaldo Banuelos [Fri, 22 Apr 2016 23:25:48 +0000 (16:25 -0700)]
clk: msm: osm: increase timer resolution programming to nanoseconds

OSM clock period is 5 ns. Therefore, the various hysteresis
timers used by OSM can be fine tuned with a granularity of
5 ns. Allow specification of timers in units of nanoseconds
to prevent losing valid timer setpoints.

Change-Id: Ice93347aaf81fe41ea7862752ac0d2d4e82d838c
CRs-Fixed: 1009097
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoASoC: msm: audio-effects: fix stack overread and heap overwrite
Weiyin Jiang [Wed, 16 Mar 2016 04:51:03 +0000 (12:51 +0800)]
ASoC: msm: audio-effects: fix stack overread and heap overwrite

Fix overwrite of updt_params allocated in heap, and stack overread
where param pointer is passed from user space.

CRs-Fixed: 989628
Change-Id: Ida8bdb7da2fcb97023dce3b6eafe4b899a51cb66
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
8 years agoclk: msm: clock-osm: increase refcount of CPU clocks at probe time
Osvaldo Banuelos [Mon, 21 Mar 2016 22:29:39 +0000 (15:29 -0700)]
clk: msm: clock-osm: increase refcount of CPU clocks at probe time

Increase the refcount of CPU clocks proportionally to the number
of available CPUs to maintain the assumption that each CPU clock
has been prepared and enabled by the time cpufreq takes over.

Change-Id: Icccb28bc7a88dc76cf4ed5710623e992ba62f19c
CRs-Fixed: 994035
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoARM: dts: msm: Update the memory map for msmcobalt
Patrick Daly [Tue, 3 May 2016 23:52:40 +0000 (16:52 -0700)]
ARM: dts: msm: Update the memory map for msmcobalt

Increase the size of the peripheral region.

Change-Id: I5af8da01a54dc6f31c93f7ad5201899c0779b661
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
8 years agopower: move QTI charger drivers to a new sub-directory again
Nicholas Troast [Mon, 28 Mar 2016 17:35:32 +0000 (10:35 -0700)]
power: move QTI charger drivers to a new sub-directory again

The original commit was reverted due to conflicts in the kernel upgrade
process. Now that the upgrade is complete we can introduce this commit
again.

Original commit:
commit 8e10bff71301 ("power: move QTI charger drivers to a new
sub-directory qcom-charger")

QTI charger drivers have outgrown their home in power and deserve their
own sub-directory. Move all QTI charger drivers and their dependencies to
a new sub-directory of power called qcom-charger.

CRs-Fixed: 1001767
Change-Id: I5465a944a79f622ddf69534075b067db0fb10c95
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agopower_supply: add INPUT_SUSPEND power supply property
Nicholas Troast [Fri, 1 Apr 2016 17:48:01 +0000 (10:48 -0700)]
power_supply: add INPUT_SUSPEND power supply property

POWER_SUPPLY_PROP_CHARGING_ENABLED has been used to indicate enabling
the charge path in some drivers and enabling the input path in others.
This leads to confusion of what charging enabled really means.

POWER_SUPPLY_PROP_BATTERY_CHARGING_ENABLED was introduced to indicate
enabling the charge path, and in this case
POWER_SUPPLY_PROP_CHARGING_ENABLED is used to indicate enabling the
input path. Since these are similarly named it leads to even more
confusion.

In an attempt to fix this confusion we introduce a new power supply
property POWER_SUPPLY_PROP_INPUT_SUSPEND which indicates suspending the
input path of the power supply. POWER_SUPPLY_PROP_CHARGING_ENABLED takes
its original definition of enabling the charge path. Then
POWER_SUPPLY_PROP_BATTERY_CHARGING_ENABLED will be retired from use.

CRs-Fixed: 1005389
Change-Id: I1ca8f5748a56a9395caa8ed8ed18f70e69f0cbe8
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agopower_supply: Add additional USB Type-C properties
Jack Pham [Mon, 29 Feb 2016 19:41:58 +0000 (11:41 -0800)]
power_supply: Add additional USB Type-C properties

Introduce the power_supply_typec_mode enum definitions which
will allow a charger to indicate the type of USB Type-C
connection that is established. Also add additional properties
for indicating CC pin orientation, changing source/sink power
role (useful for dynamic power role swap), and a flag to allow
the charger to expect VBUS changes during USB Power Delivery
power negotiation.

CRs-Fixed: 1005389
Change-Id: Iba9b652335fba4ee4f24a17eba8abdd5c85c21bb
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agoslim: msm: ngd: Add priority to DSP SSR notifier
Sagar Dharia [Fri, 1 Apr 2016 17:38:23 +0000 (11:38 -0600)]
slim: msm: ngd: Add priority to DSP SSR notifier

Currently SSR framework seems to make callbacks in the order
they were registered, or based on pririties.
Due to this, APR's callback (done in its probe) may be executed
before slimbus driver's callback (only registered after children
are probed). This still works, but may take longer since codec
may try sending some disconnection commands over slimbus if APR
is notified about SSR before codec was notified by slimbus.
This failure may result in some delay in SSR handling which is
more than the KPI numbers expected for this recovery mechanism.
Priority is added to slimbus SSR notifier registration to make
sure its callback is called before APR's.

CRs-Fixed: 996871
Change-Id: Ib7f002d52310dc13b60a18972a6899ebae21ba24
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
8 years agosoc: qcom: q6dspv2: add priority to ADSP SSR notifier for APR
Banajit Goswami [Tue, 29 Mar 2016 20:48:00 +0000 (13:48 -0700)]
soc: qcom: q6dspv2: add priority to ADSP SSR notifier for APR

Currently ADSP SSR notifications to APR come much earlier
than ADSP SSR notifications to SLIMbus. This causes audio
playback resume to take more time than expected, as code in WCD
codec driver has dependency on the sequence at which SSR
notifications are received. Add a priority to the notifier
block for APR, so that the APR has lower priority compared
to SLIMbus.

CRs-fixed: 989828
Change-Id: Idb089ec8d036d441e32bc927d7294121a1d2735d
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: codec: micb ref count decrement check
dojha [Thu, 31 Mar 2016 10:42:44 +0000 (16:12 +0530)]
ASoC: codec: micb ref count decrement check

In SSR with recording, race condition which reduces micb_ref to -1
is seen. SSR sets micb_ref to 0, further recording widgets power
down can reduce it to -1. During power up, it is increased to 0,
micbias is not getting enabled for recording since micb_ref is 0.
To prevent this micb_ref is checked for non zero value before
decrementing it.

CRs-Fixed: 994268
Change-Id: I6ea23fdf8b119cfd178c4f5b79b9d1c01c267a82
Signed-off-by: dojha <dojha@codeaurora.org>
8 years agoASoC: msm8996: Add delay to check ADSP state during SSR
Sudheer Papothi [Mon, 11 Apr 2016 18:16:42 +0000 (23:46 +0530)]
ASoC: msm8996: 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.

CRs-Fixed: 1001242
Change-Id: I2f3d1bdb3ca1ba05c014c26bbc87879f549098d8
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
8 years agoASoC: msm: Update the Slmbus6 downlink hostless routing
Kuirong Wang [Wed, 30 Mar 2016 21:58:14 +0000 (14:58 -0700)]
ASoC: msm: Update the Slmbus6 downlink hostless routing

Update the Slmbus6 downlink hostless routing so it can connect
to Slimbus0 Hostess FE.

Change-Id: Iaeb3e148af57e9d484a31820993cf7e5b6466dd2
CRs-fixed: 991759
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
8 years agoASoC: wsa881x-analog: Fix warning in bandgap and clock control
Laxminath Kasam [Fri, 15 Apr 2016 08:11:20 +0000 (13:41 +0530)]
ASoC: wsa881x-analog: Fix warning in bandgap and clock control

During temperature read, resource acquire can fail
if mclk is not enabled successfully. In such case,
clock and bandgap control counters are not incremented.
But resource release is still happening resulting
in counters going negative and warn_on messages.
Fix it by handling resource acquire failure case.

CRs-Fixed: 1003365
Change-Id: If2371e06866a615ca7d7dad64a5d7a17f258b3b6
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: DAP: Fix buffer overflow
Ashish Jain [Fri, 15 Apr 2016 10:03:14 +0000 (15:33 +0530)]
ASoC: msm: qdsp6v2: DAP: Fix buffer overflow

Add check to avoid out of bound access.
Check return value of get_user api.

CRs-Fixed: 997025
Change-Id: Ibbace116ac206007fa1928555838285304737737
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: update external EC reference logic
Venkata Narendra Kumar Gutta [Wed, 20 Apr 2016 06:12:46 +0000 (11:42 +0530)]
ASoC: msm: qdsp6v2: update external EC reference logic

VOC_EXT_EC MUX kcontrol, which is being used for external EC
reference, returning incorrect values when requested. Update
the logic to fix this issue.

CRs-Fixed: 999158
Change-Id: If05a54ca2539ef452312548bfcaf7f3fadd1de87
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
8 years agoARM: dts: msm: Update vrail comp factor for mdp masters
David Dai [Sun, 1 May 2016 08:40:57 +0000 (01:40 -0700)]
ARM: dts: msm: Update vrail comp factor for mdp masters

Use a vrail_comp factor of 25 for clients voting on mdp masters

CRs-Fixed: 1011135
Change-Id: I213bc12a089bdad75934959d0ccc8a6243f6124e
Signed-off-by: David Dai <daidavid1@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: update quinary rx controls for voice path
Venkata Narendra Kumar Gutta [Wed, 6 Apr 2016 11:25:09 +0000 (16:55 +0530)]
ASoC: msm: qdsp6v2: update quinary rx controls for voice path

Voice calls are not working over quinary rx path. Required rx
controls are not present, hence it's not working. Fix this
by updating quinary rx controls and routing map.

CRs-Fixed: 999811
Change-Id: Id566359e381b69acfccff406c7448708701530e7
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
8 years agoARM: dts: msm: Increase USB BAM device address space on msmcobalt
Mayank Rana [Tue, 3 May 2016 23:18:48 +0000 (16:18 -0700)]
ARM: dts: msm: Increase USB BAM device address space on msmcobalt

USB BAM device is having 4 pipes. USB BAM global register address
space size is 0x13000, whereas each USB BAM pipe register address
space size is 0x1000. Due to insufficient register address space
mapping, there is unpaging related crash seen while trying to
access USB BAM pipe 0 related register. Fix this issue by
increasing size to 0x17000 (i.e. 0x13000 + 4 * 0x1000).

CRs-Fixed: 1011319
Change-Id: I6654d9eec5a849bcce6d812166d6696347458169
Signed-off-by: Mayank Rana <mrana@codeaurora.org>