linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] gpio: sim: lock simulated GPIOs as interrupts
@ 2024-06-24  9:39 Bartosz Golaszewski
  2024-06-24  9:39 ` [PATCH v2 1/2] genirq/irq_sim: add an extended irq_sim initializer Bartosz Golaszewski
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2024-06-24  9:39 UTC (permalink / raw)
  To: Linus Walleij, Thomas Gleixner
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

I realized that the gpio-sim module doesn't lock the GPIOs as interrupts
when they are requested from the irq_sim. This leads to users being able
to change the direction of GPIOs that should remain as inputs to output.
This series extends the irq_sim interface and allows users to supply
callbacks that will be executed to inform users about interrupts being
requested and released so that they can act accordingly. The gpio-sim is
made to use this new API and lock GPIOs as interrupts when needed.

Thomas: if this is fine with you, can you Ack it so that I can take it
through the GPIO tree for the next merge window?

Changes since v1:
- drop the notifier in favor of specific callbacks

Bartosz Golaszewski (2):
  genirq/irq_sim: add an extended irq_sim initializer
  gpio: sim: lock GPIOs as interrupts when they are requested

 drivers/gpio/gpio-sim.c | 25 ++++++++++++++++-
 include/linux/irq_sim.h | 17 ++++++++++++
 kernel/irq/irq_sim.c    | 60 ++++++++++++++++++++++++++++++++++++++---
 3 files changed, 98 insertions(+), 4 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-07-04  7:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24  9:39 [PATCH v2 0/2] gpio: sim: lock simulated GPIOs as interrupts Bartosz Golaszewski
2024-06-24  9:39 ` [PATCH v2 1/2] genirq/irq_sim: add an extended irq_sim initializer Bartosz Golaszewski
2024-06-26 11:48   ` Linus Walleij
2024-06-24  9:39 ` [PATCH v2 2/2] gpio: sim: lock GPIOs as interrupts when they are requested Bartosz Golaszewski
2024-06-26 11:48   ` Linus Walleij
2024-07-01  8:41 ` [PATCH v2 0/2] gpio: sim: lock simulated GPIOs as interrupts Bartosz Golaszewski
2024-07-03 12:48 ` Linus Walleij
2024-07-04  7:26 ` 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).