]> www.infradead.org Git - users/jedix/linux-maple.git/commit
genirq/irq_sim: add an extended irq_sim initializer
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 24 Jun 2024 09:39:32 +0000 (11:39 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 4 Jul 2024 07:25:59 +0000 (09:25 +0200)
commit011f583781fa46699f1d4c4e9c39ad68f05ced2d
tree05c034b9678d8f444b5da60137cb8480520db90a
parentf2e395629747e718a67b567cb84b49d14792b312
genirq/irq_sim: add an extended irq_sim initializer

Currently users of the interrupt simulator don't have any way of being
notified about interrupts from the simulated domain being requested or
released. This causes a problem for one of the users - the GPIO
simulator - which is unable to lock the pins as interrupts.

Define a structure containing callbacks to be executed on various
irq_sim-related events (for now: irq request and release) and provide an
extended function for creating simulated interrupt domains that takes it
and a pointer to custom user data (to be passed to said callbacks) as
arguments.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240624093934.17089-2-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
include/linux/irq_sim.h
kernel/irq/irq_sim.c