Re: [PATCH v3 5/5] regulator: ltm8054: Support output current limit control

From: Andy Shevchenko

Date: Fri Nov 07 2025 - 10:28:47 EST


On Fri, Nov 7, 2025 at 4:54 PM Romain Gantois
<romain.gantois@xxxxxxxxxxx> wrote:
> On Thursday, 6 November 2025 19:32:29 CET Andy Shevchenko wrote:
> > On Thu, Nov 06, 2025 at 03:11:50PM +0100, Romain Gantois wrote:

...

> > > + ctl_dac = devm_iio_channel_get(&pdev->dev, "ctl");
> > > + if (IS_ERR(ctl_dac)) {
> > >
> > > + if (PTR_ERR(ctl_dac) == -ENODEV)
> > > + return ERR_PTR(-EPROBE_DEFER);
> >
> > Hmm... Are you sure about this?
>
> The only case where I want to defer is if the IO channel hasn't been created
> yet. From what I've read in iio_channel_get(), -ENODEV is returned specifically
> in this case. For example in fwnode_iio_channel_get_by_name() you have:
>
> ```
> if (!IS_ERR(chan) || PTR_ERR(chan) != -ENODEV)
> return chan;


Yes, but my point is that -ENODEV != -EPROBE_DEFER.
The latter may create an unbound driver in some cases. This needs a
very good justification explaining the metamorphoses.

--
With Best Regards,
Andy Shevchenko