From: Mark Brown <broonie@kernel.org>
To: Yi Zhang <yizhang@marvell.com>
Cc: zhouqiao@marvell.com, zhangwm@marvell.com,
yizhang.mrvl@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] regmap: irq: clear status when disable irq
Date: Fri, 18 Oct 2013 01:10:36 +0100 [thread overview]
Message-ID: <20131018001036.GD2443@sirena.org.uk> (raw)
In-Reply-To: <1381839810-28984-1-git-send-email-yizhang@marvell.com>
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
On Tue, Oct 15, 2013 at 08:23:30PM +0800, Yi Zhang wrote:
I'm still not sure this is doing the right thing.
> + for (j = 0; j < bits_length; j++) {
> + if (!(d->mask_buf[i] & (0x1 << j))) {
This is checking to see if the bit is masked...
> + ret = regmap_update_bits(d->map, reg,
> + (0x1 << j), 0);
...then writing a zero to that bit. For most chips with a write 1 to
clear acknowledge this will result in all set bits in the register being
acked except the currently masked one (though if there are two masked
bits all will be acked).
It would be much quicker to just write mask_buf[i] back to the device to
acknoweldge all masked bits at once rather than try to do it
individually and the result should be the same unless the chip requires
us to set zero (which probably ought to be a quirk).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-10-18 0:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 12:23 Yi Zhang
2013-10-18 0:10 ` 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=20131018001036.GD2443@sirena.org.uk \
--to=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yizhang.mrvl@gmail.com \
--cc=yizhang@marvell.com \
--cc=zhangwm@marvell.com \
--cc=zhouqiao@marvell.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
all inboxes | Powered by JetHome®