Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1710840

[PATCH v3 0/3] simulated interrupts

From Bartosz Golaszewski <brgl@bgdev.pl>
Newsgroups linux.kernel
Subject [PATCH v3 0/3] simulated interrupts
Date 2017-08-14 13:30 +0200
Message-ID <uelJf-3wX-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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.

v1 -> v2:
- added a call to irq_work_sync in irq_sim_fini()

v2 -> v3:
- added the license header to new files
- added Acked-by's and Reviewed-by's

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               |  48 ++++++++++
 init/Kconfig                          |   4 +
 kernel/Makefile                       |   1 +
 kernel/irq_sim.c                      | 164 ++++++++++++++++++++++++++++++++++
 7 files changed, 226 insertions(+), 71 deletions(-)
 create mode 100644 include/linux/irq_sim.h
 create mode 100644 kernel/irq_sim.c

-- 
2.13.2

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] simulated interrupts Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-14 13:30 +0200
  [PATCH v3 3/3] gpio: mockup: use irq_sim Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-14 13:30 +0200
    Re: [PATCH v3 3/3] gpio: mockup: use irq_sim Linus Walleij <linus.walleij@linaro.org> - 2017-08-21 00:20 +0200
  [PATCH v3 1/3] irq/irq_sim: add a simple interrupt simulator framework Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-14 13:30 +0200
    Re: [PATCH v3 1/3] irq/irq_sim: add a simple interrupt simulator  framework Thomas Gleixner <tglx@linutronix.de> - 2017-08-14 15:10 +0200
      Re: [PATCH v3 1/3] irq/irq_sim: add a simple interrupt simulator  framework Thomas Gleixner <tglx@linutronix.de> - 2017-08-14 16:50 +0200
        Re: [PATCH v3 1/3] irq/irq_sim: add a simple interrupt simulator framework Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-14 16:50 +0200
      Re: [PATCH v3 1/3] irq/irq_sim: add a simple interrupt simulator framework Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-14 16:50 +0200
  [PATCH v3 2/3] irq/irq_sim: add a devres variant of irq_sim_init() Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-14 13:30 +0200

csiph-web