linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/4] usb: otg: twl4030: move to request_threaded_irq
@ 2009-12-28 11:02 Felipe Balbi
  2009-12-28 11:02 ` [PATCH 2/4] input: misc: " Felipe Balbi
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Felipe Balbi @ 2009-12-28 11:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Andrew Morton, Felipe Balbi, Greg Kroah-Hartman, linux-usb

move to request_threaded_irq() on twl4030 children.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>

---

resending because it wasn't applied before

drivers/usb/otg/twl4030-usb.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index bd9883f..36bcd5f 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -576,14 +576,6 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
 	struct twl4030_usb *twl = _twl;
 	int status;
 
-#ifdef CONFIG_LOCKDEP
-	/* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
-	 * we don't want and can't tolerate.  Although it might be
-	 * friendlier not to borrow this thread context...
-	 */
-	local_irq_enable();
-#endif
-
 	status = twl4030_usb_linkstat(twl);
 	if (status != USB_LINK_UNKNOWN) {
 
@@ -702,7 +694,7 @@ static int __devinit twl4030_usb_probe(struct platform_device *pdev)
 	 * need both handles, otherwise just one suffices.
 	 */
 	twl->irq_enabled = true;
-	status = request_irq(twl->irq, twl4030_usb_irq,
+	status = request_threaded_irq(twl->irq, NULL, twl4030_usb_irq,
 			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
 			"twl4030_usb", twl);
 	if (status < 0) {

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

* [PATCH 2/4] input: misc: twl4030: move to request_threaded_irq
  2009-12-28 11:02 [PATCH 4/4] usb: otg: twl4030: move to request_threaded_irq Felipe Balbi
@ 2009-12-28 11:02 ` Felipe Balbi
  2009-12-28 11:02 ` [PATCH 1/4] input: keyboard: " Felipe Balbi
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Felipe Balbi @ 2009-12-28 11:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Andrew Morton, Felipe Balbi, Dmitry Torokhov

move to request_threaded_irq() on twl4030 children.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>

---

resending because it wasn't applied before

drivers/input/misc/twl4030-pwrbutton.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index f5fc997..cd47d9e 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -39,16 +39,6 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
 	int err;
 	u8 value;
 
-#ifdef CONFIG_LOCKDEP
-	/* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
-	 * we don't want and can't tolerate since this is a threaded
-	 * IRQ and can sleep due to the i2c reads it has to issue.
-	 * Although it might be friendlier not to borrow this thread
-	 * context...
-	 */
-	local_irq_enable();
-#endif
-
 	err = twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value,
 				  STS_HW_CONDITIONS);
 	if (!err)  {
@@ -80,7 +70,7 @@ static int __devinit twl4030_pwrbutton_probe(struct platform_device *pdev)
 	pwr->phys = "twl4030_pwrbutton/input0";
 	pwr->dev.parent = &pdev->dev;
 
-	err = request_irq(irq, powerbutton_irq,
+	err = request_threaded_irq(irq, NULL, powerbutton_irq,
 			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
 			"twl4030_pwrbutton", pwr);
 	if (err < 0) {

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

* [PATCH 1/4] input: keyboard: twl4030: move to request_threaded_irq
  2009-12-28 11:02 [PATCH 4/4] usb: otg: twl4030: move to request_threaded_irq Felipe Balbi
  2009-12-28 11:02 ` [PATCH 2/4] input: misc: " Felipe Balbi
@ 2009-12-28 11:02 ` Felipe Balbi
  2010-01-02  2:43   ` Dmitry Torokhov
  2009-12-28 11:02 ` [PATCH 3/4] rtc: " Felipe Balbi
  2009-12-28 11:02 ` mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t Felipe Balbi
  3 siblings, 1 reply; 9+ messages in thread
From: Felipe Balbi @ 2009-12-28 11:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Andrew Morton, Felipe Balbi, Dmitry Torokhov

move to request_threaded_irq() on twl4030 children.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>

---

resending because it wasn't applied before

drivers/input/keyboard/twl4030_keypad.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
index 9a2977c..753a693 100644
--- a/drivers/input/keyboard/twl4030_keypad.c
+++ b/drivers/input/keyboard/twl4030_keypad.c
@@ -253,14 +253,6 @@ static irqreturn_t do_kp_irq(int irq, void *_kp)
 	u8 reg;
 	int ret;
 
-#ifdef CONFIG_LOCKDEP
-	/* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
-	 * we don't want and can't tolerate.  Although it might be
-	 * friendlier not to borrow this thread context...
-	 */
-	local_irq_enable();
-#endif
-
 	/* Read & Clear TWL4030 pending interrupt */
 	ret = twl4030_kpread(kp, &reg, KEYP_ISR1, 1);
 
@@ -403,7 +395,8 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev)
 	 *
 	 * NOTE:  we assume this host is wired to TWL4040 INT1, not INT2 ...
 	 */
