From: Arturas Moskvinas <arturas.moskvinas@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linus.walleij@linaro.org, biju.das.jz@bp.renesas.com,
akaessens@gmail.com, thomas.preston@codethink.co.uk,
preid@electromag.com.au, u.kleine-koenig@pengutronix.de,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] pinctrl: mcp23s08: Check only GPIOs which have interrupts enabled
Date: Fri, 2 Feb 2024 12:40:23 +0200 [thread overview]
Message-ID: <cc1572a4-f2e4-4f26-a505-09db5dcdfdfa@gmail.com> (raw)
In-Reply-To: <ZburBq7ZJhK_X_t0@smile.fi.intel.com>
On 2/1/24 16:30, Andy Shevchenko wrote:
> On Thu, Feb 01, 2024 at 04:14:07PM +0200, Arturas Moskvinas wrote:
>> GPINTEN register contains information about GPIOs with enabled
>> interrupts no need to check other GPIOs for changes.
>>
>> Signed-off-by: Arturas Moskvinas<arturas.moskvinas@gmail.com>
>> ---
> You forgot to add a changelog here, but no need to resend, just you can respond
> to the email since it's not a big issue in this case.
Ack.
>> + if (mcp_read(mcp, MCP_GPINTEN, &gpinten))
>> + goto unlock;
> Do all hw variants have this register available?
> Esp. I2C part, wouldn't it be problematic (exception with NACK on the bus)?
According to specification sheets MCP(s0)17 [1] page 19, MCP(s0)18 [2]
page 19, MCP(s0)08 [3] page 11 - all supported expanders have that
register also that register needs to be used [4] to mask/unmask
interrupts on given GPIO, without it - expander won't even fire an
interrupt. I tested on MCP23018 I2C expander though but module itself is
not treating that expander differently for interrupt handling purposes.
Do you want that information to be added as part of commit message or
information in the mailing thread will be enough?
[1]
https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23017-Data-Sheet-DS20001952.pdf
[2]
https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23018-Data-Sheet-DS20002103.pdf
[3]
https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23008-MCP23S08-Data-Sheet-DS20001919.pdf
[4]
https://elixir.bootlin.com/linux/v6.7/source/drivers/pinctrl/pinctrl-mcp23s08.c#L473
Arturas Moskvinas
next prev parent reply other threads:[~2024-02-02 10:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 14:14 [PATCH v2] pinctrl: mcp23s08: Check only GPIOs which have interrupts enabled Arturas Moskvinas
2024-02-01 14:30 ` Andy Shevchenko
2024-02-02 10:40 ` Arturas Moskvinas [this message]
2024-02-08 13:46 ` Linus Walleij
-- strict thread matches above, loose matches on Subject: below --
2024-02-05 13:56 Andy Shevchenko
2024-02-07 10:50 ` Arturas Moskvinas
2024-02-07 14:48 ` 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=cc1572a4-f2e4-4f26-a505-09db5dcdfdfa@gmail.com \
--to=arturas.moskvinas@gmail.com \
--cc=akaessens@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=preid@electromag.com.au \
--cc=thomas.preston@codethink.co.uk \
--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;
as well as URLs for NNTP newsgroup(s).