Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] irq/irq_sim: try to improve the API
@ 2019-08-12 12:52 Bartosz Golaszewski
  2019-08-12 12:52 ` [PATCH 1/2] irq/irq_sim: make the irq_sim structure opaque Bartosz Golaszewski
  2019-08-12 12:52 ` [PATCH 2/2] irq/irq_sim: use irq domain Bartosz Golaszewski
  0 siblings, 2 replies; 7+ messages in thread
From: Bartosz Golaszewski @ 2019-08-12 12:52 UTC (permalink / raw)
  To: Linus Walleij, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Thomas Gleixner,
	Marc Zyngier
  Cc: linux-gpio, linux-kernel, linux-iio, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Currently the interrupt simulator exposes structures that don't need
to be public and has a helper that manually maps the simulator's irq
offsets to the global interrupt numberspace - something that should
be preferably handles by an irq_domain.

The first patch addresses the public structures: it moves them into
the relevant .c file and makes the init function return an opaque
pointer.

The second patch adds a linear irq_domain to the simulator and removes
the irq_sim_irqnum() routine. Users should now use the standard
irq_domain functions.

Both users of the irq_sim are converted at the same time as it's much
easier than trying to transition them step by step.

Tested both the gpio-mockup module as well as the iio_dummy_evgen.

Bartosz Golaszewski (2):
  irq/irq_sim: make the irq_sim structure opaque
  irq/irq_sim: use irq domain

 drivers/gpio/gpio-mockup.c          |  21 ++--
 drivers/iio/dummy/iio_dummy_evgen.c |  34 +++---
 include/linux/irq_sim.h             |  29 ++---
 kernel/irq/Kconfig                  |   1 +
 kernel/irq/irq_sim.c                | 177 ++++++++++++++++++----------
 5 files changed, 152 insertions(+), 110 deletions(-)

-- 
2.21.0


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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12 12:52 [PATCH 0/2] irq/irq_sim: try to improve the API Bartosz Golaszewski
2019-08-12 12:52 ` [PATCH 1/2] irq/irq_sim: make the irq_sim structure opaque Bartosz Golaszewski
2019-08-18 19:38   ` Jonathan Cameron
2019-08-18 19:41     ` Jonathan Cameron
2019-08-12 12:52 ` [PATCH 2/2] irq/irq_sim: use irq domain Bartosz Golaszewski
2019-08-18 19:45   ` Jonathan Cameron
2019-08-19  8:18   ` Marc Zyngier

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org linux-iio@archiver.kernel.org
	public-inbox-index linux-iio


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/ public-inbox