Attention is currently required from: Furquan Shaikh, Subrata Banik, Michael Niewöhner, Patrick Rudolph. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/50176 )
Change subject: soc/intel/common: Add `struct gpio_pad_table` and helpers ......................................................................
Patch Set 1:
(2 comments)
File src/soc/intel/common/block/include/intelblocks/gpio.h:
https://review.coreboot.org/c/coreboot/+/50176/comment/3c749d34_80236c67 PS1, Line 75: const struct pad_config *padcfg; : size_t length; :
modifying padcfg and not adapting the lenght could (will?) lead to problems; what about making both […]
Hmmm, good point. If anything, the current `const` usage is a bit stupid: you can't modify the pad_config values (it's a pointer to `const`struct pad_config`), but you're free to replace the pointer and mess with the `length` value... :D
https://review.coreboot.org/c/coreboot/+/50176/comment/dfa7165d_c50276fb PS1, Line 78: (struct gpio_pad_table)
this cast isn't needed
The cast is there on purpose to allow this usage:
const struct pad_config pad_array[] = { ... }; gpio_configure_pad_table(GPIO_PAD_ARRAY(pad_array));