diff mbox

[3/5] mmc: sdhi: Add defines for platform irq indexes

Message ID 1313460499-3377-4-git-send-email-horms@verge.net.au (mailing list archive)
State Superseded
Headers show

Commit Message

Simon Horman Aug. 16, 2011, 2:08 a.m. UTC
This is intended to make it easier to correctly
order platform defines in platform data and
the logic that uses them.

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 include/linux/mmc/sh_mobile_sdhi.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Guennadi Liakhovetski Aug. 16, 2011, 7:51 a.m. UTC | #1
On Tue, 16 Aug 2011, Simon Horman wrote:

> This is intended to make it easier to correctly
> order platform defines in platform data and
> the logic that uses them.
> 
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Signed-off-by: Simon Horman <horms@verge.net.au>
> ---
>  include/linux/mmc/sh_mobile_sdhi.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
> index bd50b36..c66c58c 100644
> --- a/include/linux/mmc/sh_mobile_sdhi.h
> +++ b/include/linux/mmc/sh_mobile_sdhi.h
> @@ -3,6 +3,10 @@
>  
>  #include <linux/types.h>
>  
> +#define SH_MOBILE_SDHI_IRQ_SDCARD	0
> +#define SH_MOBILE_SDHI_IRQ_CARD_DETECT	1
> +#define SH_MOBILE_SDHI_IRQ_SDIO		2
> +

