- Two fixes for the qcom-pmic button driver
This commit is contained in:
Tom Rini 2024-02-22 11:34:59 -05:00
commit 5e4a0c7f4a

View file

@ -86,7 +86,7 @@ static int qcom_pwrkey_probe(struct udevice *dev)
}
ret = pmic_reg_read(priv->pmic, priv->base + REG_SUBTYPE);
if ((ret & 0x7) == 0) {
if (ret < 0 || (ret & 0x7) == 0) {
printf("%s: unexpected PMCI function subtype %d\n", dev->name, ret);
return -ENXIO;
}
@ -133,7 +133,7 @@ static int button_qcom_pmic_bind(struct udevice *parent)
} else if (NODE_IS_RESIN(node)) {
uc_plat->label = "vol_down";
} else {
printf("Unknown button node '%s' should be 'pwrkey' or 'resin'\n",
debug("Unknown button node '%s' should be 'pwrkey' or 'resin'\n",
ofnode_get_name(node));
device_unbind(dev);
}