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

Commit 5ced6752 authored by Umang Agrawal's avatar Umang Agrawal
Browse files

power: smb5: Fix PD capability configuration



Currently, PD capability support can be configured either using
DT property or by default initialization based on PMIC subtype.
However, the DT property value for PD support overrides the default
initialization, rendering the default configuration ineffective.
Fix this by taking a logical OR between the two control methods.

Change-Id: I5d47f80e3b20471ec94a8ea5bddaafee10935952
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
parent 534b13a8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2018 The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -407,8 +407,8 @@ 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");
	chg->pd_not_supported = chg->pd_not_supported ||
			of_property_read_bool(node, "qcom,usb-pd-disable");

	chg->lpd_disabled = of_property_read_bool(node, "qcom,lpd-disable");