linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] simulated interrupts
@ 2017-07-19 12:20 Bartosz Golaszewski
  2017-07-19 12:20 ` [PATCH 1/3] irq/irq_sim: add a simple interrupt simulator framework Bartosz Golaszewski
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Bartosz Golaszewski @ 2017-07-19 12:20 UTC (permalink / raw)
  To: Linus Walleij, Thomas Gleixner, Marc Zyngier, Jonathan Corbet,
	Bamvor Jian Zhang, Jonathan Cameron, Lars-Peter Clausen
  Cc: linux-kernel, linux-gpio, linux-doc, Bartosz Golaszewski

Some frameworks (e.g. iio, gpiolib) use irq_work to implement simulated
interrupts that can be 'fired' from process context when needed and
requested just like normal interrupts. This is useful for testing and
development purposes.

Currently this code is reimplemented by every user. This series
proposes to add a new set of functions that can be used by drivers
that want to simulate interrupts without having to duplicate any
boilerplate code.

The first patch adds a simple irq simulator framework. The second
extends it with resource management. The third uses the new
functionality in the gpio-mockup testing driver.

NOTE: The next candidate for using this API would be iio-dummy-evgen.

Bartosz Golaszewski (3):
  irq/irq_sim: add a simple interrupt simulator framework
  irq/irq_sim: add a devres variant of irq_sim_init()
  gpio: mockup: use irq_sim

 Documentation/driver-model/devres.txt |   1 +
 drivers/gpio/Kconfig                  |   2 +-
 drivers/gpio/gpio-mockup.c            |  77 ++--------------
 include/linux/irq_sim.h               |  41 +++++++++
 init/Kconfig                          |   4 +
 kernel/Makefile                       |   1 +
 kernel/irq_sim.c                      | 161 ++++++++++++++++++++++++++++++++++
 7 files changed, 216 insertions(+), 71 deletions(-)
 create mode 100644 include/linux/irq_sim.h
 create mode 100644 kernel/irq_sim.c

-- 
2.13.2

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-08-02 11:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-19 12:20 [PATCH 0/3] simulated interrupts Bartosz Golaszewski
2017-07-19 12:20 ` [PATCH 1/3] irq/irq_sim: add a simple interrupt simulator framework Bartosz Golaszewski
2017-07-22 20:59   ` Jonathan Cameron
2017-07-24  6:54     ` Bartosz Golaszewski
2017-07-24  7:31   ` Lars-Peter Clausen
2017-07-19 12:20 ` [PATCH 2/3] irq/irq_sim: add a devres variant of irq_sim_init() Bartosz Golaszewski
2017-07-19 12:20 ` [PATCH 3/3] gpio: mockup: use irq_sim Bartosz Golaszewski
2017-08-02 11:34   ` Linus Walleij
2017-07-19 12:25 ` [PATCH 0/3] simulated interrupts Thomas Gleixner
2017-07-19 12:44   ` Bartosz Golaszewski
2017-07-19 13:58     ` Thomas Gleixner
2017-07-19 14:19       ` Marc Zyngier
2017-07-19 14:43         ` Andy Shevchenko
2017-07-19 14:53           ` Thomas Gleixner
2017-07-19 15:28             ` Andy Shevchenko
2017-08-02 11:32         ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).