Angel Pons 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: Code-Review-1
(1 comment)
https://review.coreboot.org/c/coreboot/+/44476/16/src/ec/kontron/kempld/kemp... File src/ec/kontron/kempld/kempld_i2c.c:
https://review.coreboot.org/c/coreboot/+/44476/16/src/ec/kontron/kempld/kemp... PS16, Line 247: if (config->i2c_frequency) { Since the only thing you're using `config` for is to get the I2C frequency to use, `config_of` provides no benefit over a null-check here:
const struct ec_kontron_kempld_config *const config = dev->chip_info;
/* ... */
if (config && config->i2c_frequency) { /* ... */
If `config` happens to be null, the default I2C frequency will be used. This is much better than the deliberate brick caused by `die()` in the `config_of()` function.