devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ayush Singh <ayush@beagleboard.org>
To: David Gibson <david@gibson.dropbear.id.au>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: d-gole@ti.com, lorforlinux@beagleboard.org,
	jkridner@beagleboard.org, robertcnelson@beagleboard.org,
	nenad.marinkovic@mikroe.com, Andrew Davis <afd@ti.com>,
	Robert Nelson <robertcnelson@gmail.com>,
	devicetree-compiler@vger.kernel.org
Subject: Re: [PATCH 1/2] libfdt: overlay: Allow resolving phandle symbols
Date: Wed, 13 Nov 2024 15:16:30 +0530	[thread overview]
Message-ID: <21d28bc0-da17-4cb8-b205-fa3c101a0ff0@beagleboard.org> (raw)
In-Reply-To: <ZvE5atmdWXhGwLdQ@zatzit.fritz.box>

On 9/23/24 15:18, David Gibson wrote:

> On Mon, Sep 23, 2024 at 11:12:02AM +0200, Geert Uytterhoeven wrote:
>> Hi David,
>>
>> On Mon, Sep 23, 2024 at 10:41 AM David Gibson
>> <david@gibson.dropbear.id.au> wrote:
>>> On Mon, Sep 23, 2024 at 10:22:03AM +0200, Geert Uytterhoeven wrote:
>>>> On Mon, Sep 23, 2024 at 5:41 AM David Gibson
>>>> <david@gibson.dropbear.id.au> wrote:
>>>>> So, essentially you're just adding new labels as aliases to existing
>>>>> labels?
>>>>>
>>>>> Ok, I can see at least two ways of doing that which I think are a more
>>>>> natural fit than allowing symbols to be phandles.
>>>> [...]
>>>>
>>>>> # Method 2: /aliases
>>>> Does the (Linux) DT overlay code support updating aliases?
>>>> Last time I needed that (almost a decade ago), it did not.
>>> Huh.  I hadn't realised the kernel kept a separate cache of aliases
>>> that wasn't updated.  Assuming that's still the case, that would
>>> complicate matters a bit.
>> Indeed.
> Actually, in a sense this is just an aspect of a more general thing:
> libfdt's is not the only relevant implementation of overlays.  If you
> want to extend what overlays can do, you need to consider the kernel
> implementation too.
>

So, I don't think we can go the aliases route. I posted an updated  
of_alias patch [0], but as Rob pointed out:

```

Drivers use the non-existent alias numbers for instances without an
alias. So what happens if an index is already in use and then an
overlay uses the same index.

I don't see how this can work reliably unless the alias name doesn't
exist in the base DT.

```


Not really sure how alias overloading can be supported in kernel without 
breaking existing drivers.

Overlays are starting to feel more like a hack the longer I work on this.


I guess I can try out implementing `foo = &bar;` approach and see how 
that goes.


[0]: 
https://lore.kernel.org/all/20241110-of-alias-v2-0-16da9844a93e@beagleboard.org/T/#t


Ayush Singh


  reply	other threads:[~2024-11-13  9:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02 12:17 [PATCH 0/2] Add support for phandle in symbols Ayush Singh
2024-09-02 12:17 ` [PATCH 1/2] libfdt: overlay: Allow resolving phandle symbols Ayush Singh
2024-09-09  5:03   ` David Gibson
2024-09-09  7:24     ` Ayush Singh
2024-09-12  3:38       ` David Gibson
2024-09-16  9:40         ` Ayush Singh
2024-09-18  2:36           ` David Gibson
2024-09-20 16:34             ` Ayush Singh
2024-09-23  3:41               ` David Gibson
2024-09-23  8:22                 ` Geert Uytterhoeven
2024-09-23  8:38                   ` David Gibson
2024-09-23  9:12                     ` Geert Uytterhoeven
2024-09-23  9:48                       ` David Gibson
2024-11-13  9:46                         ` Ayush Singh [this message]
2024-10-06  5:13                       ` Ayush Singh
2024-09-24  6:41                 ` Ayush Singh
2024-09-25  7:28                   ` David Gibson
2024-09-25  7:58                     ` Geert Uytterhoeven
2024-09-26  3:51                       ` David Gibson
2024-10-03  7:35                     ` Ayush Singh
2024-09-02 12:17 ` [PATCH 2/2] tests: Add test for symbol resolution Ayush Singh
2024-09-05 14:37   ` Andrew Davis
2024-09-05 14:35 ` [PATCH 0/2] Add support for phandle in symbols Andrew Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21d28bc0-da17-4cb8-b205-fa3c101a0ff0@beagleboard.org \
    --to=ayush@beagleboard.org \
    --cc=afd@ti.com \
    --cc=d-gole@ti.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=devicetree-compiler@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=jkridner@beagleboard.org \
    --cc=lorforlinux@beagleboard.org \
    --cc=nenad.marinkovic@mikroe.com \
    --cc=robertcnelson@beagleboard.org \
    --cc=robertcnelson@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).