Add support for USBIN-USBIN configuration based parallel charging. This
involves splitting Input Current Limit(ICL) between the main and the
parallel charger, ICL re-split is done when the settled AICL of the main
charger changes by 300mA.
Change-Id: I5b916f1503a2267ca1e73b24096cb60a304e3c19
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Re-organize SMB1351 charger driver to support new parallel charger
architecture.
- New property "POWER_SUPPLY_PROP_PARALLEL_MODE" exposes the parallel
charger configuration, in this case it is USBIN-USBIN configuration.
- Property "POWER_SUPPLY_CHARGE_TYPE" is added to report the current
charge type and is also used for parallel charger chip detection.
Change-Id: I05692b34daef244f89a365e03043ae2ffe42d9da
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Add support to detect presence of parallel charger chip by
requesting a register read via power_supply framework.
If parallel chip is absent then disable parallel charger.
Change-Id: Icfa4a774d344fde4c7d1f4ced772a707be85020d
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Add support to delay parallel enable until HVDCP detection
and authentication completes. This involves adding a new voter
which enables parallel charger under following condition:
For DCP: enable parallel path after HVDCP detection
times out.
For HVDCP: enable parallel path after HVDCP authentication
completes.
Change-Id: Ib1c740eee5c721a0c267f6a9bc924c58af4b2c1e
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Currently we have only one path - the pd active setting path - where
ICL_OVERRIDE gets set.
With the upcoming changes to manage connector temperature
mitigation and usbin-usbin parallel charger, the ICL_OVERRIDE is needed
to be set from these usecases.
So instead of creating a voter for ICL_OVERRIDE and putting the onus
on callsites to set it before calling their icl settings, it is best
to handle it in icl_callback.
Update the icl_callback to manage override and suspend in this way.
- Presence of voter signifies that the driver wants to enforce a
value different than the hw default. Force an icl override.
- No voters signifies that the hw defaults are good, undo an override.
- For USB types that command a limit aka SDP and CDP, never override.
- never suspend if there are no clients.
Change-Id: I3ed01237b0bb2c028bec572d2905cabb03ce50a3
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Cleanup the code such that when PD is activated, DCP_VOTER
and USB_PSY_VOTER (the voter for SDP and CDP types) are disabled.
While at it DCP_VOTER is intended to enforce a different value
from the hw defaults. Set it only when type is confirmed DCP.
Also to handle the situation when the PD profile allows to suspend
based on the phy, use a different voter PD_SUSPEND_SUPPORTED_VOTER
to activate that situation.
Change-Id: I0cb1a0aad9c94fdd233ec3103779e1a13449472e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
When there is Modem WDOG bite, Q6 will not get chance to reset
the hardware and if shutdown is called as part of PD down
notification then freeing buffers already submitted to hardware
may cause exceptions as hardware may try to access DDR location
which is already freed.
Fix the issue by delaying the shutdown till FW ready happens and
hardware is reset to clean state this way buffers are freed after
hardware is in reset state.
CRs-fixed: 2000709
Change-Id: Iacea5e8b712dd4ca310e5b502e43f4beb99f6981
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
Add more refined states with service notifier notification for clients
to be able to distinguish between different error scenarios.
CRs-Fixed: 2004229
Change-Id: Ibae1f2b0ba03f8cdcb14398d7d35b007fac1a150
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
Since max_interrupters flag includes primary interrupter as well,
update the bound check when this flag is being used for
secondary event ring clean-up/allocation.
Change-Id: I044c5a89fe17779eb847981cbf27e99b97e37d80
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Add alias name for the secondary GPU temperature sensor in MSM8998. This
alias information will be used by thermal-engine.
Change-Id: I4d3400efef8886153018435468526f88418ee0a0
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Add a spinlock to protect the state transitions in rndis ipa
driver.
Change-Id: Ia5eab252d9a53e6a2f4db07912967a5f466982a6
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Acked-by: Javid Mohammed <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
Do not consider debug file system init failure as
functional failure.
Modify the code to proceed further
driver initialization.
Change-Id: I821af8970b6c2ced55d6464b8a7b56a458fa7d79
Acked-by: Javid Mohammed <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
While initializing the SMMU with DOMAIN_ATTR_ATOMIC attribute
iommu driver always vote for aggre2_noc_clk during suspend mode
which result into power penalty. To resolve this issue avoid
configuring DOMAIN_ATTR_ATOMIC attribute in S1_BYPASS mode.
CRs-fixed: 2004562
Change-Id: Ic5d4b2864f58098fd29da48e5f977434e356b1e0
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>