linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] irq/irq_sim: try to improve the API
@ 2020-04-30 14:30 Bartosz Golaszewski
  2020-04-30 14:30 ` [PATCH v4 1/2] irq: make irq_domain_reset_irq_data() available even for non-V2 users Bartosz Golaszewski
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2020-04-30 14:30 UTC (permalink / raw)
  To: Linus Walleij, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Thomas Gleixner,
	Jason Cooper, Marc Zyngier
  Cc: linux-gpio, linux-kernel, linux-iio, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

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 series tries to address it.

First, we make irq_domain_reset_irq_data() available to non-V2 domain API
users - that'll be used in the subsequent patch. Next we overhaul the
public interfaces - we hide all specific data structures and instead
rely on the irq_domain struct and virtual interrupt numberspace.

The end effect is that we limit the interrupt simulator API to three
functions (plus one device managed variant) and zero new structures.

v1: https://lkml.org/lkml/2019/8/12/558

v1 -> v2:
- instead of just making the new data structures opaque for users, remove
  them entirely in favor of irq_domain
- call irq_set_handler() & irq_domain_reset_irq_data() when unmapping
  the simulated interrupt
- fix a memory leak in error path
- make it possible to use irq_find_matching_fwnode() with the simulator
  domain
- correctly use irq_create_mapping() and irq_find_mapping(): only use the
  former at init-time and the latter at interrupt-time

v2 -> v3:
- drop the controverial changes to irq_domain code and only leave the
  changes to irq_sim and its users with the plan to revisit the former
  at a later time

v3 -> v4:
- add the Ack from Jonathan
- remove redundant parts of patch 1/2

Bartosz Golaszewski (2):
  irq: make irq_domain_reset_irq_data() available even for non-V2 users
  irq/irq_sim: simplify the API

 drivers/gpio/gpio-mockup.c          |  47 ++++--
 drivers/iio/dummy/iio_dummy_evgen.c |  32 ++--
 include/linux/irq_sim.h             |  34 ++---
 include/linux/irqdomain.h           |   2 +-
 kernel/irq/Kconfig                  |   1 +
 kernel/irq/irq_sim.c                | 225 +++++++++++++++++-----------
 kernel/irq/irqdomain.c              |  24 +--
 7 files changed, 215 insertions(+), 150 deletions(-)

-- 
2.25.0


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

end of thread, other threads:[~2020-05-12 17:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 14:30 [PATCH v4 0/2] irq/irq_sim: try to improve the API Bartosz Golaszewski
2020-04-30 14:30 ` [PATCH v4 1/2] irq: make irq_domain_reset_irq_data() available even for non-V2 users Bartosz Golaszewski
2020-05-12 12:15   ` Linus Walleij
2020-04-30 14:30 ` [PATCH v4 2/2] irq/irq_sim: simplify the API Bartosz Golaszewski
2020-05-12 12:16   ` Linus Walleij
2020-05-12 15:37   ` Marc Zyngier
2020-05-12 17:12     ` Bartosz Golaszewski
2020-05-12 11:39 ` [PATCH v4 0/2] irq/irq_sim: try to improve " Bartosz Golaszewski

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