From: Laxman Dewangan <ldewangan@nvidia.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] regmap: irq: do not write mask register if it is not supported
Date: Thu, 14 Feb 2013 16:36:08 +0530 [thread overview]
Message-ID: <511CC520.8050104@nvidia.com> (raw)
In-Reply-To: <20130213142036.GJ5062@opensource.wolfsonmicro.com>
On Wednesday 13 February 2013 07:50 PM, Mark Brown wrote:
> *
>
>> for (i = 0; i < d->chip->num_regs; i++) {
>> + if (!d->chip->mask_base)
>> + goto skip_mask_reg_update;
>> +
> Why is this inside the loop?
>
> I'd also expect us to return an error if a caller tries to enable or
> disable an interrupt, or possibly to give different ops to the IRQ
> subsystem, rather than just silently claim we did what we were asked.
I tried to use regmap-irq for the gpio submodule and it has two sets of
register:
GPIOx_CNFG: bit[7:6] interrupt rising/falling.
GPIO_INT_STS where each bit shows the interrupt status whether it
occured or not.
There is no mask register.
In regmap-irq_thread() we see the interrupt status and compare against
mask enable buffer wther this is enabled or not and accordingly call the
handler.
hence I am still require irq_mask()/irq_unmask() to reflect the mask
with interrupt status and type for actually configuring the GPIOx_CNFG.
if I remove the mask_buf at all then how do we tell the int_sts register
is corresponding to which gpio handler?
next prev parent reply other threads:[~2013-02-14 11:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-13 13:14 [PATCH 1/2] regmap: irq: Add support for interrupt type Laxman Dewangan
2013-02-13 13:14 ` [PATCH 2/2] regmap: irq: do not write mask register if it is not supported Laxman Dewangan
2013-02-13 14:20 ` Mark Brown
2013-02-14 11:06 ` Laxman Dewangan [this message]
2013-02-14 11:35 ` Mark Brown
2013-02-14 11:55 ` Laxman Dewangan
2013-02-14 11:57 ` Mark Brown
2013-02-14 12:16 ` Laxman Dewangan
2013-02-13 13:54 ` [PATCH 1/2] regmap: irq: Add support for interrupt type Mark Brown
2013-02-14 11:01 ` Laxman Dewangan
2013-02-14 11:06 ` Mark Brown
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=511CC520.8050104@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gregkh@linuxfoundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.