Re: [PATCH 04/10] usb: chipidea: udc:driver update for OTG HNP. ^

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

 



Reply-To: 
In-Reply-To: <1389171985-9282-5-git-send-email-B47624@xxxxxxxxxxxxx>

On Wed, Jan 08, 2014 at 05:06:19PM +0800, Li Jun wrote:
> Add b_hnp_enable request handling and enable gadget->is_otg
> 
> Signed-off-by: Li Jun <b47624@xxxxxxxxxxxxx>
> ---
>  drivers/usb/chipidea/udc.c |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index 73a39ef..ccdc277 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -20,6 +20,7 @@
>  #include <linux/pm_runtime.h>
>  #include <linux/usb/ch9.h>
>  #include <linux/usb/gadget.h>
> +#include <linux/usb/otg-fsm.h>
>  #include <linux/usb/chipidea.h>
>  
>  #include "ci.h"
> @@ -1106,6 +1107,14 @@ __acquires(ci->lock)
>  					default:
>  						break;
>  					}
> +					break;
> +				case USB_DEVICE_B_HNP_ENABLE:
> +					if (gadget_is_otg(&ci->gadget)) {
> +						ci->gadget.b_hnp_enable = 1;
> +						err = isr_setup_status_phase(
> +								ci);
> +					}
> +					break;
>  				default:
>  					goto delegate;
>  				}
> @@ -1762,7 +1771,7 @@ static int udc_start(struct ci_hdrc *ci)
>  	ci->gadget.ops          = &usb_gadget_ops;
>  	ci->gadget.speed        = USB_SPEED_UNKNOWN;
>  	ci->gadget.max_speed    = USB_SPEED_HIGH;
> -	ci->gadget.is_otg       = 0;
> +	ci->gadget.is_otg       = ci->is_otg ? 1 : 0;
>  	ci->gadget.name         = ci->platdata->name;
>  
>  	INIT_LIST_HEAD(&ci->gadget.ep_list);
> -- 
> 1.7.8
> 
> 

-- 

Best Regards,
Peter Chen

--
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