Commit graph

576674 commits

Author SHA1 Message Date
Abhijeet Dharmapurikar
bc2dcbfae6 smb1351-charger: Fix possible Null pointer dereference
The adc notification callback assumes that it will end up selecting
the correct state. However, if the parameters are outside the
expected values, the code could end up dereferencing a null pointer.

Fix this by returning before that pointer is dereferenced.

Change-Id: I42642b475a1032c3a7395336381f3bd6c1396dde
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-10-20 17:26:45 -07:00
Deepak Katragadda
bfda35b58b clk: msm: clock: Remove controlling some graphics clocks in Linux
The gcc_gpu_bimc_gfx_src_clk and gcc_gpu_snoc_dvm_gfx_clk need
to left at their default state of ON. Remove controlling them
from the linux clock driver to avoid disabling them during
late_init.

Change-Id: If3d964840362b6147ba7c9e26c4a3f5d20e5a557
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-10-20 16:50:12 -07:00
Sameer Thalappil
f868b8ff64 icnss: Unregister the driver operations when probe fails
When WLAN driver initialization fails unregister the driver operations.

CRs-Fixed: 1077763
Change-Id: I7c7c3f98f9685711268e221fc83f2c831b02a294
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2016-10-20 16:38:31 -07:00
Josh Kirsch
9d52733dd1 ASoC: msm: Add routes for all TDM modes
Add routes for TDM PRI, SEC, TERT and QUAT.

CRs-fixed: 1077766
Change-Id: Ie60587aa4a4a48bae70ceac4e053e63fc29f516a
Signed-off-by: Josh Kirsch <jkirsch@codeaurora.org>
2016-10-20 16:02:55 -07:00
Satyajit Desai
2e131bfcaf coresight: tmc: avoid null pointer dereference
Add NULL pointer checks to avoid kernel NULL pointer dereference.

Change-Id: I06426109ab39d33e2b11514082c0bc989c4c8167
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
2016-10-20 15:07:51 -07:00
Benjamin Chan
c77c8b03bd msm: mdss: Correct settings when on/off happens in dest-scaler
Destination scaler can be turned off within each display commit IOCTL.
When it is disabled, the mixer dimension must be reset to match the
panel configuration. It is also required to update the destination
scaler block when there is a ON/OFF transition because all HW setting is
gone after such power event. Power event includes general suspend
resume, FB driver shutdown and reload, and auto clock gating.

CRs-Fixed: 1077684
Change-Id: I340f778583bb63d6436c4ef8f51ead77a2871625
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2016-10-20 16:56:28 -04:00
Liam Mark
2fc4031194 iommu/arm-smmu: on domain destroy invlidate domain cfg
Invalidate the domain cfg when destroying the domain
otherwise this can cause issues on subsequent attaches.
For example if the cfb cbndx is not cleared then a new
context won't get assigned to the domain.

Change-Id: If576c6c8a7da90c4ce3f1061df4b3ba0dce495e1
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2016-10-20 13:50:45 -07:00
Benjamin Chan
c2f50e72dd msm: mdss: Avoid adaptive variable refresh during dynaminc FPS
Both dynamic FPS (DFPS) and adaptive variable refresh (AVR) depend
and modify the programmable fetch. During DFPS update period, which
is between 2 VSYNC, it is necessary to disable the AVR during this
period, otherwise it will cause the timing engine hangs.

CRs-Fixed: 1073650
Change-Id: I2836ef5b7f37f627a32a0b4332dc299a60012704
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2016-10-20 16:25:21 -04:00
Patrick Daly
98de7b7b66 iommu: arm-smmu: Fix a possible null pointer dereference
Reported by static analysis tools. generic_device_group() may return
NULL on an error case.

Change-Id: I33e8e859e99d4f7c4616aeee1da8214497e30625
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-10-20 13:21:18 -07:00
Osvaldo Banuelos
1376100dd3 ARM: dts: msm: Update VDD_APC CPR RO scaling factors for msmcobalt v2
Update the VDD_APC0 and VDD_APC1 CPR RO scaling factors
for msmcobalt v2 to match the latest hardware characterization
guidelines.

