On 9/9/24 10:33, David Gibson wrote:
On Mon, Sep 02, 2024 at 05:47:55PM +0530, Ayush Singh wrote:
Add ability to resolve symbols pointing to phandles instead of strings.
Combining this with existing fixups infrastructure allows creating
symbols in overlays that refer to undefined phandles. This is planned to
be used for addon board chaining [1].
I don't think this "autodetection" of whether the value is a phandle
or path is a good idea. Yes, it's probably unlikely to get it wrong
in practice, but sloppy cases like this have a habit of coming back to
bite you later on. If you want this, I think you need to design a new
way of encoding the new options.
Would something like `__symbols_phandle__` work? It should be fairly
straightforward to do. I am not sure how old devicetree compilers will
react to it though?
I really do not think having a different syntax for phandle symbols
would be good since that would mean we will have 2 ways to represent
phandles:
1. For __symbols__
2. For every other node.
I also am not in the favor of doing something bespoke that does not play
nice with the existing __fixups__ infra since that has already been
thoroughly tested, and already creates __fixups__ for symbols.
Ayush Singh