From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: grant.likely@secretlab.ca, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] gpio: add MSIC gpio driver
Date: Tue, 10 Apr 2012 14:10:56 +0100 [thread overview]
Message-ID: <20120410131056.GA31551@sirena.org.uk> (raw)
In-Reply-To: <20120410131734.28046.25265.stgit@bob.linux.org.uk>
On Tue, Apr 10, 2012 at 02:18:04PM +0100, Alan Cox wrote:
> + if (mg->trig_change_mask) {
> + offset = __ffs(mg->trig_change_mask);
> +
> + reg = msic_gpio_to_ireg(offset);
> + if (reg < 0)
> + goto out;
> +
> + if (mg->trig_type & IRQ_TYPE_EDGE_RISING)
> + trig |= MSIC_GPIO_TRIG_RISE;
> + if (mg->trig_type & IRQ_TYPE_EDGE_FALLING)
> + trig |= MSIC_GPIO_TRIG_FALL;
> +
> + intel_msic_reg_update(reg, trig, MSIC_GPIO_INTCNT_MASK);
> + mg->trig_change_mask = 0;
> + }
What happens if we manage to get more than one change flagged while the
lock is held?
> +/* Firmware does all the masking and unmasking for us, no masking here. */
> +static void msic_irq_unmask(struct irq_data *data) { }
> +static void msic_irq_mask(struct irq_data *data) { }
Shouldn't these just be omitted if they don't do anything (or
alternatively, how does the firmware figure out that it needs to do the
masking and unmasking)?
> + mg = kzalloc(sizeof(*mg), GFP_KERNEL);
> + if (!mg)
> + return -ENOMEM;
devm_kzalloc()
next prev parent reply other threads:[~2012-04-10 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 13:18 Alan Cox
2012-04-10 13:10 ` Mark Brown [this message]
2012-04-10 13:23 ` Alan Cox
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=20120410131056.GA31551@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=grant.likely@secretlab.ca \
--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
all inboxes | Powered by JetHome®