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 endThe 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
endNo global names anymore! I hope you like that, Aaron :)
Meh, https://review.coreboot.org/16080
If we have code at the mainboard level that needs a device
reference (e.g. smbios_mainboard_serial_number()) how could
that be handled? any ideas? revert to mb/chip.h?
To view, visit change 35456. To unsubscribe, or for help writing mail filters, visit settings.