Commit graph

586895 commits

Author SHA1 Message Date
Ashay Jaiswal
7ddef0d5e4 qpnp: smb-lib: move usb_icl_votable to battery library
Move usb_icl_votable creation and it's callback in the
battery.c file, in preparation for an upcoming change where
usb_icl_votable callback will be able to
disable parallel charger when a low input current
request is set.

The new callback uses CURRENT_MAX property to be set on main
psy to set the ICL limit of primary charger.

The limit setting code in main charger path where the votable
call resides currently relies a lot on client being present or not.
Since the votable is being moved away, it won't have information
about the client. So use the current parameter of INT_MAX to
indicate no clients present.

Also it could be that main psy is not instantiated by the time first
icl vote comes in. Ensure that we rerun_election on usb_icl_votable
the instant main psy is seen.

CRs-Fixed: 2014572
Change-Id: Ie449af086ed9218b40ea83158b69e8f8e73edda3
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-05 10:02:46 +05:30
Ashay Jaiswal
ef45c30bc8 qcom: smb2: disable h/w autonomous parallel control
The charger driver ensures that parallel charging remains
disabled as long as AICL is below threshole (1400mA) using
it's software voting mechanism(USBIN_I_VOTER), thus disable
hardware's autonomous control of input current based parallel
charging.

CRs-Fixed: 2014572
Change-Id: Ie991e0c1d16d63b6def6fb3379019114d20d60f7
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-05 10:02:39 +05:30
Ashay Jaiswal
f521128115 qcom: smb-lib: add delay for parallel enable
Currently, the driver enables parallel charger as soon
as a favorable charger is seen. This causes many, unnecessary
splits of AICL results as AICL runs for the first time. Besides
the detection logic could further update charger type and rerun
AICL.

Its best to simply delay enabling parallel charger for 30 seconds.
This ensures that type detection and its AICL run to completion and
parallel charging starts with a stable AICL result.

To realize this
- implement a workqueue which will be scheduled/cancelled 30 seconds
  later when vbus plugin interrupt happens.
- The workqueue signifies that 30 seconds have elapsed and parallel
  charging should be enabled by PL_DELAY_VOTER.
- remove PL_DELAY_HDVP_VOTER since PL_DELAY_VOTER will
  ensure parallel gets enabled after 30 seconds of insertion.
- unvote from PL_DELAY_VOTER only when the typeC removal event happens.
  A PR_SWAP during a sink session will keep the PL_DELAY_VOTER's vote
  enabled, we expect CHG_STATE_VOTER to disable parallel since device will
  be supplying VBUS and not charging the battery. This also means that
  when another PR_SWAP happens and the device starts operating in sink mode
  again, PL_DELAY_VOTER's vote will remain enabled and parallel charging
  would begin when other conditions become favorable. IOW PL_DELAY_VOTER
  tracks 30 second after physical insertion and remains unaffected by
  PR_SWAPs.

CRs-Fixed: 2014572
Change-Id: Ibe10768e61c6d2661bc8946f7f6b9be06f0c28e6
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-05 10:02:29 +05:30
Ashay Jaiswal
38939b5e92 power: smb-lib: update USBIN_V_VOTER usage
The current code enables parallel charging if a high voltage
charger is seen (QC or PD) or a high current charger is seen.

This means that parallel charger could remain enabled when PD
transitions its voltage even though it has reduced the current
to 500mA. It is desirable to disable parallel charging during
such voltage transition.

So prepare for this change by first ensuring that only a QC
charger votes for USBIN_V_VOTER. The PD charger, even while
operating at higher voltages will need to depend on USBIN_I_VOTER,
just like a simple DCP charger, to enable parallel charger.

CRs-Fixed: 2014572
Change-Id: I03dfcff44b30b06918ebf176043873fb141f485f
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-04-05 10:01:08 +05:30
Linux Build Service Account
26db194916 Merge "defconfig: msm: Enable CONFIG_UID_CPUTIME flag" 2017-04-04 20:07:31 -07:00
Linux Build Service Account
617c68c493 Merge "mmc: core: prefer SDR50 mode over DDR50 for SD card" 2017-04-04 20:07:31 -07:00
Linux Build Service Account
b742552ee2 Merge "ASoC: msm: qdsp6v2: Add support for 7 channel mapping" 2017-04-04 20:07:30 -07:00
Linux Build Service Account
0136ee2462 Merge "mmc: core: Increase the runtime PM reference count in try_claim_host" 2017-04-04 20:07:29 -07:00
Linux Build Service Account
7ee506fbe9 Merge "msm: kgsl: Remove incorrect check to cap AB vote to IB vote" 2017-04-04 20:07:28 -07:00
Linux Build Service Account
23b57af0a3 Merge "msm: gsi: continue probe on ipc log failure" 2017-04-04 20:07:27 -07:00
Linux Build Service Account
c0dabb7776 Merge "msm: kgsl: Disable memory retention for core clock before entering SLUMBER" 2017-04-04 20:07:27 -07:00
Linux Build Service Account
8c6ab57348 Merge "mmc: core: Remove unused variable cached_ext_csd" 2017-04-04 20:07:26 -07:00
Linux Build Service Account
54b3c86290 Merge "ARM: dts: msm: Add dt support for platforms with audio over USBC" 2017-04-04 20:07:25 -07:00
Linux Build Service Account
8df5bc2d7e Merge "block: Make del_gendisk() safer for disks without queues" 2017-04-04 20:07:24 -07:00
Linux Build Service Account
0802e8d62f Merge "scsi: ufs: scale up the gear in 2 steps" 2017-04-04 20:07:23 -07:00
Linux Build Service Account
c43712c4db Merge "drivers/base: cpu: Add node for core control isolation" 2017-04-04 20:07:22 -07:00
Linux Build Service Account
fb11ce47de Merge "ASoC: msm: qdsp6v2: add route for TERT_TDM_RX_4 playback" 2017-04-04 20:07:21 -07:00
Tony Truong
23764aabce msm: pcie: support PCIe MSI QGIC with stage 1 SMMU enabled
When Stage 1 SMMU is enabled, the QGIC doorbell address needs to
be mapped or else there will be a translation fault when an endpoint
tries to trigger an interrupt via MSI. PCIe host driver will map
this address on behalf of the client.