An idea: make this an enum, put SH_MOBILE_SDHI_IRQ_NUMBER as a last item 
and use it in sh_mobile_sdhi_remove() as

	for (i = 0; i < SH_MOBILE_SDHI_IRQ_NUMBER; i++) {

? I would also merge it with PATCH 4/5.

>  struct platform_device;
>  struct tmio_mmc_data;
>  
> -- 
> 1.7.5.4

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman Aug. 16, 2011, 8:03 a.m. UTC | #2
On Tue, Aug 16, 2011 at 09:51:00AM +0200, Guennadi Liakhovetski wrote:
> On Tue, 16 Aug 2011, Simon Horman wrote:
> 
> > This is intended to make it easier to correctly
> > order platform defines in platform data and
> > the logic that uses them.
> > 
> > Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > Cc: Magnus Damm <magnus.damm@gmail.com>
> > Cc: Paul Mundt <lethal@linux-sh.org>
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> > ---
> >  include/linux/mmc/sh_mobile_sdhi.h |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
> > index bd50b36..c66c58c 100644
> > --- a/include/linux/mmc/sh_mobile_sdhi.h
> > +++ b/include/linux/mmc/sh_mobile_sdhi.h
> > @@ -3,6 +3,10 @@
> >  
> >  #include <linux/types.h>
> >  
> > +#define SH_MOBILE_SDHI_IRQ_SDCARD	0
> > +#define SH_MOBILE_SDHI_IRQ_CARD_DETECT	1
> > +#define SH_MOBILE_SDHI_IRQ_SDIO		2
> > +
> 
> An idea: make this an enum, put SH_MOBILE_SDHI_IRQ_NUMBER as a last item 
> and use it in sh_mobile_sdhi_remove() as
> 
> 	for (i = 0; i < SH_MOBILE_SDHI_IRQ_NUMBER; i++) {

Sure.

> ? I would also merge it with PATCH 4/5.

I prefer to keep it separate as 5/5 also depends on this change
and that is a change for a different maintainer.

> >  struct platform_device;
> >  struct tmio_mmc_data;
> >  
> > -- 
> > 1.7.5.4
> 
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guennadi Liakhovetski Aug. 16, 2011, 8:34 a.m. UTC | #3
On Tue, 16 Aug 2011, Simon Horman wrote:

> On Tue, Aug 16, 2011 at 09:51:00AM +0200, Guennadi Liakhovetski wrote:
> > On Tue, 16 Aug 2011, Simon Horman wrote:
> > 
> > > This is intended to make it easier to correctly
> > > order platform defines in platform data and
> > > the logic that uses them.
> > > 
> > > Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > Cc: Magnus Damm <magnus.damm@gmail.com>
> > > Cc: Paul Mundt <lethal@linux-sh.org>
> > > Signed-off-by: Simon Horman <horms@verge.net.au>
> > > ---
> > >  include/linux/mmc/sh_mobile_sdhi.h |    4 ++++
> > >  1 files changed, 4 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
> > > index bd50b36..c66c58c 100644
> > > --- a/include/linux/mmc/sh_mobile_sdhi.h
> > > +++ b/include/linux/mmc/sh_mobile_sdhi.h
> > > @@ -3,6 +3,10 @@
> > >  
> > >  #include <linux/types.h>
> > >  
> > > +#define SH_MOBILE_SDHI_IRQ_SDCARD	0
> > > +#define SH_MOBILE_SDHI_IRQ_CARD_DETECT	1
> > > +#define SH_MOBILE_SDHI_IRQ_SDIO		2
> > > +
> > 
> > An idea: make this an enum, put SH_MOBILE_SDHI_IRQ_NUMBER as a last item 
> > and use it in sh_mobile_sdhi_remove() as
> > 
> > 	for (i = 0; i < SH_MOBILE_SDHI_IRQ_NUMBER; i++) {
> 
> Sure.
> 
> > ? I would also merge it with PATCH 4/5.
> 
> I prefer to keep it separate as 5/5 also depends on this change
> and that is a change for a different maintainer.

Yes, 5/5 anyway depends on 3/5 in your case and they are for different 
maintainers (or need an ack), and, in fact, 5/5 can also be extended to 
more mach-shmobile boards, and that is not urgent, it can be done any time 
later. Whereas 3/5 and 4/5 anyway go via one tree and I see no advantage 
in splitting them. But it's up to you in the end - not a big deal.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman Aug. 16, 2011, 10:12 a.m. UTC | #4
On Tue, Aug 16, 2011 at 10:34:22AM +0200, Guennadi Liakhovetski wrote:
> On Tue, 16 Aug 2011, Simon Horman wrote:
> 
> > On Tue, Aug 16, 2011 at 09:51:00AM +0200, Guennadi Liakhovetski wrote:
> > > On Tue, 16 Aug 2011, Simon Horman wrote:
> > > 
> > > > This is intended to make it easier to correctly
> > > > order platform defines in platform data and
> > > > the logic that uses them.
> > > > 
> > > > Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > > Cc: Magnus Damm <magnus.damm@gmail.com>
> > > > Cc: Paul Mundt <lethal@linux-sh.org>
> > > > Signed-off-by: Simon Horman <horms@verge.net.au>
> > > > ---
> > > >  include/linux/mmc/sh_mobile_sdhi.h |    4 ++++
> > > >  1 files changed, 4 insertions(+), 0 deletions(-)
> > > > 
> > > > diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
> > > > index bd50b36..c66c58c 100644
> > > > --- a/include/linux/mmc/sh_mobile_sdhi.h
> > > > +++ b/include/linux/mmc/sh_mobile_sdhi.h
> > > > @@ -3,6 +3,10 @@
> > > >  
> > > >  #include <linux/types.h>
> > > >  
> > > > +#define SH_MOBILE_SDHI_IRQ_SDCARD	0
> > > > +#define SH_MOBILE_SDHI_IRQ_CARD_DETECT	1
> > > > +#define SH_MOBILE_SDHI_IRQ_SDIO		2
> > > > +
> > > 
> > > An idea: make this an enum, put SH_MOBILE_SDHI_IRQ_NUMBER as a last item 
> > > and use it in sh_mobile_sdhi_remove() as
> > > 
> > > 	for (i = 0; i < SH_MOBILE_SDHI_IRQ_NUMBER; i++) {
> > 
> > Sure.
> > 
> > > ? I would also merge it with PATCH 4/5.
> > 
> > I prefer to keep it separate as 5/5 also depends on this change
> > and that is a change for a different maintainer.
> 
> Yes, 5/5 anyway depends on 3/5 in your case and they are for different 
> maintainers (or need an ack), and, in fact, 5/5 can also be extended to 
> more mach-shmobile boards, and that is not urgent, it can be done any time 
> later. Whereas 3/5 and 4/5 anyway go via one tree and I see no advantage 
> in splitting them. But it's up to you in the end - not a big deal.

I reconsidered and have decided to merge 3/5 and 4/5 as you suggest.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
index bd50b36..c66c58c 100644
--- a/include/linux/mmc/sh_mobile_sdhi.h
+++ b/include/linux/mmc/sh_mobile_sdhi.h
@@ -3,6 +3,10 @@ 
 
 #include <linux/types.h>
 
+#define SH_MOBILE_SDHI_IRQ_SDCARD	0
+#define SH_MOBILE_SDHI_IRQ_CARD_DETECT	1
+#define SH_MOBILE_SDHI_IRQ_SDIO		2
+
 struct platform_device;
 struct tmio_mmc_data;