From: Samuel Ortiz <sameo@linux.intel.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mfd: Initialise WM831x IRQ masks on chip even if interrupts not in use
Date: Wed, 7 Apr 2010 10:50:36 +0200 [thread overview]
Message-ID: <20100407085035.GC2962@sortiz.org> (raw)
In-Reply-To: <1270480458-2346-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Hi Mark,
On Mon, Apr 05, 2010 at 04:14:17PM +0100, Mark Brown wrote:
> Ensure that the hardware has interrupts masked if we are not using
> the interrupt controller on the WM831x by initialising the masks
> before we check for the setup data required for the IRQ line. This
> avoids signalling an unused IRQ line and improves the robustness
> of checks that the IRQ is in use.
Patch applied, thanks.
Cheers,
Samuel.
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/mfd/wm831x-irq.c | 16 ++++++++--------
> 1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
> index b1d66b8..f8b51be 100644
> --- a/drivers/mfd/wm831x-irq.c
> +++ b/drivers/mfd/wm831x-irq.c
> @@ -460,6 +460,14 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
>
> mutex_init(&wm831x->irq_lock);
>
> + /* Mask the individual interrupt sources */
> + for (i = 0; i < ARRAY_SIZE(wm831x->irq_masks_cur); i++) {
> + wm831x->irq_masks_cur[i] = 0xffff;
> + wm831x->irq_masks_cache[i] = 0xffff;
> + wm831x_reg_write(wm831x, WM831X_INTERRUPT_STATUS_1_MASK + i,
> + 0xffff);
> + }
> +
> if (!irq) {
> dev_warn(wm831x->dev,
> "No interrupt specified - functionality limited\n");
> @@ -475,14 +483,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
> wm831x->irq = irq;
> wm831x->irq_base = pdata->irq_base;
>
> - /* Mask the individual interrupt sources */
> - for (i = 0; i < ARRAY_SIZE(wm831x->irq_masks_cur); i++) {
> - wm831x->irq_masks_cur[i] = 0xffff;
> - wm831x->irq_masks_cache[i] = 0xffff;
> - wm831x_reg_write(wm831x, WM831X_INTERRUPT_STATUS_1_MASK + i,
> - 0xffff);
> - }
> -
> /* Register them with genirq */
> for (cur_irq = wm831x->irq_base;
> cur_irq < ARRAY_SIZE(wm831x_irqs) + wm831x->irq_base;
> --
> 1.7.0.3
>
--
Intel Open Source Technology Centre
http://oss.intel.com/
prev parent reply other threads:[~2010-04-07 8:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 15:14 [PATCH 1/2] mfd: Initialise WM831x IRQ masks on chip even if interrupts not in use Mark Brown
2010-04-05 15:14 ` [PATCH 2/2] mfd: Ensure WM831x charger interrupts are acknowledged when suspending Mark Brown
2010-04-07 8:51 ` Samuel Ortiz
2010-04-07 8:50 ` Samuel Ortiz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100407085035.GC2962@sortiz.org \
--to=sameo@linux.intel.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox