The regulator-fixed would return -ENOSYS when enabled/disabled,
because this operation is not supported, but this is not an error
e.g. on systems where the VBUS cannot be controlled, so if this
is the error code reported by the regulator core, consider it a
success and continue.
Signed-off-by: Marek Vasut <marex@denx.de>
ret = regulator_set_enable(priv->vbus_supply,
(type == USB_INIT_DEVICE) ?
false : true);
- if (ret) {
+ if (ret && ret != -ENOSYS) {
puts("Error enabling VBUS supply\n");
return ret;
}
ret = regulator_set_enable(priv->vbus_supply,
(type == USB_INIT_DEVICE) ?
false : true);
- if (ret) {
+ if (ret && ret != -ENOSYS) {
puts("Error enabling VBUS supply\n");
return ret;
}