Re: [PATCH] i2c: core: document preference for i2c_get_adapter_by_fwnode()
From: Johan Hovold
Date: Thu Oct 01 2026 - 09:40:49 EST
On Sat, Aug 01, 2026 at 10:57:34PM +0200, Wolfram Sang wrote:
> On Thu, Jul 16, 2026 at 03:30:29PM +0200, Johan Hovold wrote:
> > The i2c subsystem currently blocks during adapter deregistration
> > whenever there are consumers holding a reference.
> >
> > Document that i2c_get_adapter_by_fwnode(), which also takes a module
> > reference, should almost always be preferred over
> > i2c_find_adapter_by_fwnode() so that an attempt to unload the adapter
> > module while in use fails gracefully instead of blocking
> > uninterruptibly.
> >
> > Note that by implication of_get_i2c_adapter_by_node() is also generally
> > preferred over of_find_i2c_adapter_by_node().
> >
> > Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
>
> Reviewed-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
>
> Andi, I would suggest to apply it to for-current even, because this is
> an important doc update, but I'll leave it to you, of course.
Can this one be picked up now?
Johan
Attachment:
signature.asc
Description: PGP signature