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


Groups > linux.kernel > #1711001 > unrolled thread

[PATCH v4 0/3] simulated interrupts

Started byBartosz Golaszewski <brgl@bgdev.pl>
First post2017-08-14 17:00 +0200
Last post2017-08-21 00:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 0/3] simulated interrupts Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-14 17:00 +0200
    Re: [PATCH v4 0/3] simulated interrupts Thomas Gleixner <tglx@linutronix.de> - 2017-08-16 16:50 +0200
      Re: [PATCH v4 0/3] simulated interrupts Linus Walleij <linus.walleij@linaro.org> - 2017-08-21 00:20 +0200

#1711001 — [PATCH v4 0/3] simulated interrupts

FromBartosz Golaszewski <brgl@bgdev.pl>
Date2017-08-14 17:00 +0200
Subject[PATCH v4 0/3] simulated interrupts
Message-ID<uep0u-5p7-13@gated-at.bofh.it>
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

v3 -> v4:
- moved the .c file to kernel/irq

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

-- 
2.13.2

[toc] | [next] | [standalone]


#1713020

FromThomas Gleixner <tglx@linutronix.de>
Date2017-08-16 16:50 +0200
Message-ID<uf7NU-8hY-21@gated-at.bofh.it>
In reply to#1711001
On Mon, 14 Aug 2017, Bartosz Golaszewski wrote:

> 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.

I merged the irq part (1+2) into a separate branch, which can be consumed
by the gpio folks so the mockup driver patch can be merged as well.

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/for-gpio

Thanks,

	tglx

[toc] | [prev] | [next] | [standalone]


#1716033

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-08-21 00:20 +0200
Message-ID<ugGJA-4ll-11@gated-at.bofh.it>
In reply to#1713020
On Wed, Aug 16, 2017 at 4:44 PM, Thomas Gleixner <tglx@linutronix.de> wrote:

> I merged the irq part (1+2) into a separate branch, which can be consumed
> by the gpio folks so the mockup driver patch can be merged as well.
>
>    git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/for-gpio

Awesome, thanks Thomas. I pulled this into the GPIO devel branch.

Yours,
Linus Walleij

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web