public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ISP1760: Add flags for interrupt polarity and edge/level trigger
@ 2011-12-13  9:33 Alexander Stein
  2011-12-13 18:00 ` [PATCH] USB: " Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Stein @ 2011-12-13  9:33 UTC (permalink / raw)
  To: Joachim Foerster, Paul Gortmaker, Grant Likely
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Alexander Stein

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
 drivers/usb/host/isp1760-if.c |    4 ++++
 include/linux/usb/isp1760.h   |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index a7dc1e1..0ef9867 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -388,6 +388,10 @@ static int __devinit isp1760_plat_probe(struct platform_device *pdev)
 			devflags |= ISP1760_FLAG_DACK_POL_HIGH;
 		if (priv->dreq_polarity_high)
 			devflags |= ISP1760_FLAG_DREQ_POL_HIGH;
+		if (priv->interrupt_polarity_high)
+			devflags |= ISP1760_FLAG_INTR_POL_HIGH;
+		if (priv->interrupt_edge_triggered)
+			devflags |= ISP1760_FLAG_INTR_EDGE_TRIG;
 	}
 
 	hcd = isp1760_register(mem_res->start, mem_size, irq_res->start,
diff --git a/include/linux/usb/isp1760.h b/include/linux/usb/isp1760.h
index de7de53..c5edbc8 100644
--- a/include/linux/usb/isp1760.h
+++ b/include/linux/usb/isp1760.h
@@ -13,6 +13,8 @@ struct isp1760_platform_data {
 	unsigned analog_oc:1;			/* Analog overcurrent */
 	unsigned dack_polarity_high:1;		/* DACK active high */
 	unsigned dreq_polarity_high:1;		/* DREQ active high */
+	unsigned interrupt_polarity_high:1;
+	unsigned interrupt_edge_triggered:1;
 };
 
 #endif /* __LINUX_USB_ISP1760_H */
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] USB: ISP1760: Add flags for interrupt polarity and edge/level trigger
  2011-12-13  9:33 [PATCH] ISP1760: Add flags for interrupt polarity and edge/level trigger Alexander Stein
@ 2011-12-13 18:00 ` Greg KH
  2011-12-14  7:57   ` Alexander Stein
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2011-12-13 18:00 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Joachim Foerster, Paul Gortmaker, Grant Likely,
	Greg Kroah-Hartman, linux-usb, linux-kernel

On Tue, Dec 13, 2011 at 10:33:13AM +0100, Alexander Stein wrote:
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
>  drivers/usb/host/isp1760-if.c |    4 ++++
>  include/linux/usb/isp1760.h   |    2 ++
>  2 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
> index a7dc1e1..0ef9867 100644
> --- a/drivers/usb/host/isp1760-if.c
> +++ b/drivers/usb/host/isp1760-if.c
> @@ -388,6 +388,10 @@ static int __devinit isp1760_plat_probe(struct platform_device *pdev)
>  			devflags |= ISP1760_FLAG_DACK_POL_HIGH;
>  		if (priv->dreq_polarity_high)
>  			devflags |= ISP1760_FLAG_DREQ_POL_HIGH;
> +		if (priv->interrupt_polarity_high)
> +			devflags |= ISP1760_FLAG_INTR_POL_HIGH;
> +		if (priv->interrupt_edge_triggered)
> +			devflags |= ISP1760_FLAG_INTR_EDGE_TRIG;
>  	}
>  
>  	hcd = isp1760_register(mem_res->start, mem_size, irq_res->start,
> diff --git a/include/linux/usb/isp1760.h b/include/linux/usb/isp1760.h
> index de7de53..c5edbc8 100644
> --- a/include/linux/usb/isp1760.h
> +++ b/include/linux/usb/isp1760.h
> @@ -13,6 +13,8 @@ struct isp1760_platform_data {
>  	unsigned analog_oc:1;			/* Analog overcurrent */
>  	unsigned dack_polarity_high:1;		/* DACK active high */
>  	unsigned dreq_polarity_high:1;		/* DREQ active high */
> +	unsigned interrupt_polarity_high:1;
> +	unsigned interrupt_edge_triggered:1;

So you added these, and you check them, but who sets them?  What is the
point of this patch at this point in time?

confused,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] USB: ISP1760: Add flags for interrupt polarity and edge/level trigger
  2011-12-13 18:00 ` [PATCH] USB: " Greg KH
