Commit graph

576422 commits

Author SHA1 Message Date
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
Nicholas Troast
9f95ba0718 qpnp-smb2: expose parallel slave percentage via battery psy
Expose the parallel distribution percentage and allow it to be
modified.

Change-Id: I0c9221c6a748aff5e8fbe889316f729155eded3e
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-10-19 16:26:56 -07:00
Nicholas Troast
7aefaf5932 smb-lib: qpnp-smb2: fix input collapse by limiting slave FCC
The parallel charger can collapse the input adapter. Impose a
power limit on the slave charger by limiting the slave FCC.

Change-Id: I02a3dc02911646240a1ecee41584903aab971d81
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-10-19 16:26:52 -07:00
Joonwoo Park
a54b6930c6 sched: don't bias towards waker cluster when sched_boost is set
When sched_boost is set scheduler needs to place task on the least
loaded CPU or performance CPU for better performance.

Change-Id: I41512b4af9cd56712a241c114583b0021d1395d2
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-10-19 13:21:29 -07:00
Skylar Chang
22ec2af43c msm: gsi: add 1ms delay before reset
As part of GSI reset workaround, a 1ms sleep needs to be added
between the first reset command and the second one.

Change-Id: I6131aa646edfd6192e4f0895a7cc97728d6f7536
CRs-Fixed: 1079245
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-10-19 13:02:26 -07:00
Linux Build Service Account
fb1e57936b Merge "media: dvb-core: dvb dmxdev filter callback function changes" 2016-10-19 11:18:18 -07:00
Linux Build Service Account
363b844776 Merge "usb: gadget: f_qc_rndis: Change function name from qcrndis to bam" 2016-10-19 11:18:17 -07:00
Linux Build Service Account
4bd30ab663 Merge "qpnp-smb2: handle DC insertion" 2016-10-19 11:18:16 -07:00
Linux Build Service Account
935f271872 Merge "ASoC: wcd-spi: Add memory read debug support" 2016-10-19 11:18:15 -07:00
Linux Build Service Account
8f2de5c26a Merge "icnss: Switch to CXO before XO disable" 2016-10-19 11:18:14 -07:00
Linux Build Service Account
d5f54abbc5 Merge "icnss: Fix return value for register_driver" 2016-10-19 11:18:13 -07:00
Linux Build Service Account
ab30f41717 Merge "ARM: dts: msm: Add support for CDSP PIL on msmfalcon" 2016-10-19 11:18:13 -07:00
Linux Build Service Account
e4ebd9ed85 Merge "ASoC: wcd-spi: fix the maximum transfer unit setting" 2016-10-19 11:18:12 -07:00
Linux Build Service Account
7a2641a7ce Merge "serial: msm_serial_hs: Move HS UART pins to known state at probe" 2016-10-19 11:18:11 -07:00
Linux Build Service Account
58e7c22e80 Merge "ARM: dts: msm: Move 720p120fps encode to SVS on msmcobalt" 2016-10-19 11:18:11 -07:00
Linux Build Service Account
94191debba Merge "ASoC: wcd9335: Fix race during codec master clock (mclk) enablement" 2016-10-19 11:18:10 -07:00
Linux Build Service Account
2639be09b2 Merge "smb-lib: qpnp-smb2: cleanup parallel charging code" 2016-10-19 11:18:09 -07:00
Linux Build Service Account
ab814b99a0 Merge "input: misc: pat9125: add regulator framework support" 2016-10-19 11:18:09 -07:00
Linux Build Service Account
707cff6b1d Merge "sched: Add multiple load reporting policies for cpu frequency" 2016-10-19 11:18:06 -07:00
Linux Build Service Account
268d4e5d68 Merge "sched: Optimize the next top task search logic upon task migration" 2016-10-19 11:18:06 -07:00
Linux Build Service Account
7f33bef948 Merge "driver: bcl_peripheral: Input correct dmac flush range argument" 2016-10-19 11:18:04 -07:00
Linux Build Service Account
07b2776c8c Merge "msm: ipa: fix reference count in rm" 2016-10-19 11:18:03 -07:00
Linux Build Service Account
407e17bb11 Merge "ARM: dts: msm: add the cma region for venus on msmtriton" 2016-10-19 11:18:02 -07:00
Linux Build Service Account
9a8752a90c Merge "ARM: dts: msm: Enable RPM clock support for MSMfalcon/Triton" 2016-10-19 11:18:01 -07:00
Linux Build Service Account
3946607e62 Merge "msm: ipa3: Do not wait for IPA DMA_TASK H/W ACK for GSI" 2016-10-19 11:18:01 -07:00
Linux Build Service Account
89ea7ae726 Merge "defconfig: msmcortex: Enable early random driver" 2016-10-19 11:17:59 -07:00
Linux Build Service Account
eddeaeab94 Merge "init: Move stack canary initialization after setup_arch" 2016-10-19 11:17:58 -07:00
Linux Build Service Account
778c13d30c Merge "qcom: Update early random APIs to scmv8" 2016-10-19 11:17:58 -07:00
Linux Build Service Account
d12a43a23d Merge "soc: qcom: Add better support for early random numbers" 2016-10-19 11:17:57 -07:00
Linux Build Service Account
a050842b8f Merge "msm: implement ARCH_RANDOM" 2016-10-19 11:17:57 -07:00
Linux Build Service Account
fa8c09029f Merge "Revert "soc: qcom: Listen to SUBSYS_AFTER_SHUTDOWN notification"" 2016-10-19 11:17:56 -07:00
Linux Build Service Account
4f19b2964a Merge "msm: camera: isp: Configure stats framedrop period correctly" 2016-10-19 11:17:55 -07:00
Vidyakumar Athota
e1bdef003e ASoC: wcd934x: fix click and pop in Tx path
Update high pass filter cut off frequency register after
decimator clock enable to reduce click and pop in recording
path.

