Commit 1bf4743f authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Peter Chen

usb: chipidea: imx: Warn if oc polarity isn't specified

The polarity of the over current detection pin isn't configured on i.MX6/7
if it's unspecified in the device tree. So the actual configuration depends
on bootloader behavior which is bad.

So encourage users to fix their device tree by issuing a warning in this
case.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
parent a82bf696
......@@ -148,6 +148,8 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev)
} else if (of_find_property(np, "over-current-active-low", NULL)) {
data->oc_pol_active_low = 1;
data->oc_pol_configured = 1;
} else {
dev_warn(dev, "No over current polarity defined\n");
}
if (of_find_property(np, "external-vbus-divider", NULL))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment