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

Commit 780bbbc8 authored by Guru Das Srinagesh's avatar Guru Das Srinagesh Committed by Harry Yang
Browse files

power: smb5: Support disabling of USB-PD via DT



Add DT property "qcom,usb-pd-disable" to disable USB-PD operation
entirely.

Change-Id: If8f402225b7f51feea87777b62b396a0e6bdc3e2
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent 966277c2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -269,6 +269,12 @@ Charger specific properties:
  Definition: Boolean flag which when present enables hardware-controlled
		operation of HVDCP.

- qcom,usb-pd-disable
  Usage:      optional
  Value type: bool
  Definition: Boolean flag which when present disables USB-PD operation. Not
		applicable for PMI632, where PD is not supported.

=============================================
Second Level Nodes - SMB5 Charger Peripherals
=============================================
+3 −0
Original line number Diff line number Diff line
@@ -327,6 +327,9 @@ static int smb5_parse_dt(struct smb5 *chip)
	chg->sw_jeita_enabled = of_property_read_bool(node,
				"qcom,sw-jeita-enable");

	chg->pd_not_supported = of_property_read_bool(node,
				"qcom,usb-pd-disable");

	rc = of_property_read_u32(node, "qcom,wd-bark-time-secs",
					&chip->dt.wd_bark_time);
	if (rc < 0 || chip->dt.wd_bark_time < MIN_WD_BARK_TIME)