PCI/pwrctrl: tc9563: Take i2c adapter module reference

The i2c subsystem currently blocks during adapter deregistration whenever
there are consumers holding a reference.

Switch to using of_get_i2c_adapter_by_node() which also takes a reference
to the adapter module so that an attempt to unload the module while in use
fails gracefully instead of blocking uninterruptibly.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20260716132532.1565340-1-johan@kernel.org
This commit is contained in:
Johan Hovold 2026-07-16 15:25:32 +02:00 • committed by Bjorn Helgaas
commit 62ef2a96fe