diff mbox series

[next,v7,03/10] usb: add USB_SPEED_SUPER_PLUS

Message ID 1600420213-25974-4-git-send-email-chunfeng.yun@mediatek.com
State Superseded
Delegated to: Marek Vasut
Headers show
Series Add support MediaTek USB3 DRD driver | expand

Commit Message

Chunfeng Yun Sept. 18, 2020, 9:10 a.m. UTC
Add enum USB_SPEED_SUPER_PLUS for USB3.1

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v5~v7: no changes

v4: also add it into speed_names array

v2~v3: no changes
---
 drivers/usb/common/common.c | 1 +
 include/linux/usb/ch9.h     | 1 +
 2 files changed, 2 insertions(+)

Comments

Bin Meng Oct. 13, 2020, 2:19 p.m. UTC | #1
On Fri, Sep 18, 2020 at 5:12 PM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
>
> Add enum USB_SPEED_SUPER_PLUS for USB3.1
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v5~v7: no changes
>
> v4: also add it into speed_names array
>
> v2~v3: no changes
> ---
>  drivers/usb/common/common.c | 1 +
>  include/linux/usb/ch9.h     | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
> index d4ae186..76f5a9c 100644
> --- a/drivers/usb/common/common.c
> +++ b/drivers/usb/common/common.c
> @@ -46,6 +46,7 @@ static const char *const speed_names[] = {
>         [USB_SPEED_HIGH] = "high-speed",
>         [USB_SPEED_WIRELESS] = "wireless",
>         [USB_SPEED_SUPER] = "super-speed",
> +       [USB_SPEED_SUPER_PLUS] = "super-speed-plus",
>  };
>
>  enum usb_device_speed usb_get_maximum_speed(ofnode node)
> diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
> index 989a5fc..7d225ee 100644
> --- a/include/linux/usb/ch9.h
> +++ b/include/linux/usb/ch9.h
> @@ -956,6 +956,7 @@ enum usb_device_speed {
>         USB_SPEED_HIGH,                         /* usb 2.0 */
>         USB_SPEED_WIRELESS,                     /* wireless (usb 2.5) */
>         USB_SPEED_SUPER,                        /* usb 3.0 */
> +       USB_SPEED_SUPER_PLUS,                   /* usb 3.1 */
>  };
>
>  #ifdef __KERNEL__

Should we add usb 3.2 as well?

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Chunfeng Yun Oct. 14, 2020, 2:50 a.m. UTC | #2
On Tue, 2020-10-13 at 22:19 +0800, Bin Meng wrote:
> On Fri, Sep 18, 2020 at 5:12 PM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> >
> > Add enum USB_SPEED_SUPER_PLUS for USB3.1
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> > v5~v7: no changes
> >
> > v4: also add it into speed_names array
> >
> > v2~v3: no changes
> > ---
> >  drivers/usb/common/common.c | 1 +
> >  include/linux/usb/ch9.h     | 1 +
> >  2 files changed, 2 insertions(+)
> >
> > diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
> > index d4ae186..76f5a9c 100644
> > --- a/drivers/usb/common/common.c
> > +++ b/drivers/usb/common/common.c
> > @@ -46,6 +46,7 @@ static const char *const speed_names[] = {
> >         [USB_SPEED_HIGH] = "high-speed",
> >         [USB_SPEED_WIRELESS] = "wireless",
> >         [USB_SPEED_SUPER] = "super-speed",
> > +       [USB_SPEED_SUPER_PLUS] = "super-speed-plus",
> >  };
> >
> >  enum usb_device_speed usb_get_maximum_speed(ofnode node)
> > diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
> > index 989a5fc..7d225ee 100644
> > --- a/include/linux/usb/ch9.h
> > +++ b/include/linux/usb/ch9.h
> > @@ -956,6 +956,7 @@ enum usb_device_speed {
> >         USB_SPEED_HIGH,                         /* usb 2.0 */
> >         USB_SPEED_WIRELESS,                     /* wireless (usb 2.5) */
> >         USB_SPEED_SUPER,                        /* usb 3.0 */
> > +       USB_SPEED_SUPER_PLUS,                   /* usb 3.1 */
> >  };
> >
> >  #ifdef __KERNEL__
> 
> Should we add usb 3.2 as well?
I found the patches to support USB3.2 are still in public review for
Linux kernel, so no need support it currently

> 
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
index d4ae186..76f5a9c 100644
--- a/drivers/usb/common/common.c
+++ b/drivers/usb/common/common.c
@@ -46,6 +46,7 @@  static const char *const speed_names[] = {
 	[USB_SPEED_HIGH] = "high-speed",
 	[USB_SPEED_WIRELESS] = "wireless",
 	[USB_SPEED_SUPER] = "super-speed",
+	[USB_SPEED_SUPER_PLUS] = "super-speed-plus",
 };
 
 enum usb_device_speed usb_get_maximum_speed(ofnode node)
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 989a5fc..7d225ee 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -956,6 +956,7 @@  enum usb_device_speed {
 	USB_SPEED_HIGH,				/* usb 2.0 */
 	USB_SPEED_WIRELESS,			/* wireless (usb 2.5) */
 	USB_SPEED_SUPER,			/* usb 3.0 */
+	USB_SPEED_SUPER_PLUS,			/* usb 3.1 */
 };
 
 #ifdef __KERNEL__