Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9ee3549 authored by Zhenhua Huang's avatar Zhenhua Huang Committed by Gerrit - the friendly Code Review server
Browse files

power: smb358-charger: Modify api to notify charger type



Use power_supply_set_supply_type to notify the charger type
to the USB driver. The charger detection is done by SMB358
instead of the USB driver.

CRs-fixed: 770166
Change-Id: I0f0854892695abd5f1ed714e7bc4d5e959c286b3
Signed-off-by: default avatarZhenhua Huang <zhenhuah@codeaurora.org>
parent ffdd7a0f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1269,7 +1269,7 @@ static int apsd_complete(struct smb358_charger *chip, u8 status)
	dev_dbg(chip->dev, "APSD complete. USB type detected=%d chg_present=%d",
						type, chip->chg_present);

	power_supply_set_charge_type(chip->usb_psy, type);
	power_supply_set_supply_type(chip->usb_psy, type);

	 /* SMB is now done sampling the D+/D- lines, indicate USB driver */
	dev_dbg(chip->dev, "%s updating usb_psy present=%d", __func__,