From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>,
Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
Samuel Ortiz <sameo@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: mfd: Simulate active high IRQs with wm831x
Date: Wed, 21 Sep 2011 13:23:01 +0100 [thread overview]
Message-ID: <20110921122300.GB4374@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20110921064415.GC4999@elgon.mountain>
On Wed, Sep 21, 2011 at 09:44:15AM +0300, Dan Carpenter wrote:
> 518 /* Simulate an edge triggered IRQ by polling the input
> 519 * status. This is sucky but improves interoperability.
> 520 */
> 521 if (primary == WM831X_GP_INT &&
> 522 wm831x->gpio_level[i - WM831X_IRQ_GPIO_1]) {
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> We're inside a for loop over ARRAY_SIZE(wm831x_irqs) which has 58
> elements (so "i" is 0-57) and we subtract WM831X_IRQ_GPIO_1 (1) which
> gives us a max of 56. The ->gpio_level[] array only has 16 elements
> In wm831x_irq_set_type() it only sets the first 11 elements of the
> ->gpio_level[] array. Perhaps something similar is needed here. I
> don't know the code well enough to say.
There's no need for any additional checks, the check for the primary IRQ
ensures that we know we're dealing with a GPIO IRQ.
prev parent reply other threads:[~2011-09-21 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 6:44 Dan Carpenter
2011-09-21 12:23 ` Mark Brown [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=20110921122300.GB4374@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=dan.carpenter@oracle.com \
--cc=dp@opensource.wolfsonmicro.com \
--cc=ian@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/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
Powered by JetHome