mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/3] iio: proximity: sx93xx: keep the IRQ balanced across suspend and resume
@ 2026-11-14  7:35 Arnav Kapoor
  2026-11-14  7:35 ` [PATCH v5 1/3] iio: proximity: sx9310: " Arnav Kapoor
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnav Kapoor @ 2026-11-14  7:35 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: David Lechner, Nuno Sá,
	Andy Shevchenko, Andy Shevchenko, Gwendal Grignou, Joshua Crofts,
	linux-iio, linux-kernel, Arnav Kapoor

sx9310, sx9324 and sx9360 disable the interrupt in suspend before
anything that can fail, and don't enable it again when suspend or resume
fails. One patch per driver, as the Fixes tags differ.

Changes in v5:
- Disable the interrupt with disable_irq() before taking the mutex,
  and enable it again if suspend fails. v4 called disable_irq_nosync()
  at the end of suspend, so a threaded handler woken during the
  register writes could run after suspend returned. Found by Sashiko.
- Move the register accesses into a *_sleep() helper per driver so the
  mutex is released before the interrupt is re-enabled on failure
- Rebase on fixes-togreg

v4: https://lore.kernel.org/all/20261101102518.22757-1-kapoorarnav43@gmail.com/
v3: https://lore.kernel.org/all/20261028220444.70121-1-kapoorarnav43@gmail.com/
v2: https://lore.kernel.org/all/20261026112342.65917-1-kapoorarnav43@gmail.com/
v1:
https://lore.kernel.org/all/20261026100322.16720-1-kapoorarnav43@gmail.com/
https://lore.kernel.org/all/20261026100408.16874-1-kapoorarnav43@gmail.com/
https://lore.kernel.org/all/20261026100450.17023-1-kapoorarnav43@gmail.com/

Compile-tested only (W=1); I don't have the hardware and haven't
reproduced a failing suspend.

Arnav Kapoor (3):
  iio: proximity: sx9310: keep the IRQ balanced across suspend and
    resume
  iio: proximity: sx9324: keep the IRQ balanced across suspend and
    resume
  iio: proximity: sx9360: keep the IRQ balanced across suspend and
    resume

 drivers/iio/proximity/sx9310.c | 54 ++++++++++++++++++++++------------
 drivers/iio/proximity/sx9324.c | 43 ++++++++++++++++++---------
 drivers/iio/proximity/sx9360.c | 45 ++++++++++++++++++----------
 3 files changed, 94 insertions(+), 48 deletions(-)


base-commit: a6d9114f68c4b5507b2d945bd6d1e37415f913c5
-- 
2.53.0


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

end of thread, other threads:[~2026-11-14  7:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14  7:35 [PATCH v5 0/3] iio: proximity: sx93xx: keep the IRQ balanced across suspend and resume Arnav Kapoor
2026-11-14  7:35 ` [PATCH v5 1/3] iio: proximity: sx9310: " Arnav Kapoor
2026-11-14  7:35 ` [PATCH v5 2/3] iio: proximity: sx9324: " Arnav Kapoor
2026-11-14  7:35 ` [PATCH v5 3/3] iio: proximity: sx9360: " Arnav Kapoor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®