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] [day] [month] [year] [list]
Message-ID: <CAD++jLkxsynXSgpO+O_ThOE=3yzDH+2NgO3v=9LDDOMezXJ_Ag@mail.gmail.com>
Date: Fri, 2 Jan 2026 22:53:58 +0100
From: Linus Walleij <linusw@...nel.org>
To: Swark Yang <syang@...ado.com>
Cc: Linus Walleij <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...nel.org>, 
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Tzu-Hao Wei <twei@...ado.com>, Prasad Bolisetty <pbolisetty@...ado.com>
Subject: Re: [PATCH 2/2] gpio: cadence: Add support for edge-triggered interrupts

Hi Swark,

thanks for your patch! This is an important improvement for the Cadence
GPIO driver.

On Tue, Dec 23, 2025 at 8:30 AM Swark Yang <syang@...ado.com> wrote:
>
> From: Tzu-Hao Wei <twei@...ado.com>
>
> The Cadence GPIO controller (CDNS IP6508) supports edge-triggered
> interrupts (rising, falling, and both) via IRQ_TYPE, IRQ_VALUE,
> and IRQ_ANY_EDGE registers. This commit enables support for these
> modes in cdns_gpio_irq_set_type().
>
> Although the interrupt status register is cleared on read and lacks
> per-pin acknowledgment, the driver already handles this safely by
> reading the ISR once and dispatching all pending interrupts immediately.
> This allows edge IRQs to be used reliably in controlled environments.
>
> Signed-off-by: Tzu-Hao Wei <twei@...ado.com>
> Signed-off-by: Swark Yang <syang@...ado.com>
> Signed-off-by: Prasad Bolisetty <pbolisetty@...ado.com>

> -       /*
> -        * The GPIO controller doesn't have an ACK register.
> -        * All interrupt statuses are cleared on a status register read.
> -        * Don't support edge interrupts for now.
> -        */

Maybe we can instead insert a comment with a little table like this:

Interrupt polarity and trigger behaviour is configured like this:

(type, value)
(0, 0) = Falling edge triggered
(0, 1) = Rising edge triggered
(1, 0) = Low level triggered
(1, 1) = High level triggered

It's good that you also clear the "any" register for all other modes which
is something we didn't do before and could cause problems if e.g. the
boot loader set some value into that register!

+/- this small comment addition:
Reviewed-by: Linus Walleij <linusw@...nel.org>

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