2009-12-28 11:06:18

by Felipe Balbi

[permalink] [raw]
Subject: [PATCH 4/4] usb: otg: twl4030: move to request_threaded_irq

move to request_threaded_irq() on twl4030 children.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Felipe Balbi <[email protected]>

---

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


2009-12-28 11:05:08

by Felipe Balbi

[permalink] [raw]
Subject: [PATCH 2/4] input: misc: twl4030: move to request_threaded_irq

move to request_threaded_irq() on twl4030 children.

Cc: Dmitry Torokhov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>

---

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

2009-12-28 11:05:32

by Felipe Balbi

[permalink] [raw]
Subject: [PATCH 1/4] input: keyboard: twl4030: move to request_threaded_irq

move to request_threaded_irq() on twl4030 children.

Cc: Dmitry Torokhov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>

---

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

2009-12-28 11:06:01

by Felipe Balbi

[permalink] [raw]
Subject: [PATCH 3/4] rtc: twl4030: move to request_threaded_irq

move to request_threaded_irq() on twl4030 children.

Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>

---

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

2009-12-28 11:05:50

by Felipe Balbi

[permalink] [raw]
Subject: mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t

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

Cc: Tony Lindgren <[email protected]>
Cc: [email protected]
Acked-by: Thomas Gleixner <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>

---

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);
}

2009-12-28 12:29:14

by Alessandro Zummo

[permalink] [raw]
Subject: Re: [PATCH 3/4] rtc: twl4030: move to request_threaded_irq

On Mon, 28 Dec 2009 13:02:51 +0200
Felipe Balbi <[email protected]> wrote:

> move to request_threaded_irq() on twl4030 children.
>
> Cc: Alessandro Zummo <[email protected]>
> Signed-off-by: Felipe Balbi <[email protected]>

Acked-by: Alessandro Zummo <[email protected]>

--

Best regards,

Alessandro Zummo,
Tower Technologies - Torino, Italy

http://www.towertech.it

2009-12-28 20:01:49

by Tony Lindgren

[permalink] [raw]
Subject: Re: mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t

* Felipe Balbi <[email protected]> [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 <[email protected]>
> Cc: [email protected]
> Acked-by: Thomas Gleixner <[email protected]>
> Signed-off-by: Felipe Balbi <[email protected]>
>
> ---
>
> resending because it wasn't applied before

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

Acked-by: Tony Lindgren <[email protected]>


>
> 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);
> }

2010-01-02 02:43:23

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 1/4] input: keyboard: twl4030: move to request_threaded_irq

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

2010-01-05 19:32:50

by Samuel Ortiz

[permalink] [raw]
Subject: Re: mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t

Hi Tony,

On Mon, Dec 28, 2009 at 12:01:45PM -0800, Tony Lindgren wrote:
> * Felipe Balbi <[email protected]> [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 <[email protected]>
> > Cc: [email protected]
> > Acked-by: Thomas Gleixner <[email protected]>
> > Signed-off-by: Felipe Balbi <[email protected]>
> >
> > ---
> >
> > 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 <[email protected]>
>
>
> >
> > 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/