[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <877ceinuf1.ffs@tglx>
Date: Fri, 21 Jun 2024 18:16:02 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, Bartosz
Golaszewski <bartosz.golaszewski@...aro.org>, Bartosz Golaszewski
<brgl@...ev.pl>, Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH 1/2] genirq/irq_sim: add a notifier for irqchip events
On Fri, Jun 21 2024 at 11:59, Bartosz Golaszewski wrote:
> On Fri, 21 Jun 2024 17:40:00 +0200, Thomas Gleixner <tglx@...utronix.de> said:
> If you're opposed to the notifier, can we at least make it somewhat
> future-proof and more elegant with the following?
>
> struct irq_sim_ops {
> int (*irq_sim_irq_requested)(irq_hw_number_t hwirq , void *data);
> int (*irq_sim_irq_released)(irq_hw_number_t hwirq, void *data);
release wants to be void.
> };
>
> struct irq_domain *irq_domain_create_sim_ext(struct fwnode_handle *fwnode,
> unsigned int num_irqs,
> const struct irq_sim_ops *ops,
> void *data);
>
> This way we don't have to change the other call-site over at IIO at all nor
> will need to change the prototype for irq_domain_create_sim_ext() if another
> callback is needed.
I'm fine with that. It's at least well defined, while the notifier
business is not :)
Thanks,
tglx
Powered by blists - more mailing lists