mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
power: supply: qti_battery_charger: allow setting ICL for USB_PD charger
USB driver can request for an ICL override (e.g. 2 mA when the host enters suspend) when the device is connected to the host to a SDP or a port that supports USB_PD. With USB_PD, if PDO 1 has bit 28 set to 1, it advertises that suspend is supported. Hence allow setting ICL for USB_PD charger as well. Change-Id: I5a9eea05c58a7c8140c2910be97788f7f63efb05 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This commit is contained in:
parent
ec2657eb96
commit
3041e580e8
|
|
@ -814,8 +814,9 @@ static int usb_psy_set_icl(struct battery_chg_dev *bcdev, u32 prop_id, int val)
|
|||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
/* Allow this only for SDP and not for other charger types */
|
||||
if (pst->prop[USB_ADAP_TYPE] != POWER_SUPPLY_USB_TYPE_SDP)
|
||||
/* Allow this only for SDP or USB_PD and not for other charger types */
|
||||
if (pst->prop[USB_ADAP_TYPE] != POWER_SUPPLY_USB_TYPE_SDP &&
|
||||
pst->prop[USB_ADAP_TYPE] != POWER_SUPPLY_USB_TYPE_PD)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user