[PATCH 0/4] i2c: muxes: pca954x: bug fixes and cleanups

Pradhan, Sanman posted 4 patches 2 months ago
drivers/i2c/muxes/i2c-mux-pca954x.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
[PATCH 0/4] i2c: muxes: pca954x: bug fixes and cleanups
Posted by Pradhan, Sanman 2 months ago
From: Sanman Pradhan <psanman@juniper.net>

This series addresses two bug fixes and two cleanups in the pca954x
I2C mux driver.

Patches 1-2 fix resource lifecycle issues in pca954x_cleanup():

 - Patch 1 reorders cleanup so that child adapters are removed before
   the regulator is disabled, ensuring children are torn down while
   the device is still powered.

 - Patch 2 quiesces the parent IRQ via devm_free_irq() before removing
   child adapters and tearing down the IRQ domain.  The threaded handler
   dispatches nested child IRQs over the mux, so it must be stopped
   before either child adapters or the IRQ domain are dismantled.
   Because pca954x_cleanup() is also used as the probe error-unwind
   path and the IRQ domain is created before the parent IRQ is
   requested, a flag guards the devm_free_irq() call so it is only
   issued when the managed IRQ was actually registered.

Patches 3-4 are straightforward cleanups:

 - Patch 3 replaces sprintf() with sysfs_emit() in idle_state_show().
 - Patch 4 marks pca954x_irq_chip as const with IRQCHIP_IMMUTABLE.

Sanman Pradhan (4):
  i2c: muxes: pca954x: fix cleanup ordering in pca954x_cleanup()
  i2c: muxes: pca954x: free parent IRQ before dismantling IRQ domain
  i2c: muxes: pca954x: use sysfs_emit() in idle_state_show()
  i2c: muxes: pca954x: mark irq_chip as immutable

 drivers/i2c/muxes/i2c-mux-pca954x.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

-- 
2.34.1

Re: [PATCH 0/4] i2c: muxes: pca954x: bug fixes and cleanups
Posted by Pradhan, Sanman 1 month, 3 weeks ago
From: Sanman Pradhan <psanman@juniper.net>

Hi Peter,

Gentle ping on this series. Please let me know if you have any
feedback or if there's anything I should rework.

Thank you.

Regards,
Sanman Pradhan