Attention is currently required from: Raul Rangel, Matt DeVillier, Karthik Ramasubramanian. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63211 )
Change subject: drivers/i2c/generic: Add support for i2c device detection ......................................................................
Patch Set 1:
(3 comments)
File src/drivers/i2c/generic/generic.c:
https://review.coreboot.org/c/coreboot/+/63211/comment/5df78ad7_ba74aa97 PS1, Line 70: (struct device *) Oops I think we constified i2c_busdev, so this cast shouldn't be necessary right?
https://review.coreboot.org/c/coreboot/+/63211/comment/38069023_273b8aa3 PS1, Line 73: if (!detected) I would add a message here, saying that no ACPI entry is being created for this device b/c it was not detected
https://review.coreboot.org/c/coreboot/+/63211/comment/4e524af4_72df0585 PS1, Line 71: bool detected = busdev->ops->ops_i2c_bus->detect(busdev, : dev->path.i2c.device); : if (!detected) : return; make sure to check `busdev` and the `detect` fn pointer aren't NULL, too, (maybe more prints too) e.g.
``` struct device *const busdev = i2c_busdev((struct device *)dev); if (busdev && busdev->ops->ops_i2c_bus->detect) { printk(BIOS_INFO, "Attempting I2C detection of %s\n", dev_path(dev)); if (!busdev->ops->ops_i2c_bus->detect(busdev, dev->path.i2c.device)) { printk(BIOS_INFO, "Device %s was not detected; no ACPI entry will be created\n", dev_path(dev)); return; } } ```