RE: [PATCH 1/1] usb: dwc3: gadget: Set the OTG flag in dwc3 gadget driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Balbi,
    Thanks for the quick response and value comments. 
    I agree with your comments and will upload one new patch soon.
    Currently, this patch is the one confirmed ready for upstream, I will try to find if there are any other patches available for OTG certification.
    I only own part of the certification task inside the project.
Thanks!

-----Original Message-----
From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-owner@xxxxxxxxxxxxxxx] On Behalf Of Felipe Balbi
Sent: Wednesday, January 13, 2016 3:46 PM
To: Jianqiang Tang <jianqiang.tang.kernel@xxxxxxxxx>; Felipe Balbi <balbi@xxxxxx>; linux-usb@xxxxxxxxxxxxxxx
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>; Tang, Jianqiang <jianqiang.tang@xxxxxxxxx>
Subject: Re: [PATCH 1/1] usb: dwc3: gadget: Set the OTG flag in dwc3 gadget driver.


Hi,

Jianqiang Tang <jianqiang.tang.kernel@xxxxxxxxx> writes:
> Set the otg flag during dwc3 gadget init function for ceritification
                                                        certification

> test requirement.
> We must set this otg flag for ceritification test in order to be able
                                certification 

> to return OTG descriptor during enumeration.
>
> Signed-off-by: Jianqiang Tang <jianqiang.tang@xxxxxxxxx>
> ---
>  drivers/usb/dwc3/gadget.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c 
> index a58376f..72dc8dc 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -2750,6 +2750,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
>  	dwc->gadget.name		= "dwc3-gadget";
>  
>  	/*
> +	 * Set the otg flag if Controller in OTG mode for Ceritification Test
> +	 */

comment is pointless (it's clear what code is doing below) and also you're using multi-line comment style for a single line comment. Oh, and you also have the same typo ;-)

> +	if (dwc->dr_mode == USB_DR_MODE_OTG)
> +		dwc->gadget.is_otg = 1;

following is more succint:

	dwc->gadget.is_otg = dwc->dr_mode == USB_DR_MODE_OTG;

ps: which other patches do you have to get OTG certification ? Do you want, perhaps, to send those upstream ?

--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux