From: Thomas Gleixner <tglx@linutronix.de>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 1/2] genirq/irq_sim: add a notifier for irqchip events
Date: Fri, 21 Jun 2024 17:40:00 +0200 [thread overview]
Message-ID: <87bk3unw33.ffs@tglx> (raw)
In-Reply-To: <20240612115231.26703-2-brgl@bgdev.pl>
On Wed, Jun 12 2024 at 13:52, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> 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.
>
> Add a blocking notifier and provide interfaces to register with it, then
> use it to notify users of the domain about interrupts being requested
> and released while also leaving space for future extensions.
Why a notifier?
There is only one usage site per simulator domain. So there is no reason
to have a notifier with handwaving about future extensions.
The right thing to do is:
typedef void (*irq_sim_cb_t)(irq_hw_number_t hwirq, bool request, void *data)
struct irq_domain *irq_domain_create_sim(struct fwnode_handle *fwnode,
unsigned int num_irqs,
irq_sim_cb_t *cb, void *cb_data);
You get the idea, right?
Thanks,
tglx
next prev parent reply other threads:[~2024-06-21 15:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 11:52 [PATCH 0/2] gpio: sim: lock simulated GPIOs as interrupts Bartosz Golaszewski
2024-06-12 11:52 ` [PATCH 1/2] genirq/irq_sim: add a notifier for irqchip events Bartosz Golaszewski
2024-06-21 15:40 ` Thomas Gleixner [this message]
2024-06-21 15:59 ` Bartosz Golaszewski
2024-06-21 16:16 ` Thomas Gleixner
2024-06-12 11:52 ` [PATCH 2/2] gpio: sim: lock GPIOs as interrupts when they are requested Bartosz Golaszewski
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=87bk3unw33.ffs@tglx \
--to=tglx@linutronix.de \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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