@ 2011-12-14  7:57   ` Alexander Stein
  2011-12-14 16:10     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Stein @ 2011-12-14  7:57 UTC (permalink / raw)
  To: Greg KH
  Cc: Joachim Foerster, Paul Gortmaker, Grant Likely,
	Greg Kroah-Hartman, linux-usb, linux-kernel

On Tuesday 13 December 2011 10:00:10 Greg KH wrote:
> On Tue, Dec 13, 2011 at 10:33:13AM +0100, Alexander Stein wrote:
> > Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> > ---
> > 
> >  drivers/usb/host/isp1760-if.c |    4 ++++
> >  include/linux/usb/isp1760.h   |    2 ++
> >  2 files changed, 6 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/usb/host/isp1760-if.c
> > b/drivers/usb/host/isp1760-if.c index a7dc1e1..0ef9867 100644
> > --- a/drivers/usb/host/isp1760-if.c
> > +++ b/drivers/usb/host/isp1760-if.c
> > @@ -388,6 +388,10 @@ static int __devinit isp1760_plat_probe(struct
> > platform_device *pdev)> 
> >  			devflags |= ISP1760_FLAG_DACK_POL_HIGH;
> >  		
> >  		if (priv->dreq_polarity_high)
> >  		
> >  			devflags |= ISP1760_FLAG_DREQ_POL_HIGH;
> > 
> > +		if (priv->interrupt_polarity_high)
> > +			devflags |= ISP1760_FLAG_INTR_POL_HIGH;
> > +		if (priv->interrupt_edge_triggered)
> > +			devflags |= ISP1760_FLAG_INTR_EDGE_TRIG;
> > 
> >  	}
> >  	
> >  	hcd = isp1760_register(mem_res->start, mem_size, irq_res->start,
> > 
> > diff --git a/include/linux/usb/isp1760.h b/include/linux/usb/isp1760.h
> > index de7de53..c5edbc8 100644
> > --- a/include/linux/usb/isp1760.h
> > +++ b/include/linux/usb/isp1760.h
> > @@ -13,6 +13,8 @@ struct isp1760_platform_data {
> > 
> >  	unsigned analog_oc:1;			/* Analog overcurrent */
> >  	unsigned dack_polarity_high:1;		/* DACK active high */
> >  	unsigned dreq_polarity_high:1;		/* DREQ active high */
> > 
> > +	unsigned interrupt_polarity_high:1;
> > +	unsigned interrupt_edge_triggered:1;
> 
> So you added these, and you check them, but who sets them?  What is the
> point of this patch at this point in time?

These platform data bits are set by board configurations, which is completly 
optional. So currently maybe noone sets/use it, but in future someone may need 
it. Also dreq_polarity_high is also there and I only found board files setting 
them to 0... So why not add the feature bits too?

Regards,
Alexander


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] USB: ISP1760: Add flags for interrupt polarity and edge/level trigger
  2011-12-14  7:57   ` Alexander Stein
@ 2011-12-14 16:10     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2011-12-14 16:10 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Joachim Foerster, Paul Gortmaker, Grant Likely,
	Greg Kroah-Hartman, linux-usb, linux-kernel

On Wed, Dec 14, 2011 at 08:57:33AM +0100, Alexander Stein wrote:
> On Tuesday 13 December 2011 10:00:10 Greg KH wrote:
> > On Tue, Dec 13, 2011 at 10:33:13AM +0100, Alexander Stein wrote:
> > > Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> > > ---
> > > 
> > >  drivers/usb/host/isp1760-if.c |    4 ++++
> > >  include/linux/usb/isp1760.h   |    2 ++
> > >  2 files changed, 6 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/drivers/usb/host/isp1760-if.c
> > > b/drivers/usb/host/isp1760-if.c index a7dc1e1..0ef9867 100644
> > > --- a/drivers/usb/host/isp1760-if.c
> > > +++ b/drivers/usb/host/isp1760-if.c
> > > @@ -388,6 +388,10 @@ static int __devinit isp1760_plat_probe(struct
> > > platform_device *pdev)> 
> > >  			devflags |= ISP1760_FLAG_DACK_POL_HIGH;
> > >  		
> > >  		if (priv->dreq_polarity_high)
> > >  		
> > >  			devflags |= ISP1760_FLAG_DREQ_POL_HIGH;
> > > 
> > > +		if (priv->interrupt_polarity_high)
> > > +			devflags |= ISP1760_FLAG_INTR_POL_HIGH;
> > > +		if (priv->interrupt_edge_triggered)
> > > +			devflags |= ISP1760_FLAG_INTR_EDGE_TRIG;
> > > 
> > >  	}
> > >  	
> > >  	hcd = isp1760_register(mem_res->start, mem_size, irq_res->start,
> > > 
> > > diff --git a/include/linux/usb/isp1760.h b/include/linux/usb/isp1760.h
> > > index de7de53..c5edbc8 100644
> > > --- a/include/linux/usb/isp1760.h
> > > +++ b/include/linux/usb/isp1760.h
> > > @@ -13,6 +13,8 @@ struct isp1760_platform_data {
> > > 
> > >  	unsigned analog_oc:1;			/* Analog overcurrent */
> > >  	unsigned dack_polarity_high:1;		/* DACK active high */
> > >  	unsigned dreq_polarity_high:1;		/* DREQ active high */
> > > 
> > > +	unsigned interrupt_polarity_high:1;
> > > +	unsigned interrupt_edge_triggered:1;
> > 
> > So you added these, and you check them, but who sets them?  What is the
> > point of this patch at this point in time?
> 
> These platform data bits are set by board configurations, which is completly 
> optional. So currently maybe noone sets/use it, but in future someone may need 
> it. Also dreq_polarity_high is also there and I only found board files setting 
> them to 0... So why not add the feature bits too?

Because we don't add "features" to the kernel that are not used, that's
just unneeded cruft.

If you have a real need and an actual user of these flags, then I will
be glad to accept this patch.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-14 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-13  9:33 [PATCH] ISP1760: Add flags for interrupt polarity and edge/level trigger Alexander Stein
2011-12-13 18:00 ` [PATCH] USB: " Greg KH
2011-12-14  7:57   ` Alexander Stein
2011-12-14 16:10     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox