All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] iio: light: gp2ap002: runtime PM and error path fixes
@ 2026-07-22 16:22 Nikhil Gautam
  2026-07-22 16:22 ` [PATCH v2 1/3] iio: light: gp2ap002: Fix unbalanced runtime PM on repeated event writes Nikhil Gautam
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nikhil Gautam @ 2026-07-22 16:22 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Linus Walleij, David Lechner, Nuno Sá, Andy Shevchenko,
	linux-iio, linux-kernel, Nikhil Gautam

Hi,

This series fixes three issues in the gp2ap002 driver, all present
since the driver was introduced.

Patch 1 fixes an unbalanced runtime PM reference count reachable from
userspace by writing the event enable attribute twice with the same
value, as the IIO core does not deduplicate such writes.

Patch 2 fixes the runtime suspend error path leaving the IRQ disable
depth unbalanced, permanently disabling proximity events after a
failed suspend.

Patch 3 fixes regulator enable leaks in the runtime resume error
paths, which matters as the supplies may be shared with other
devices.

Regards,
Nikhil Gautam

Changes in v2:
- Removed new lines between Tags as per Andy's comment
- Removed dup call pm_runtime_mark_last_busy() in
  gp2ap002_write_event_config() as already handled in
  pm_runtime_put_autosuspend() as per Andy's comment

Nikhil Gautam (3):
  iio: light: gp2ap002: Fix unbalanced runtime PM on repeated event
    writes
  iio: light: gp2ap002: re-enable irq if runtime suspend fails
  iio: light: gp2ap002: Fix regulator leaks in runtime resume error path

 drivers/iio/light/gp2ap002.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

-- 
2.39.5


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

end of thread, other threads:[~2026-07-22 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 16:22 [PATCH v2 0/3] iio: light: gp2ap002: runtime PM and error path fixes Nikhil Gautam
2026-07-22 16:22 ` [PATCH v2 1/3] iio: light: gp2ap002: Fix unbalanced runtime PM on repeated event writes Nikhil Gautam
2026-07-22 16:22 ` [PATCH v2 2/3] iio: light: gp2ap002: re-enable irq if runtime suspend fails Nikhil Gautam
2026-07-22 16:22 ` [PATCH v2 3/3] iio: light: gp2ap002: Fix regulator leaks in runtime resume error path Nikhil Gautam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.