refactor(Kconfig): Extracted designer defaults out into new files
This is an alternative approach to #1886, with the same end goal. All of the "designer configurable" defaults are extracted out to separate files named Kconfig.defaults. The definitions stay in the same Kconfig file, only the defaults move. The defaults are imported after the keyboard config options, allowing them to be overridden by designers.
I used my own judgement to decide whether an option should be treated as "designer configurable". In general:
- Anything related to behaviors or how the keyboard would be used is a user config option and the designer has no business touching it
- Anything listed under our docs that isn't strictly a user config option is made available to designers
- ~~Specific additional options are made available to designers, such as USB vendor ID -- companies who have their own VID may want to override this one.~~
~~There are also some options that are listed in the docs, which I don't think should be listed in the docs as I don't understand why either designers or users should have any business touching them. For example:~~
- ~~
CONFIG_ZMK_USB_INIT_PRIORITY~~ - ~~
CONFIG_ZMK_BLE_INIT_PRIORITY~~
~~I have included such flags where I was uncertain as "designer configurable" out of caution.~~
While at it, I added a name to the EC11 trigger mode choice, and updated some values listed in the docs to be accurate.
Hopefully this more explicit approach is more "palatable" than #1886 and can get merged easier...
Moved the USB PID/VID stuff back to the standard Kconfig file. I realised that the Kconfig.defaults files should only be used for stuff that both the user and the designer may want to configure. For designer-only and user-only, they have their respective .conf files.
Fixed formatting of comments as requested, did a pass to catch any that were previously misformatted (bunch of wrong spacings). While I was at it, I did a pass over the if blocks, moving lonely ones into depends on, and moving another one into a menu (bottom of this).
I also got rid of the if blocks in the Kconfig.defaults, as on reading the page again if blocks get turned into depends on internally, making the if statements in the defaults pages redundant.
I left those last changes as a separate commit, to let it be removed easily if you'd prefer them not to change like this. Let me know if you want me to squash that or remove it.
Did some local testing, ended up popping the if-refactor. Turns out they are not equivalent, Zephyr docs are wrong there.
I built both halves of corne with n!nv2, nice60, and bt60_v2, and diff'd the resulting .config files against each other. For each of those, there is only one difference with the current version of the refactor: The location of the CONFIG_SPI flag in the resulting output file, be it a comment that it was unset or it being set to y.
Currently it is being grouped under the RGB_UNDERGLOW section, with this change it gets moved under the advanced section alongside I2C etc.
Does this require any docs changes? Does it affect the warning note at https://zmk.dev/docs/development/hardware-integration/new-shield#user-configuration-files?