Change-Id: Idee07f2104911180a9ca60490fe30f628f90b71f
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-10-19 11:15:37 -07:00
Olav Haugan
04daea81fc sched/hmp: Fix range checking for target load
The range check for target load is incorrect. Fix this. This is only a
sanity check to catch badly specified target loads.

Change-Id: Ia90d020f5e0bdf37c600661a1c246dab5b637b3b
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-10-19 10:35:52 -07:00
Jonathan Wicks
16a93fae72 msm: kgsl: Add sysfs control for pwrscale
Add a sysfs entry to enable control of notifications
from pwrscale to devfreq.

Change-Id: Ife0a31e96975239bf4fefd59ac6266568c4db1a5
Signed-off-by: Jonathan Wicks <jwicks@codeaurora.org>
2016-10-19 09:43:53 -06:00
Chandana Kishori Chiluveru
58b8ab6647 usb: gadget: f_qc_rndis: Change function name from qcrndis to bam
bam can represent the transport used for the function. Hence change
the name from qcrndis to bam.

Change-Id: Ie153ae9cc00a72287b10623d63f29c08a1154cb9
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-10-19 15:42:55 +05:30
Sayali Lokhande
b33d825651 ARM: dts: msm: Add sdhc1 support for msmfalcon
Add sdhc1 to enable eMMC for msmfalcon.

Change-Id: Id64f344f4c77749b7d322b31b1557b1cf15965d3
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2016-10-19 12:33:20 +05:30
Udaya Mallavarapu
752a69d018 media: dvb-core: dvb dmxdev filter callback function changes
The demux driver migration from kernel 3.18 to 4.4 added
extra parameter to dmx_ts_cb, dmx_section_cb callback functions
to send demux status to dmxdev filters. Revert back the change
to original prototype.

CRs-Fixed: 1079183
Change-Id: I4bdced9942e6524e8cc21410532fa7231049454f
Signed-off-by: Udaya Mallavarapu <udaym@codeaurora.org>
2016-10-19 12:16:55 +05:30
Gaurav Kohli
a43b1816d7 ARM: dts: msm: Add support for CDSP PIL on msmfalcon
Add support for CDSP PIL which facilitates the loading of CDSP
firmware, authentication and bringing it out of reset.

Change-Id: I46b5da53614bdac740a1c85b0b3072cae32d20f7
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2016-10-19 10:00:47 +05:30
Subbaraman Narayanamurthy
0ba4dcb7dd qpnp-fg-gen3: Backup the learned capacity during capacity learning
When the capacity learning algorithm completes, we store the
learned capacity to BattCapActual word in FG SRAM. Though this
is correct and needed for coulomb counter to operate, value is
not retained across reboot. Backup the learned capacity to a
scratchpad SRAM word (address 74) to overcome this.

Change-Id: I39c257876776a9e9c872add1366569394c49ef01
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-18 20:23:23 -07:00
Olav Haugan
76ac2a2803 sched/core_ctl: Move header file to global location
Move the header file of core control to the standard linux include
directory to allow other entities to include this file.

Change-Id: I2ddb8b3b96063be3c6a6cb6bc333998e007f9de7
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-10-18 18:10:52 -07:00
Bhalchandra Gajare
0565b726e6 ASoC: wcd9335: Fix race during codec master clock (mclk) enablement
It is possible that codec master clock enablement could race from two
different execution contexts, causing the mclk to be not enabled at all.
This will result in failure of use cases that expect the clock to be
present. Fix this issue by making sure the race condition does not
occur during mclk enablement.

bug: b/30983442
Change-Id: Ie254b8876524956b816267eaaed205f65641c000
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-18 16:12:28 -07:00