On Tue, Sep 22, 2015 at 03:16:56PM +0200, Mian Yousaf Kaukab wrote: > If dual role configuration is not selected, check and force dr_mode > based on the selected configuration. > > Signed-off-by: Mian Yousaf Kaukab <[email protected]> > Tested-by: Robert Baldyga <[email protected]>
this failed to apply. Please rebase on testing/next
> ---
> drivers/usb/dwc2/platform.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> index 3d1f82d..50a0e70 100644
> --- a/drivers/usb/dwc2/platform.c
> +++ b/drivers/usb/dwc2/platform.c
> @@ -221,6 +221,17 @@ static int dwc2_driver_probe(struct platform_device *dev)
> (unsigned long)res->start, hsotg->regs);
>
> hsotg->dr_mode = of_usb_get_dr_mode(dev->dev.of_node);
> + if (IS_ENABLED(CONFIG_USB_DWC2_HOST) &&
> + hsotg->dr_mode != USB_DR_MODE_HOST) {
> + hsotg->dr_mode = USB_DR_MODE_HOST;
> + dev_warn(hsotg->dev,
> + "Configuration mismatch. Forcing host mode\n");
> + } else if (IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) &&
> + hsotg->dr_mode != USB_DR_MODE_PERIPHERAL) {
> + hsotg->dr_mode = USB_DR_MODE_PERIPHERAL;
> + dev_warn(hsotg->dev,
> + "Configuration mismatch. Forcing peripheral mode\n");
> + }
>
> /*
> * Attempt to find a generic PHY, then look for an old style
> --
> 2.3.3
>
--
balbi
signature.asc
Description: PGP signature
