power: smb5: Fix LPD flag for PMI632

Currently,LPD flag can be set either using DT property or
by default initialization based on PMIC subtype.
However, the DT property value for LPD support overrides
the default initialization.
Fix this by taking a logical OR between the two control
methods.

Change-Id: Ic99980691c59ab8d1f77e0300abb232787597f84
Signed-off-by: Imran Ahmad <imrahm@codeaurora.org>
This commit is contained in:
Imran Ahmad 2020-09-29 18:18:39 +05:30 • committed by Gerrit - the friendly Code Review server
commit 345ccc1d92

View file

@ -449,7 +449,8 @@ static int smb5_parse_dt_misc(struct smb5 *chip, struct device_node *node)
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");
chg->lpd_disabled = chg->lpd_disabled ||
of_property_read_bool(node, "qcom,lpd-disable");
rc = of_property_read_u32(node, "qcom,wd-bark-time-secs",
&chip->dt.wd_bark_time);