Re: [PATCH] i2c: core: document preference for i2c_get_adapter_by_fwnode()
From: Andi Shyti
Date: Sat Oct 10 2026 - 05:59:07 EST
Hi Johan and Wolfram,
On Fri, Oct 09, 2026 at 03:42:36PM +0200, Wolfram Sang wrote:
> 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, can we have that in 7.4 pretty please?
I was just pushing this and thanks for pinging me here last
night.
Now it's in i2c/i2c.
Thanks,
Andi