Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35456 )
Change subject: [RFC] sconfig: Allow to give static device nodes a name
......................................................................
Patch Set 2:
To solve my original problem, I have a more elaborate scheme
in mind now:
The piece of code that consumes the device reference would
have to be a driver that is hooked up as a `chip` in the dt.
In the `chip.h` we'd declare the device reference as part
of the config struct, e.g.:
struct some_chip_driver_config {
DEVTREE_CONST struct device *needed_eeprom;
};
Now in the dt, we'd name the referenced device, but only
for sconfig's internal use:
device i2c 0x50 alias my_eeprom on end
The author of the dt would be free to choose this name.
Later, when configuring the driver in the dt we would
associate this given name with the one in the `chip.h`:
chip some/chip/driver
use my_eeprom as needed_eeprom
end
No global names anymore! I hope you like that, Aaron :)
--
To view, visit
https://review.coreboot.org/c/coreboot/+/35456
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I058a319f9b968924fbef9485a96c9e3f900a3ee8
Gerrit-Change-Number: 35456
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Aaron Durbin
adurbin@chromium.org
Gerrit-Reviewer: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Reviewer: Felix Held
felix-coreboot@felixheld.de
Gerrit-Reviewer: Furquan Shaikh
furquan@google.com
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Kyösti Mälkki
kyosti.malkki@gmail.com
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Angel Pons
th3fanbus@gmail.com
Gerrit-Comment-Date: Fri, 20 Sep 2019 09:37:53 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment