[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZbuCP4rN_DEsH-Un@smile.fi.intel.com>
Date: Thu, 1 Feb 2024 13:36:31 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Arturas Moskvinas <arturas.moskvinas@...il.com>
Cc: linus.walleij@...aro.org, u.kleine-koenig@...gutronix.de,
radim.pavlik@...-biometrics.com, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pinctrl: mcp23s08: Check only GPIOs which have
interrupts enabled
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
Powered by blists - more mailing lists