Hi Dinh,
> From: Dinh Nguyen <[email protected]>
>
> Allow for platforms that have a reset controller driver in place to bring the
> USB IP out of reset.
>
> Signed-off-by: Dinh Nguyen <[email protected]>
> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> index 88629be..6987ef3 100644
> --- a/drivers/usb/dwc2/platform.c
> +++ b/drivers/usb/dwc2/platform.c
> @@ -45,6 +45,7 @@
> #include <linux/platform_device.h>
> #include <linux/phy/phy.h>
> #include <linux/platform_data/s3c-hsotg.h>
>+#include <linux/reset.h>
>
> #include <linux/usb/of.h>
>
> @@ -337,6 +338,17 @@ static int dwc2_lowlevel_hw_init(struct dwc2_hsotg
> *hsotg)
> {
> int i, ret;
>
> + hsotg->reset = devm_reset_control_get(hsotg->dev, "dwc2");
shouldn't this be documented in Documentation/devicetree/bindings/usb/dwc2.txt ?
> + if (IS_ERR(hsotg->reset)) {
> + dev_info(hsotg->dev, "Could not get reset control!\n");
> + if (PTR_ERR(hsotg->reset) == -EPROBE_DEFER)
> + return -EPROBE_DEFER;
If this log message is really necessary, please move it down here and add the
error code into the message.
Thanks
Stefan
> + hsotg->reset = NULL;
> + }
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html