Change-Id: I7fdbe62daeb5dbecc459e4d9bc7832785f5b9fb7
Signed-off-by: Tony Truong <truong@codeaurora.org>
2017-04-04 17:26:19 -07:00
Tony Truong
f83b25b95d msm: pcie: update teardown sequence for PCIe MSI interrupt
Update the teardown sequence for PCIe MSI to support
multiple endpoints.

Change-Id: I1fbdb840bf3677e30d4d27a50503c5cc70ece272
Signed-off-by: Tony Truong <truong@codeaurora.org>
2017-04-04 12:53:35 -07:00
Linux Build Service Account
28e87e960f Merge "pinctrl: lpi: Avoid initial SSR notifications at bootup" 2017-04-04 12:10:28 -07:00
Linux Build Service Account
ede6277d8b Merge "qcom: smb-lib: disable VCONN operations for micro USB mode" 2017-04-04 12:10:27 -07:00
Linux Build Service Account
48912ce0ae Merge "wil6210: remove HALP voting in debugfs ioblob" 2017-04-04 12:10:26 -07:00
Linux Build Service Account
835bd1f84a Merge "ASoC: msm: support 5 and 7 channel for TDM hw param" 2017-04-04 12:10:25 -07:00
Linux Build Service Account
025198c382 Merge "ASoC: msm: Fix mute on speaker in VoWLAN calls" 2017-04-04 12:10:23 -07:00
Rohit Kumar
e90af32a6f ASoC: msm: qdsp6v2: Add support for 7 channel mapping
Add support for 7 channel mapping in asm to support
7 channel playback.

CRs-Fixed: 1114041
Change-Id: I0daf306d4495d3966406d05fc6328b2956a2d11f
Signed-off-by: Rohit Kumar <rohitkr@codeaurora.org>
2017-04-04 11:53:31 -07:00
Veerabhadrarao Badiganti
26e54a44f6 mmc: core: Increase the runtime PM reference count in try_claim_host
Runtime PM reference count is being increased in mmc_claim_host() and
is decreased in mmc_release_host(). This reference count is kept
during the complete cycle of a claim -> release host.

Same need to be done even in mmc_try_claim_host() as well. Increase
the runtime PM reference count by invoking pm_runtime_get_sync() from
mmc_try_claim_host() upon first successful claim.

Without this change the runtime PM reference count goes for a toss
since count is not getting incremented in mmc_try_claim_host() but is
getting decremented in mmc_release_host().

