The driver actually will try to load from a mtd partition if it can’t find the eeprom in the device tree…
data = of_get_property(np, "mediatek,eeprom-data", &size);
if (data) {
if (size > len)
return -EINVAL;
memcpy(eep, data, size);
return 0;
}
list = of_get_property(np, "mediatek,mtd-eeprom", &size);
…but for some reason it wants to read which mtd partition from the device tree, so I have the same problem - I don’t know how to specify a device tree node for a PCI card.
This is a fantastic solution. I was going to make an ugly hack to put the eeprom right into the driver, but this is a much better solution!