From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Linus Walleij <linus.walleij@linaro.org>,
Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Marc Zyngier <maz@kernel.org>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [PATCH v3 0/2] irq/irq_sim: try to improve the API
Date: Fri, 17 Apr 2020 10:05:47 +0200 [thread overview]
Message-ID: <20200417080549.23751-1-brgl@bgdev.pl> (raw)
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
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 | 4 +-
kernel/irq/Kconfig | 1 +
kernel/irq/irq_sim.c | 225 +++++++++++++++++-----------
kernel/irq/irqdomain.c | 24 +--
7 files changed, 216 insertions(+), 151 deletions(-)
--
2.25.0
next reply other threads:[~2020-04-17 8:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 8:05 Bartosz Golaszewski [this message]
2020-04-17 8:05 ` [PATCH v3 1/2] irq: make irq_domain_reset_irq_data() available even for non-V2 users Bartosz Golaszewski
2020-04-17 10:50 ` Andy Shevchenko
2020-04-21 7:47 ` Bartosz Golaszewski
2020-04-17 8:05 ` [PATCH v3 2/2] irq/irq_sim: simplify the API Bartosz Golaszewski
2020-04-25 15:38 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200417080549.23751-1-brgl@bgdev.pl \
--to=brgl@bgdev.pl \
--cc=bgolaszewski@baylibre.com \
--cc=jason@lakedaemon.net \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).