From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Arturas Moskvinas <arturas.moskvinas@gmail.com>
Cc: linus.walleij@linaro.org, u.kleine-koenig@pengutronix.de,
radim.pavlik@tbs-biometrics.com, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: mcp23s08: Check only GPIOs which have interrupts enabled
Date: Thu, 1 Feb 2024 13:36:31 +0200 [thread overview]
Message-ID: <ZbuCP4rN_DEsH-Un@smile.fi.intel.com> (raw)
In-Reply-To: <20240130073710.10110-1-arturas.moskvinas@gmail.com>
On Tue, Jan 30, 2024 at 09:37:10AM +0200, Arturas Moskvinas wrote:
> GPINTEN register contains information about GPIOs with enabled
> interrupts no need to check other GPIOs for changes.
...
> + if (mcp_read(mcp, MCP_GPINTEN, &gpinten))
> + goto unlock;
> + enabled_interrupts = gpinten;
Move this line to be...
...
> - for (i = 0; i < mcp->chip.ngpio; i++) {
> - /* We must check all of the inputs on the chip,
> - * otherwise we may not notice a change on >=2 pins.
...just here (w/o any blank line in between).
> + for_each_set_bit(i, &enabled_interrupts, mcp->chip.ngpio) {
...
> + /* We must check all of the inputs with enabled interrupts
> + * on the chip, otherwise we may not notice a change
> + * on >=2 pins.
Missing space after =. But better to spell in proper English, i.e.
"...great than or equal to 2 pins."
> *
> * On at least the mcp23s17, INTCAP is only updated
/*
* Use proper multi-line
* comment style as depicted
* in this example.
*/
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-02-01 12:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 7:37 [PATCH] pinctrl: mcp23s08: Check only GPIOs which have interrupts enabled Arturas Moskvinas
2024-01-31 9:27 ` Linus Walleij
2024-02-01 11:36 ` Andy Shevchenko [this message]
[not found] ` <CAPo8RJaE-jAmbp8XTzS6cPceOpLiPcjVvWg28_3eoX62Z9Bc-A@mail.gmail.com>
2024-02-01 13:18 ` Andy Shevchenko
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=ZbuCP4rN_DEsH-Un@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=arturas.moskvinas@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=radim.pavlik@tbs-biometrics.com \
--cc=u.kleine-koenig@pengutronix.de \
/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