Re: [PATCH 5/6] soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234

From: Andy Shevchenko
Date: Mon Aug 21 2023 - 08:46:08 EST


On Mon, Aug 21, 2023 at 05:08:19PM +0530, Kartik wrote:
> On Fri, 2023-08-18 at 18:07 +0300, Andy Shevchenko wrote:
> >On Fri, Aug 18, 2023 at 03:00:27PM +0530, Kartik wrote:

...

> >> + /* fuse->clk is not required when ACPI is used. */
> >> + if (!fuse->read || (!fuse->clk && !has_acpi_companion(fuse->dev)))
> >
> >No, just make CLK optional and that's it.
> >
> >> return -EPROBE_DEFER;
> >
> If the Fuse driver is probed using device-tree. Then we need to make
> sure that fuse->clk has been initilaized.

So, I recommend to think about it more, maybe you can find better solution
than above.

And actually don't use has_acpi_companion() in this case. What you need is
is_acpi_node() or is_of_node() depending on the case you want to check for.

--
With Best Regards,
Andy Shevchenko