Re: [PATCH v2 1/1] device property: Add a note to the fwnode.h

From: Andy Shevchenko
Date: Thu Apr 03 2025 - 07:00:35 EST


On Thu, Apr 03, 2025 at 06:03:57PM +0800, Zijun Hu wrote:
> On 4/1/2025 12:35 AM, Andy Shevchenko wrote:
> > + * Note, this header is not meant to be used by the leaf drivers.
> > + * It provides the low level data types and definitions for the firmware
> > + * and device property providers. The respective API headers should
> > + * guarantee all the required data types and definitions without including
> > + * this header directly into the driver.
>
> sorry, i don't understand both "leaf drivers" and "respective API
> headers". could you have examples ?

leaf driver is like almost anything under drivers/iio, for example.
The respective API headers is usually: of.h or property.h (the latter
is highly preferred in a new code). TL;DR: the rule of thumb is
do not include this until you know exactly what you are doing.

--
With Best Regards,
Andy Shevchenko