Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44476 )
Change subject: ec/kontron/kempld: add option to configure I2C frequency ......................................................................
Patch Set 16:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44476/13/src/ec/kontron/kempld/kemp... File src/ec/kontron/kempld/kempld_i2c.c:
https://review.coreboot.org/c/coreboot/+/44476/13/src/ec/kontron/kempld/kemp... PS13, Line 231: dev->chip_info;
For me config_of provides a common way to get the config struct pointer of a given device. […]
It's a nice, common way, I agree. But it also adds an unnecessary die(). Not every developer has ISP comfortably hooked up, so such a die() can be a real PITA. And not everybody is a developer at all. We already have assertions not trigger by default because people used them wrong. If we now use die() as a development tool, we'll soon have a NON_FATAL_DIE Kconfig.
IIRC, the reason that the die() was added was that people were throwing NULL pointers around in soc/intel/. They needed to be told the hard way because the problem became uncontrollable. Generally, we don't have such NULL pointer problems in coreboot. The `dev`, for instance, that is passed to `.init` hooks is guaranteed to be valid. I see now that it was short- sighted to add config_of() as is. :-/