Re: [PATCH v4 2/2] irq/irq_sim: simplify the API

From: Linus Walleij
Date: Tue May 12 2020 - 08:17:08 EST


On Thu, Apr 30, 2020 at 4:30 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:

> From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
>
> The interrupt simulator API exposes a lot of custom data structures and
> functions and doesn't reuse the interfaces already exposed by the irq
> subsystem. This patch tries to address it.
>
> We hide all the simulator-related data structures from users and instead
> rely on the well-known irq domain. When creating the interrupt simulator
> the user receives a pointer to a newly created irq_domain and can use it
> to create mappings for simulated interrupts.
>
> It is also possible to pass a handle to fwnode when creating the simulator
> domain and retrieve it using irq_find_matching_fwnode().
>
> The irq_sim_fire() function now only takes the virtual interrupt number
> as argument - there's no need anymore to pass it any data structure linked
> to the simulator.
>
> We modify the two modules that use the simulator at the same time as
> adding these changes in order to reduce the intermediate bloat that would
> result when trying to migrate the drivers in separate patches.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> #for IIO

Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij