Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge()

From: Uwe Kleine-König
Date: Wed Dec 05 2018 - 08:20:04 EST


On Wed, Dec 05, 2018 at 01:19:54PM +0100, Linus Walleij wrote:
> On Mon, Dec 3, 2018 at 12:06 PM Uwe Kleine-König
> <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> > On Mon, Dec 03, 2018 at 11:57:26AM +0100, Bartosz Golaszewski wrote:
>
> > > It used to live in the gpio-mockup driver and I generalized it
> > > precisely because there was another driver - iio evgen - which was
> > > doing basically the same thing. While I don't know if there'll be more
> > > users (I'd guess it would be useful for testing purposes of other
> > > subsystems) having the same functionality implemented once is better
> > > than twice.
> >
> > The iio testing driver only needs the trigger and relies on an irq that
> > then calls the registerd handler. The iio driver doesn't need to tune
> > the edge sensitivity though and if your mockup driver just only calls
> > the fire routine if the configured sensitivity justifies that,
> > everything should work as expected.
>
> Simulating edges in the generic IRQ simulator codes seems
> generally useful to me, even if there is just one user now.

I cannot imagine another potential user. Which kind of driver could use
that that is not a gpio simulator?

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |