lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 2 Feb 2024 12:40:23 +0200
From: Arturas Moskvinas <arturas.moskvinas@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linus.walleij@...aro.org, biju.das.jz@...renesas.com,
 akaessens@...il.com, thomas.preston@...ethink.co.uk,
 preid@...ctromag.com.au, u.kleine-koenig@...gutronix.de,
 linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] pinctrl: mcp23s08: Check only GPIOs which have
 interrupts enabled


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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