Re: [PATCH v8 0/6] of: teach overlay code to keep /aliases in sync

From: Rob Herring

Date: Fri Nov 06 2026 - 08:25:43 EST


On Thu, Nov 05, 2026 at 06:11:14PM -0800, Abdurrahman Hussain wrote:
> On Thu, Nov 05, 2026 at 06:40:30AM -0600, Rob Herring wrote:
> > I'd rather have my added device working than refusing to probe because
> > some arbitrary device index couldn't be used. There may be some user
> > that has a working system today and then this change would break them.
> > We can't really have that. I view aliases as a request, not a
> > requirement. It's perfectly valid for an OS to just ignore them
> > completely.
> >
> > I have no issue if we make the failure to use an alias louder, but I
> > guess that's not your main issue.
>
> OK. I'll drop that from overlay-notes.rst.
>
> Watchdog and rtc already treat an alias as a request: they try the
> aliased id and take a dynamic one if it is in use. The subsystems that
> fail are the ones that keep their dynamic range clear of boot-time aliases,
> which they cannot do for an overlay applied later: i2c, i3c, spi and
> mmc. On x86/ACPI and other systems booting without a base DT there are
> no boot-time aliases at all, so that range is empty and dynamic
> numbering starts at 0, right where overlay aliases would land.
>
> Would you like v9 to give those four the same fallback, with a warning,
> so the behaviour is consistent across subsystems? For i2c, the alias
> lookup would move into i2c_allocate_adapter_id(), so i2c_add_adapter()
> just sets nr = -1:

What I would like is aliases are not supported in overlays (applied
after boot).

Don't we already have consistent naming on hotpluggable devices such as
network adapters? All that is solved in userspace. Why do we need DT to
solve this here?

Rob