* [PATCH] drivers:usb:fsl: Replace macros with enumerated type
@ 2015-05-25 6:11 Nikhil Badola
2015-05-25 16:16 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Nikhil Badola @ 2015-05-25 6:11 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, Nikhil Badola
Replace macros with enumerated type to represent usb ip controller
version
Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
---
Depends on "drivers: usb :fsl: Add support for USB controller version-2.5"
include/linux/fsl_devices.h | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 2a2f56b..035ead7 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -20,11 +20,6 @@
#define FSL_UTMI_PHY_DLY 10 /*As per P1010RM, delay for UTMI
PHY CLK to become stable - 10ms*/
#define FSL_USB_PHY_CLK_TIMEOUT 10000 /* uSec */
-#define FSL_USB_VER_OLD 0
-#define FSL_USB_VER_1_6 1
-#define FSL_USB_VER_2_2 2
-#define FSL_USB_VER_2_4 3
-#define FSL_USB_VER_2_5 4
#include <linux/types.h>
@@ -52,6 +47,14 @@
*
*/
+enum fsl_usb2_controller_ver {
+ FSL_USB_VER_OLD,
+ FSL_USB_VER_1_6,
+ FSL_USB_VER_2_2,
+ FSL_USB_VER_2_4,
+ FSL_USB_VER_2_5,
+};
+
enum fsl_usb2_operating_modes {
FSL_USB2_MPH_HOST,
FSL_USB2_DR_HOST,
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers:usb:fsl: Replace macros with enumerated type
2015-05-25 6:11 [PATCH] drivers:usb:fsl: Replace macros with enumerated type Nikhil Badola
@ 2015-05-25 16:16 ` Greg KH
2015-05-26 9:10 ` Badola Nikhil
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2015-05-25 16:16 UTC (permalink / raw)
To: Nikhil Badola; +Cc: linux-kernel
On Mon, May 25, 2015 at 11:41:34AM +0530, Nikhil Badola wrote:
> Replace macros with enumerated type to represent usb ip controller
> version
>
> Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
> ---
> Depends on "drivers: usb :fsl: Add support for USB controller version-2.5"
>
> include/linux/fsl_devices.h | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
> index 2a2f56b..035ead7 100644
> --- a/include/linux/fsl_devices.h
> +++ b/include/linux/fsl_devices.h
> @@ -20,11 +20,6 @@
> #define FSL_UTMI_PHY_DLY 10 /*As per P1010RM, delay for UTMI
> PHY CLK to become stable - 10ms*/
> #define FSL_USB_PHY_CLK_TIMEOUT 10000 /* uSec */
> -#define FSL_USB_VER_OLD 0
> -#define FSL_USB_VER_1_6 1
> -#define FSL_USB_VER_2_2 2
> -#define FSL_USB_VER_2_4 3
> -#define FSL_USB_VER_2_5 4
>
> #include <linux/types.h>
>
> @@ -52,6 +47,14 @@
> *
> */
>
> +enum fsl_usb2_controller_ver {
> + FSL_USB_VER_OLD,
> + FSL_USB_VER_1_6,
> + FSL_USB_VER_2_2,
> + FSL_USB_VER_2_4,
> + FSL_USB_VER_2_5,
Don't you need to specify the value here just to be "sure" the compiler
gets it correct, and so that someone knows they can't add a new value in
the middle?
And why didn't you cc: the linux-usb mailing list?
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] drivers:usb:fsl: Replace macros with enumerated type
2015-05-25 16:16 ` Greg KH
@ 2015-05-26 9:10 ` Badola Nikhil
0 siblings, 0 replies; 3+ messages in thread
From: Badola Nikhil @ 2015-05-26 9:10 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Monday, May 25, 2015 9:47 PM
> To: Badola Nikhil-B46172
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] drivers:usb:fsl: Replace macros with enumerated type
>
> On Mon, May 25, 2015 at 11:41:34AM +0530, Nikhil Badola wrote:
> > Replace macros with enumerated type to represent usb ip controller
> > version
> >
> > Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
> > ---
> > Depends on "drivers: usb :fsl: Add support for USB controller version-2.5"
> >
> > include/linux/fsl_devices.h | 13 ++++++++-----
> > 1 file changed, 8 insertions(+), 5 deletions(-)
> >
> > diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
> > index 2a2f56b..035ead7 100644
> > --- a/include/linux/fsl_devices.h
> > +++ b/include/linux/fsl_devices.h
> > @@ -20,11 +20,6 @@
> > #define FSL_UTMI_PHY_DLY 10 /*As per P1010RM, delay for UTMI
> > PHY CLK to become stable - 10ms*/
> > #define FSL_USB_PHY_CLK_TIMEOUT 10000 /* uSec */
> > -#define FSL_USB_VER_OLD 0
> > -#define FSL_USB_VER_1_6 1
> > -#define FSL_USB_VER_2_2 2
> > -#define FSL_USB_VER_2_4 3
> > -#define FSL_USB_VER_2_5 4
> >
> > #include <linux/types.h>
> >
> > @@ -52,6 +47,14 @@
> > *
> > */
> >
> > +enum fsl_usb2_controller_ver {
> > + FSL_USB_VER_OLD,
> > + FSL_USB_VER_1_6,
> > + FSL_USB_VER_2_2,
> > + FSL_USB_VER_2_4,
> > + FSL_USB_VER_2_5,
>
> Don't you need to specify the value here just to be "sure" the compiler gets
> it correct, and so that someone knows they can't add a new value in the
> middle?
Will specify the value in the next patch version
>
> And why didn't you cc: the linux-usb mailing list?
I will cc: linux-usb mailing list while sending all the patches in a patchset
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-26 9:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-25 6:11 [PATCH] drivers:usb:fsl: Replace macros with enumerated type Nikhil Badola
2015-05-25 16:16 ` Greg KH
2015-05-26 9:10 ` Badola Nikhil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).