From: arve@android.com (Arve Hjønnevåg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] arm: msm: gpio support
Date: Tue, 30 Mar 2010 18:14:12 -0700 [thread overview]
Message-ID: <d6200be21003301814m538a5902s649415d6cc7ec8fa@mail.gmail.com> (raw)
In-Reply-To: <0D753D10438DA54287A00B027084269763691C346E@AUSP01VMBX24.collaborationhost.net>
On Tue, Mar 30, 2010 at 4:58 PM, H Hartley Sweeten
<hartleys@visionengravers.com> wrote:
> On Tuesday, March 30, 2010 4:12 PM, Daniel Walker wrote:
>> From: Daniel Walker <c_dwalke@quicinc.com>
...
>> +
>> +static void msm_gpio_irq_ack(unsigned int irq)
>> +{
>> + ? ? unsigned long irq_flags;
>> + ? ? struct msm_gpio_chip *msm_chip = get_irq_chip_data(irq);
>> + ? ? unsigned b;
>> +
>> + ? ? spin_lock_irqsave(&msm_chip->lock, irq_flags);
>> +
>> + ? ? b = 1U << (irq - FIRST_GPIO_IRQ - msm_chip->chip.base);
>
> Urk... That's a bit confusing...
>
> You might want to make this a macro or an inline function with some kind
> of comment.
>
On a related note, why did you inline msm_gpio_clear_detect_status? It
is used from two other functions.
>> +
>> +#if MSM_GPIO_BROKEN_INT_CLEAR
>> + ? ? /* Save interrupts that already triggered before we loose them. */
>> + ? ? /* Any interrupt that triggers between the read of int_status */
>> + ? ? /* and the write to int_clear will still be lost though. */
>> + ? ? msm_chip->int_status_copy |= readl(msm_chip->regs.int_status);
>> + ? ? msm_chip->int_status_copy &= ~b;
>> +#endif
>> + ? ? writel(b, msm_chip->regs.int_clear);
>> +
>> + ? ? msm_gpio_update_both_edge_detect(msm_chip);
>> + ? ? spin_unlock_irqrestore(&msm_chip->lock, irq_flags);
>> +}
>> +
...
--
Arve Hj?nnev?g
next prev parent reply other threads:[~2010-03-31 1:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 23:11 [PATCH 1/4] arm: msm: gpio support Daniel Walker
2010-03-30 23:11 ` [PATCH 2/4] arm: msm: GPIO support for HTC Dream Daniel Walker
2010-03-30 23:11 ` [PATCH 3/4] arm: msm: trout: add trout specific gpio interrupts Daniel Walker
2010-03-30 23:11 ` [PATCH 4/4] arm: msm: trout add mmc support Daniel Walker
2010-03-30 23:58 ` [PATCH 1/4] arm: msm: gpio support H Hartley Sweeten
2010-03-31 1:14 ` Arve Hjønnevåg [this message]
2010-03-31 14:03 ` Daniel Walker
2010-03-31 21:21 ` Arve Hjønnevåg
2010-03-31 22:53 ` Daniel Walker
2010-04-06 13:32 ` Pavel Machek
2010-03-31 14:12 ` Daniel Walker
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=d6200be21003301814m538a5902s649415d6cc7ec8fa@mail.gmail.com \
--to=arve@android.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).