-	error = request_irq(kp->irq, do_kp_irq, 0, pdev->name, kp);
+	error = request_threaded_irq(kp->irq, NULL, do_kp_irq,
+			0, pdev->name, kp);
 	if (error) {
 		dev_info(kp->dbg_dev, "request_irq failed for irq no=%d\n",
 			kp->irq);

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

* [PATCH 3/4] rtc: twl4030: move to request_threaded_irq
  2009-12-28 11:02 [PATCH 4/4] usb: otg: twl4030: move to request_threaded_irq Felipe Balbi
  2009-12-28 11:02 ` [PATCH 2/4] input: misc: " Felipe Balbi
  2009-12-28 11:02 ` [PATCH 1/4] input: keyboard: " Felipe Balbi
@ 2009-12-28 11:02 ` Felipe Balbi
  2009-12-28 12:29   ` Alessandro Zummo
  2009-12-28 11:02 ` mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t Felipe Balbi
  3 siblings, 1 reply; 9+ messages in thread
From: Felipe Balbi @ 2009-12-28 11:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Andrew Morton, Felipe Balbi, Alessandro Zummo

move to request_threaded_irq() on twl4030 children.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>

---

resending because it wasn't applied before

drivers/rtc/rtc-twl4030.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/drivers/rtc/rtc-twl4030.c b/drivers/rtc/rtc-twl4030.c
index 9c8c70c..46bc9c1 100644
--- a/drivers/rtc/rtc-twl4030.c
+++ b/drivers/rtc/rtc-twl4030.c
@@ -325,14 +325,6 @@ static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc)
 	int res;
 	u8 rd_reg;
 
-#ifdef CONFIG_LOCKDEP
-	/* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
-	 * we don't want and can't tolerate.  Although it might be
-	 * friendlier not to borrow this thread context...
-	 */
-	local_irq_enable();
-#endif
-
 	res = twl4030_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG);
 	if (res)
 		goto out;
@@ -424,7 +416,7 @@ static int __devinit twl4030_rtc_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto out1;
 
-	ret = request_irq(irq, twl4030_rtc_interrupt,
+	ret = request_threaded_irq(irq, NULL, twl4030_rtc_interrupt,
 				IRQF_TRIGGER_RISING,
 				dev_name(&rtc->dev), rtc);
 	if (ret < 0) {

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

* mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t
  2009-12-28 11:02 [PATCH 4/4] usb: otg: twl4030: move to request_threaded_irq Felipe Balbi
                   ` (2 preceding siblings ...)
  2009-12-28 11:02 ` [PATCH 3/4] rtc: " Felipe Balbi
@ 2009-12-28 11:02 ` Felipe Balbi
  2009-12-28 20:01   ` Tony Lindgren
  3 siblings, 1 reply; 9+ messages in thread
From: Felipe Balbi @ 2009-12-28 11:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Andrew Morton, Felipe Balbi, Tony Lindgren, linux-omap

commit 239007b8440abff689632f50cdf0f2b9e895b534 converted
the spinlock_t to raw_spinlock_t. Unfortunately twl4030-irq
was left aside on the conversion.

Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>

---

resending because it wasn't applied before


 drivers/mfd/twl4030-irq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 20d29ba..9df9a5a 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -568,12 +568,12 @@ static void twl4030_sih_do_edge(struct work_struct *work)
 
 		bytes[byte] &= ~(0x03 << off);
 
-		spin_lock_irq(&d->lock);
+		raw_spin_lock_irq(&d->lock);
 		if (d->status & IRQ_TYPE_EDGE_RISING)
 			bytes[byte] |= BIT(off + 1);
 		if (d->status & IRQ_TYPE_EDGE_FALLING)
 			bytes[byte] |= BIT(off + 0);
-		spin_unlock_irq(&d->lock);
+		raw_spin_unlock_irq(&d->lock);
 
 		edge_change &= ~BIT(i);
 	}

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

* Re: [PATCH 3/4] rtc: twl4030: move to request_threaded_irq
  2009-12-28 11:02 ` [PATCH 3/4] rtc: " Felipe Balbi
@ 2009-12-28 12:29   ` Alessandro Zummo
  0 siblings, 0 replies; 9+ messages in thread
From: Alessandro Zummo @ 2009-12-28 12:29 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Linux Kernel Mailing List, Andrew Morton, Felipe Balbi

On Mon, 28 Dec 2009 13:02:51 +0200
Felipe Balbi <felipe.balbi@nokia.com> wrote:

> move to request_threaded_irq() on twl4030 children.
> 
> Cc: Alessandro Zummo <a.zummo@towertech.it>
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>

 Acked-by: Alessandro Zummo <a.zummo@towertech.it>

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


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

* Re: mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t
  2009-12-28 11:02 ` mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t Felipe Balbi
@ 2009-12-28 20:01   ` Tony Lindgren
  2010-01-05 19:34     ` Samuel Ortiz
  0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2009-12-28 20:01 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Linux Kernel Mailing List, Andrew Morton, linux-omap, Samuel Ortiz

* Felipe Balbi <felipe.balbi@nokia.com> [091228 03:04]:
> commit 239007b8440abff689632f50cdf0f2b9e895b534 converted
> the spinlock_t to raw_spinlock_t. Unfortunately twl4030-irq
> was left aside on the conversion.
> 
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-omap@vger.kernel.org
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> 
> ---
> 
> resending because it wasn't applied before

This should go via Samuel as it's MFD related.

Acked-by: Tony Lindgren <tony@atomide.com>

 
> 
>  drivers/mfd/twl4030-irq.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
> index 20d29ba..9df9a5a 100644
> --- a/drivers/mfd/twl4030-irq.c
> +++ b/drivers/mfd/twl4030-irq.c
> @@ -568,12 +568,12 @@ static void twl4030_sih_do_edge(struct work_struct *work)
>  
>  		bytes[byte] &= ~(0x03 << off);
>  
> -		spin_lock_irq(&d->lock);
> +		raw_spin_lock_irq(&d->lock);
>  		if (d->status & IRQ_TYPE_EDGE_RISING)
>  			bytes[byte] |= BIT(off + 1);
>  		if (d->status & IRQ_TYPE_EDGE_FALLING)
>  			bytes[byte] |= BIT(off + 0);
> -		spin_unlock_irq(&d->lock);
> +		raw_spin_unlock_irq(&d->lock);
>  
>  		edge_change &= ~BIT(i);
>  	}

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