Change-Id: I77836875b4700a4bf3dbde2bf1abdf2ad36c4cac
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-04-04 17:00:02 +05:30
Linux Build Service Account
4c332132fc Merge "ASoC: mbhc: Modify special headset detection" 2017-04-04 03:08:17 -07:00
Linux Build Service Account
c5537150f9 Merge "ASoC: msm-lsm-client: cleanup ioctl functions" 2017-04-04 03:08:16 -07:00
Linux Build Service Account
4fbb03737f Merge "ASoC: wcd934x: Fix sequence for efuse sensing" 2017-04-04 03:08:15 -07:00
Linux Build Service Account
f0677827e0 Merge "drivers: soc: apr: remove GLINK_TX_REQ_INTENT flag in apr write" 2017-04-04 03:08:14 -07:00
Linux Build Service Account
ac9a1d1c26 Merge "ARM: dts: msm: add support for secondary TDM on msm8996 adp/cdp" 2017-04-04 03:08:13 -07:00
Linux Build Service Account
044432bd42 Merge "ARM: dts: msm: add support for secondary MI2S on msm8996 adp/cdp" 2017-04-04 03:08:13 -07:00
Linux Build Service Account
fb45b11026 Merge "msm: mdss: Validating data values before passing on as operand" 2017-04-04 03:08:11 -07:00
Linux Build Service Account
e62dc3df39 Merge "msm: thermal-dev: Protect IOCTL from race condition" 2017-04-04 03:08:10 -07:00
Linux Build Service Account
be929723bd Merge "msm: ipa3: fix Q6 statuses exception path" 2017-04-04 03:08:09 -07:00
Linux Build Service Account
c07dd44bb6 Merge "mhi: mhi_uci: redesign mhi_uci driver" 2017-04-04 03:08:08 -07:00
Linux Build Service Account
a2440d7fa4 Merge "mhi: core: add support for subsystem restart and shutdown" 2017-04-04 03:08:07 -07:00
Linux Build Service Account
123020a779 Merge "usb: dwc3: Use high priority worker as bottom half handler" 2017-04-04 03:08:04 -07:00
Linux Build Service Account
cd2915d470 Merge "ath10k: add qmi service for snoc wlan enable and disable" 2017-04-04 03:08:02 -07:00
Linux Build Service Account
d8d96f71f3 Merge "soc: qcom: service-locator: Return in case of no matching domains found" 2017-04-04 03:08:01 -07:00
Linux Build Service Account
90a7e429e6 Merge "clk: msm: clock-gcc-8998: Update parent src for qup_spi/uart_apps clocks" 2017-04-04 03:08:01 -07:00
Linux Build Service Account
7d517eef8f Merge "CHROMIUM: usb: gadget: configfs: Fix KASAN use-after-free" 2017-04-04 03:08:00 -07:00
Jan Kara
70c8d6d632 block: Make del_gendisk() safer for disks without queues
commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()"
added disk->queue dereference to del_gendisk(). Although del_gendisk()
is not supposed to be called without disk->queue valid and
blk_unregister_queue() warns in that case, this change will make it oops
instead. Return to the old more robust behavior of just warning when
del_gendisk() gets called for gendisk with disk->queue being NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Tested-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Git-commit: 90f16fddcc2802726142b8386c65ccb89f044613
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Change-Id: I5ae377b2ace64d7a133979e656beb0eba45abc09
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-04-04 14:12:56 +05:30
Deepak Kumar
c1de946ab2 msm: kgsl: Disable memory retention for core clock before entering SLUMBER
Memory retention is needed only for NAP state but not for SLUMBER state.
Disables memory retention for core clock before entering SLUMBER to save
power.

Change-Id: I64a5ecec6fc90d662da8d9d793860e56b0c6473f
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2017-04-04 14:09:52 +05:30
Sayali Lokhande
f7c5a2bbb2 mmc: core: Remove unused variable cached_ext_csd
There is one variable defined in mmc_card, which
is not being used anywhere. Also it is wrongly
being freed from mmc_remove_card and causing
"double kfree" related issues.
To handle this, remove unused cached_ext_csd variable.

Change-Id: I75f376ec787a46a2a16c38f88f444bd8ff9c86c4
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2017-04-04 14:08:50 +05:30
Ashay Jaiswal
7174c1763f qcom: smb-lib: disable VCONN operations for micro USB mode
VCONN is not supported in micro USB mode, thus disable
registration and operations on VCONN regulator.

While at it, disable TRY.SOURCE while disabling typeC.

CRs-Fixed: 2027962
Change-Id: Ib92564160c48f52d77815b646b4cdd5c7d23e7b3
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-04-04 10:58:52 +05:30
Sabyasachi Singh
393a3e68a6 drivers/base: cpu: Add node for core control isolation
This cpu node can be used to check the isolated cores
which are made unavailable for scheduler and exempted
from waking up on interrupts or from running timers at
the given time based on the load. All the runnable tasks,
timers and hrtimers should have migrated to other online
running cores.

Change-Id: I32fed6cc131288b9c318f0dea65e2e59396225ca
Signed-off-by: Sabyasachi Singh <sssingh@codeaurora.org>
2017-04-03 16:17:39 -07:00
Skylar Chang
ad7c98a12f msm: ipa: continue probe on ipc log failure
Do not fail IPA probe function if IPC logging is not available.

Change-Id: I1ac1765e1df8cb1ea5f19a7ec639b307d867a28a
CRs-Fixed: 2028149
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2017-04-03 16:07:22 -07:00
Prasad Sodagudi
cba41ec800 defconfig: msm: Enable CONFIG_UID_CPUTIME flag
Enable flag CONFIG_UID_CPUTIME to have uid_cputime stats.

Change-Id: Iee6ed05b4cb4443ec1fc347b186153c416d3f136
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2017-04-03 15:58:11 -07:00
Abhijeet Dharmapurikar
cdd3e6733f smb138x: support usbin-usbin with external rsense
Currently smb138x only support usbin-usbin parallel architecture
where the battery current from the parallel charger flows through
the batfet of the main charger.

Support configurations where there is remote sensing or an external
rsense where the current from parallel charger directly goes to the
battery.

Change-Id: I5506190d83436bfaea3b6c98b1b311746cf85071
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-03 15:31:22 -07:00