CRs-Fixed: 1080409
Change-Id: I8250304e918f55d233e9b3f01c57f297f73e74ba
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-10-20 12:26:58 -07:00
Linux Build Service Account
8456550a58 Merge "defconfig: msm: avoid compilation of MDSS DP driver for 32-bit msmfalcon" 2016-10-20 12:04:31 -07:00
Linux Build Service Account
bef88789db Merge "msm: kgsl: Add sysfs control for pwrscale" 2016-10-20 12:04:30 -07:00
Linux Build Service Account
0b45c6b4a8 Merge "ASoC: wcd934x: fix click and pop in Tx path" 2016-10-20 12:04:29 -07:00
Linux Build Service Account
9584adf8b5 Merge "sched: don't bias towards waker cluster when sched_boost is set" 2016-10-20 12:04:28 -07:00
Subbaraman Narayanamurthy
a53c420c5d qpnp-fg-gen3: update the FCC unit while notifying charger
Charger driver expects the constant_charge_current_max property
in microunits. Update it.

Change-Id: I1b9117edb6c2206c09deb083529479a3ccc4618d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-20 12:04:02 -07:00
Karthikeyan Ramasubramanian
4c65e88972 soc: qcom: glink_spi_xprt: Add support for WDSP SSR
Handle WDSP_EVENT_PRE_SHUTDOWN event to indicate link down event to G-Link
core and the clients of G-Link. Handle WDSP_EVENT_POST_BOOTUP event to
indicate link up event.

CRs-Fixed: 1080354
Change-Id: I12c04ceb7af51cc5d2f0c79b524ef783dc5f749e
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-10-20 12:37:41 -06:00
Phani Kumar Uppalapati
ece0ce10f6 ASoC: wcd934X: Update TX gain correctly after decimator enable
Gain for TX decimator block needs to be set after the
corresponding decimator is enabled. Otherwise, gain will
not take affect. Apply the gain by reading from regmap cache
to the codec decimator hardware after decimator is enabled.

CRs-Fixed: 1079227
Change-Id: If56c84007f4dae2ff8f424b576756ee5906c24d4
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-10-20 11:24:33 -07:00
Phani Kumar Uppalapati
a67770e1b9 ASoC: wcd9335: Update TX gain correctly after decimator enable
Gain for TX decimator block needs to be set after the
corresponding decimator is enabled. Otherwise, gain will
not take affect. Apply the gain by reading from regmap cache
to the codec decimator hardware after decimator is enabled.

CRs-fixed: 982473
Change-Id: Ib2d189b56e58b038a343fc974e6e3b8ef29f982d
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-10-20 11:21:12 -07:00
Shantanu Jain
c92d56ce7c input: touchscreen: Add force fw_update support via sysfs entry
Add sysfs entry for force fw_update support in Goodix
driver.
Change the usage of kstrtoul to sscanf in driver to avoid
portability issues.

Change-Id: I147a3e465170dda7af415ade29c04257d9b11a6b
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-20 04:46:36 -07:00
Shantanu Jain
52bf9de85b input: touchscreen: Add firmware upgrade via sysfs entry
Add sysfs entry for firmware upgrade support in Goodix
driver.

Change-Id: If71d4020223547e0db425c9fd37819c6166efcab
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-20 04:46:27 -07:00
Shantanu Jain
0647a86f8f input: touchscreen: Add debugfs entries for GTP controller
Add debugfs entries for address and data to read the registers
of Goodix controller.

Change-Id: I6543d523e39771615d0e1b684780141e108a2aa4
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-20 17:11:18 +05:30
Linux Build Service Account
1ff56658f3 Merge "ARM: dts: msm: Add sound card entry for msmcobalt QVR" 2016-10-20 03:33:15 -07:00
Linux Build Service Account
e9a744d743 Merge "ARM: dts: msm: Add support for Venus PIL on msmtriton" 2016-10-20 03:33:15 -07:00
Linux Build Service Account
6128ed042e Merge "clk: qcom: Update the GPU PLL configuration to 800MHz" 2016-10-20 03:33:14 -07:00
Linux Build Service Account
d3ac4bf6d2 Merge "qpnp-fg-gen3: notify charger with float voltage and FCC" 2016-10-20 03:33:11 -07:00
Linux Build Service Account
058ab0e221 Merge "qpnp-smb2: support setting FCC and float voltage in battery power supply" 2016-10-20 03:33:07 -07:00
Linux Build Service Account
cfe0e092bc Merge "ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7" 2016-10-20 03:33:07 -07:00
Padmanabhan Komanduru
d3c76b29e6 defconfig: msm: avoid compilation of MDSS DP driver for 32-bit msmfalcon
The MDSS DP driver has compilation issues on msmfalcon 32-bit builds.
Remove config for the driver to skip compilation till the relevant
issues are resolved.

