Re: [PATCH 1/2] device property: Add optional nargs_prop for get_reference_args

From: Rob Herring
Date: Tue Apr 08 2025 - 09:04:38 EST


On Tue, Apr 8, 2025 at 3:37 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> On Mon, Apr 07, 2025 at 06:37:13PM -0400, Sean Anderson wrote:
> > get_reference_args does not permit falling back to nargs when nargs_prop
> > is missing. This makes it difficult to support older devicetrees where
> > nargs_prop may not be present. Add support for this by converting nargs
> > to a signed value. Where before nargs was ignored if nargs_prop was
> > passed, now nargs is only ignored if it is strictly negative. When it is
> > positive, nargs represents the fallback cells to use if nargs_prop is
> > absent.
>
> And what is the case to support old DTs on most likely outdated hardware?

People still care when I break 1990s PowerMacs...

It's more that some bindings (like MSI) start out without #foo-cells,
and then we end up adding arg cells later. So we have to support no
#foo-cells means 0.

Rob