All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 next 0/7] IIO: sca3000: devm resource management
@ 2026-02-05 13:12 Harshit Mogalapalli
  2026-02-05 13:12 ` [PATCH v5 next 1/7] iio: sca3000: reuse device pointer for devm helpers Harshit Mogalapalli
                   ` (7 more replies)
  0 siblings, 8 replies; 28+ messages in thread
From: Harshit Mogalapalli @ 2026-02-05 13:12 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Harshit Mogalapalli, Andrew Ijano, Antoniu Miclaus, linux-iio,
	linux-kernel
  Cc: kernel-janitors, andriy.shevchenko

This is an attempt to update sca3000 accelerometer driver to make use
of devm_ based helpers where needed. I have split it into 6 patches.

Patch 1 - some refactoring and simplification of dev.
Patch 2 - switches request_threaded_irq() over to the devm helper
{atch 3 - Move stop_all_interrupts() above probe
Patch 4 - make stop_all_interrupts() return void
Patch 5 - Make use of guard() in sca3000_stop_all_interrupts() function.
Patch 6 - Used devm_add_action_or_reset() for disabling interrupts.
(Ensured the ordering of teardown bits remain same)
Patch 7 - manage device registration with devm helper

Yet to be addressed tasks: (Would like to take this up as a separate
activity)
1. We shouldn't be using the spi_device_id at all. [Thanks to onathan
and David]
2. Modernize other functions to make use of autocleanup style locking
which simpifies the code and makes error paths cleaner.

I will be working on these two above tasks and will be sending a
different patches for those.

The series builds cleanly and I have performed static analysis with
smatch checker but haven't tested on actual hardware.

v1 -> v2: changes are documented in patches where necessary.
v2 -> v3: Address comments from David Lechner.
v3 -> v4: Address comments from Andy.
v4 -> v5: Rebase the patches based on suggestions from Andy which
simplifies the patches.

Thanks for your time.
Regards,
Harshit

Harshit Mogalapalli (7):
  iio: sca3000: reuse device pointer for devm helpers
  iio: sca3000: switch IRQ handling to devm helpers
  iio: sca3000: Move sca3000_stop_all_interrupts() above sca3000_probe()
  iio: sca3000: make stop_all_interrupts() return void
  iio: sca3000: use guard(mutex) to simplify return paths
  iio: sca3000: stop interrupts via devm_add_action_or_reset()
  iio: sca3000: manage device registration with devm helper

 drivers/iio/accel/sca3000.c | 87 +++++++++++++++----------------------
 1 file changed, 34 insertions(+), 53 deletions(-)

-- 
2.47.3


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

end of thread, other threads:[~2026-03-03 21:44 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-05 13:12 [PATCH v5 next 0/7] IIO: sca3000: devm resource management Harshit Mogalapalli
2026-02-05 13:12 ` [PATCH v5 next 1/7] iio: sca3000: reuse device pointer for devm helpers Harshit Mogalapalli
2026-02-05 13:12 ` [PATCH v5 next 2/7] iio: sca3000: switch IRQ handling to " Harshit Mogalapalli
2026-02-05 16:23   ` Andy Shevchenko
2026-02-05 16:39     ` Harshit Mogalapalli
2026-02-05 16:45       ` Andy Shevchenko
2026-02-05 16:49         ` Harshit Mogalapalli
2026-02-05 13:12 ` [PATCH v5 next 3/7] iio: sca3000: Move sca3000_stop_all_interrupts() above sca3000_probe() Harshit Mogalapalli
2026-02-05 16:22   ` Andy Shevchenko
2026-02-05 13:12 ` [PATCH v5 next 4/7] iio: sca3000: make stop_all_interrupts() return void Harshit Mogalapalli
2026-02-05 16:24   ` Andy Shevchenko
2026-02-05 13:12 ` [PATCH v5 next 5/7] iio: sca3000: use guard(mutex) to simplify return paths Harshit Mogalapalli
2026-02-05 16:26   ` Andy Shevchenko
2026-02-05 16:39     ` Harshit Mogalapalli
2026-02-05 13:12 ` [PATCH v5 next 6/7] iio: sca3000: stop interrupts via devm_add_action_or_reset() Harshit Mogalapalli
2026-02-05 16:27   ` Andy Shevchenko
2026-02-05 13:12 ` [PATCH v5 next 7/7] iio: sca3000: manage device registration with devm helper Harshit Mogalapalli
2026-02-05 16:29   ` Andy Shevchenko
2026-02-05 16:51     ` Harshit Mogalapalli
2026-02-05 16:56       ` Andy Shevchenko
2026-02-05 17:00         ` Harshit Mogalapalli
2026-02-05 17:12           ` Andy Shevchenko
2026-02-05 19:58             ` Jonathan Cameron
2026-02-05 20:10               ` Harshit Mogalapalli
2026-03-03 12:14               ` Harshit Mogalapalli
2026-03-03 21:41                 ` Jonathan Cameron
2026-03-03 21:44                   ` Harshit Mogalapalli
2026-02-05 16:30 ` [PATCH v5 next 0/7] IIO: sca3000: devm resource management Andy Shevchenko

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.