Change-Id: I8b4d464c793fd943abca2b9041f5751abc9ed22b
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2016-10-20 15:53:29 +05:30
Meng Wang
814a661b46 ARM: dts: msm: Add sound card entry for msmcobalt QVR
msmcobalt QVR has different hardware design with MTP.
Add sound card entry for msmcobalt QVR to enable wsa,
earpiece and microphones.

CRs-Fixed: 1078551
Change-Id: Ic55c44de74e537463a218619861f28c1e6eb66c1
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2016-10-20 15:26:55 +08:00
Srinivas Ramana
a0a267ebc1 ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7
If the bootloader uses the long descriptor format and jumps to
kernel decompressor code, TTBCR may not be in a right state.
Before enabling the MMU, it is required to clear the TTBCR.PD0
field to use TTBR0 for translation table walks.

The commit dbece45894 ("ARM: 7501/1: decompressor:
reset ttbcr for VMSA ARMv7 cores") does the reset of TTBCR.N, but
doesn't consider all the bits for the size of TTBCR.N.

Clear TTBCR.PD0 field and reset all the three bits of TTBCR.N to
indicate the use of TTBR0 and the correct base address width.

Change-Id: Ib497ef7ecdee6c517205ec76724283d4cbd89bdc
Fixes: dbece45894 ("ARM: 7501/1: decompressor: reset ttbcr for VMSA ARMv7 cores")
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: 117e5e9c4cfcb7628f08de074fbfefec1bb678b7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
2016-10-20 12:13:01 +05:30
Taniya Das
aa66bb7cf8 clk: qcom: Update the GPU PLL configuration to 800MHz
The GPU PLL initial configuration is modified to 800MHz and also update the
RCG to be able to support force enable/disable for gfx3d_clk_src.

Change-Id: I8e6d7dba762b678070d66e291347af2cdf804ae5
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-10-20 10:33:59 +05:30
Gaurav Kohli
b82776198b ARM: dts: msm: Add support for Venus PIL on msmtriton
Add support for Venus PIL which facilitates the loading of venus
firmware, authentication and bringing it out of reset.

Change-Id: I3cdef3870dfd88562f3435d678698e3a906ae673
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2016-10-19 21:36:43 -07:00
Linux Build Service Account
297ba5f877 Merge "power_supply: Add PE_START property" 2016-10-19 19:11:52 -07:00
Linux Build Service Account
f0a36b8c0a Merge "qpnp-smb2: Fix LIMITED reporting" 2016-10-19 19:11:51 -07:00
Linux Build Service Account
36e81b3db2 Merge "qcom-charger: smblib: change secure address threshold" 2016-10-19 19:11:51 -07:00
Linux Build Service Account
9f0f93b36c Merge "msm: gsi: add 1ms delay before reset" 2016-10-19 19:11:50 -07:00
Linux Build Service Account
24aeef9a54 Merge "ARM: dts: msm: Add sdhc1 support for msmfalcon" 2016-10-19 19:11:49 -07:00
Linux Build Service Account
3e7ad9dfd4 Merge "sched/hmp: Fix range checking for target load" 2016-10-19 19:11:49 -07:00
Linux Build Service Account
0b44d7b07c Merge "sound: usb: Increase maximum transfer buffer limit" 2016-10-19 19:11:48 -07:00
Linux Build Service Account
dbe25cadf6 Merge "clk: msm: clock-osm: Update droop timers" 2016-10-19 19:11:46 -07:00
Rajakumar Govindaram
28826cff10 msm: camera: cpp: Validate frame message before manipulating it.
CPP frame message is used to send all frame data
to Microcontroller. It is sent every frame. CPP kernel
driver has to add information to it before transfer it.
The message has to be validated before manipulations.
If it is not valid the message and corresponding frame
are discarded.

b/30074605
CRs-Fixed: 1049826

Change-Id: I3e11ca7f6df4bb0d928512f81f3e3dc40fed791a
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
2016-10-19 18:47:07 -07:00
Subbaraman Narayanamurthy
897fcd87a5 qpnp-fg-gen3: notify charger with float voltage and FCC
Whenever the battery profile is loaded, notify charger SW with
float voltage and FCC obtained from the battery profile.

Change-Id: I0419b34fde9d74460b849ee8a7ef7e2cdf5592d2
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-19 16:27:11 -07:00
Harry Yang
8a09bace07 qpnp-smb2: support setting FCC and float voltage in battery power supply
Fast charge current (FCC) and float voltage are parameters that
are battery specific and needs to be set based on the profile
detected by Fuel Gauge driver. Expose the following properties
from battery power supply so that FG can set them.

- POWER_SUPPLY_PROP_VOLTAGE_MAX
- POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX

Change-Id: I72465484b154b1a758285d58906ce7661a246767
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-19 16:27:10 -07:00
Harry Yang
757155c6d6 qcom-charger: smb2: disable EN_TRY_SINK_MODE for PD
Try.SNK is not permitted in PD per spec. Disable it while
pd_active is true.

Change-Id: I90891232d37b95f011b3f2d5278f0fd0f4c9eb71
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-10-19 16:27:09 -07:00
Abhijeet Dharmapurikar
2c903a2fbb qpnp-smb2: implement PE_START property
The policy engine needs to be informed that its time to start
its activities when APSD results are available and/or PD_ALLOWED
is decided. USB type property shouldn't change after that.

Since HVDCP_TIMEOUT_VOTER is the last one to cast its allow vote
in the sequence, use it to reflect the PE_START property.

While at it since PE_START property is returned assuming an atomic
context, the read of PD_ALLOWED could be moved to its sleepable
variants. This aids in keeping the policy engine code simple and also
assures race free code.

Change-Id: Ib98ac10d87200a2fd5492e27399f696f2468eba6
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-10-19 16:27:08 -07:00
Jack Pham
f2449fb61a usb: pd: Clear PD_IN_HARD_RESET in PE_SNK_TRANSITION_TO_DEFAULT
Make sure to properly clear the PD_IN_HARD_RESET property upon
reaching the SNK_Transition_to_default state to ensure that the
charger driver is notified that hard reset has completed. Move
the clearing of pd->hard_reset flag here as well for clarity.

Also clear the pd->in_pr_swap flag when initiating or receiving
hard reset signal as that should promptly abort any PR swap
operation in progress.

Change-Id: I967e3841af614ecd2129bf60dc08a1b19731c4e3
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-19 16:27:07 -07:00
Jack Pham
7ae4a1711e usb: pd: Start state machine when PE_START is true
Support the new POWER_SUPPLY_PROP_PE_START property which
indicates when the policy engine state machine can begin.
This helps to simplify the psy_changed() routine as we can
now rely on this property to indicate that PROP_TYPEC_MODE
and PROP_TYPE are already settled. The state machine work
can now simply begin when seeing a change in TYPEC_MODE.

This replaces the previous use of PROP_PD_ALLOWED which prior
to commit 18da08334e ("usb: pd: Handle PD_ALLOWED within
state machine") was intended to be a marker to start up
the policy engine but now simply indicates whether or not to
start PD comms. We can now move reading of this property to
usbpd_set_state() as it is now only needed locally in the
SNK_STARTUP handling.

Change-Id: Ia0b9e5b011ae72e1afcaf5109b8253d124afc021
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-19 16:27:06 -07:00
Abhijeet Dharmapurikar
cb6c743a06 power_supply: Add PE_START property
This property will be used to indicate to the policy engine that it
should start its activities.

Change-Id: I9deb48f7bff71b022c5899e6eff7617526d02324
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-10-19 16:27:04 -07:00
Abhijeet Dharmapurikar
712057c95d qpnp-smb2: Fix LIMITED reporting
A merge conflict resolution caused a break statement to be dropped in
the case block for reporting input_current_limited property.

Fix this.

Change-Id: Ic5c9626628f05f3167f9f8d0b78b04b83446f413
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-10-19 16:27:03 -07:00
Harry Yang
fa2d8c0cfa qcom-charger: smblib: change secure address threshold
Correct the secure address threshold to 0x0A since Misc peripheral has
secure registers starting as early as 0x0A

CRs-Fixed: 1048242
Change-Id: Id7ec03919e2fd08540cd7e677bf5e4048d73c23d
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-10-19 16:27:02 -07:00