Re: [PATCH 1/2] USB: OTG Supplement Revision 2.0 updates for header files

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

 



On Fri, Jan 23, 2015 at 02:39:01PM +0800, Macpaul Lin wrote:
> This patch add the definitions for OTG Support Rev 2.0.
> The modification is derived from Pavankumar and Vijayavardhans' previous work.
> 
> Signed-off-by: Macpaul Lin <macpaul@xxxxxxxxx>
> Cc: Pavankumar Kondeti <pkondeti@xxxxxxxxxxxxxx>
> Cc: Vijayavardhan Vennapusa <vvreddy@xxxxxxxxxxxxxx>
> ---
>  include/uapi/linux/usb/ch9.h | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
> index aa33fd1..9fd83d0 100644
> --- a/include/uapi/linux/usb/ch9.h
> +++ b/include/uapi/linux/usb/ch9.h
> @@ -136,6 +136,12 @@
>  #define	TEST_PACKET	4
>  #define	TEST_FORCE_EN	5
>  
> +/* OTG test mode feature bits
> + * See ECN OTG2.0 spec Table 6-8
> + */
> +#define TEST_OTG_SRP_REQD	6
> +#define TEST_OTG_HNP_REQD	7
> +
>  /*
>   * New Feature Selectors as added by USB 3.0
>   * See USB 3.0 spec Table 9-7
> @@ -155,11 +161,19 @@
>  /*
>   * Interface status, Figure 9-5 USB 3.0 spec
>   */
> -#define USB_INTRF_STAT_FUNC_RW_CAP     1
> -#define USB_INTRF_STAT_FUNC_RW         2
> +#define USB_INTRF_STAT_FUNC_RW_CAP	1
> +#define USB_INTRF_STAT_FUNC_RW		2
>  
>  #define USB_ENDPOINT_HALT		0	/* IN/OUT will STALL */
>  
> +/* OTG 2.0 spec 6.2 and 6.3 sections */
> +#define OTG_STATUS_SELECTOR		0xF000
> +#define HOST_REQUEST_FLAG		0
> +#define THOST_REQ_POLL			1500    /* msec (1000 - 2000) */
> +#define OTG_TTST_SUSP			70	/* msec (0 - 100) */
> +
> +#define OTG_TTST_VBUS_OFF		1
> +
>  /* Bit array elements as returned by the USB_REQ_GET_STATUS request. */
>  #define USB_DEV_STAT_U1_ENABLED		2	/* transition into U1 state */
>  #define USB_DEV_STAT_U2_ENABLED		3	/* transition into U2 state */
> @@ -674,6 +688,7 @@ struct usb_otg_descriptor {
>  	__u8  bmAttributes;	/* support for HNP, SRP, etc */
>  } __attribute__ ((packed));
>  
> +#define USB_DT_OTG_SIZE		5
>  /* from usb_otg_descriptor.bmAttributes */
>  #define USB_OTG_SRP		(1 << 0)
>  #define USB_OTG_HNP		(1 << 1)	/* swap host/device roles */
> -- 
> 2.1.0

What needs these defines?  I don't see any kernel code requiring them...
--
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