* Re: [PATCH 1/4] input: keyboard: twl4030: move to request_threaded_irq
  2009-12-28 11:02 ` [PATCH 1/4] input: keyboard: " Felipe Balbi
@ 2010-01-02  2:43   ` Dmitry Torokhov
  0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2010-01-02  2:43 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Linux Kernel Mailing List, Andrew Morton

On Mon, Dec 28, 2009 at 01:02:50PM +0200, Felipe Balbi wrote:
> move to request_threaded_irq() on twl4030 children.
> 

Applied both keyboard and powerbutton patches, thanks Felipe.

-- 
Dmitry

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

* Re: mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t
  2009-12-28 20:01   ` Tony Lindgren
@ 2010-01-05 19:34     ` Samuel Ortiz
  0 siblings, 0 replies; 9+ messages in thread
From: Samuel Ortiz @ 2010-01-05 19:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Felipe Balbi, Linux Kernel Mailing List, Andrew Morton, linux-omap

Hi Tony,

On Mon, Dec 28, 2009 at 12:01:45PM -0800, Tony Lindgren wrote:
> * Felipe Balbi <felipe.balbi@nokia.com> [091228 03:04]:
> > commit 239007b8440abff689632f50cdf0f2b9e895b534 converted
> > the spinlock_t to raw_spinlock_t. Unfortunately twl4030-irq
> > was left aside on the conversion.
> > 
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: linux-omap@vger.kernel.org
> > Acked-by: Thomas Gleixner <tglx@linutronix.de>
> > Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> > 
> > ---
> > 
> > resending because it wasn't applied before
> 
> This should go via Samuel as it's MFD related.
Linus applied it to his tree directly.

Cheers,
Samuel.


> Acked-by: Tony Lindgren <tony@atomide.com>
> 
>  
> > 
> >  drivers/mfd/twl4030-irq.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
> > index 20d29ba..9df9a5a 100644
> > --- a/drivers/mfd/twl4030-irq.c
> > +++ b/drivers/mfd/twl4030-irq.c
> > @@ -568,12 +568,12 @@ static void twl4030_sih_do_edge(struct work_struct *work)
> >  
> >  		bytes[byte] &= ~(0x03 << off);
> >  
> > -		spin_lock_irq(&d->lock);
> > +		raw_spin_lock_irq(&d->lock);
> >  		if (d->status & IRQ_TYPE_EDGE_RISING)
> >  			bytes[byte] |= BIT(off + 1);
> >  		if (d->status & IRQ_TYPE_EDGE_FALLING)
> >  			bytes[byte] |= BIT(off + 0);
> > -		spin_unlock_irq(&d->lock);
> > +		raw_spin_unlock_irq(&d->lock);
> >  
> >  		edge_change &= ~BIT(i);
> >  	}

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

end of thread, other threads:[~2010-01-05 19:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-28 11:02 [PATCH 4/4] usb: otg: twl4030: move to request_threaded_irq Felipe Balbi
2009-12-28 11:02 ` [PATCH 2/4] input: misc: " Felipe Balbi
2009-12-28 11:02 ` [PATCH 1/4] input: keyboard: " Felipe Balbi
2010-01-02  2:43   ` Dmitry Torokhov
2009-12-28 11:02 ` [PATCH 3/4] rtc: " Felipe Balbi
2009-12-28 12:29   ` Alessandro Zummo
2009-12-28 11:02 ` mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t Felipe Balbi
2009-12-28 20:01   ` Tony Lindgren
2010-01-05 19:34     ` Samuel Ortiz

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).