-
Notifications
You must be signed in to change notification settings - Fork 8.2k
soc: sam0: Enable generic peripheral selection #14832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14832 +/- ##
=======================================
Coverage 52.51% 52.51%
=======================================
Files 309 309
Lines 45048 45048
Branches 10419 10419
=======================================
Hits 23656 23656
Misses 16584 16584
Partials 4808 4808Continue to review full report at Codecov.
|
|
We should open an enhancement request to cleanup the boards to remove enabling any peripherals by default that aren't needed. |
|
Why don't we do e.g. this instead? Should work out to the same thing in practice, unless I'm missing something, and it centralizes SAM0 stuff. diff --git a/drivers/serial/Kconfig.sam0 b/drivers/serial/Kconfig.sam0
index da3a5f4209..75aa63aa3c 100644
--- a/drivers/serial/Kconfig.sam0
+++ b/drivers/serial/Kconfig.sam0
@@ -5,6 +5,7 @@
menuconfig UART_SAM0
bool "Atmel SAM0 series SERCOM USART driver"
+ default y
depends on SOC_FAMILY_SAM0
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT(Unrelated side note: Avoid the |
|
Another option is to enable them in the board defconfig file. Might be cleanest of all. Drawback is having to enable the dependencies too, if they're not |
|
@ulfalizer that would always enable Maybe |
|
@benpicco I added some clarifications to how |
|
Ah I did no see that! In this case, I might as well enable it there. |
0cfe611 to
a18506f
Compare
ulfalizer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@benpicco The same information is shown in the menuconfig too, in the symbol information (press (Trying to plug the menuconfig, because it's handy for checking changes, even though many people don't use it otherwise.) |
Make sure that when e.g. CONFIG_SERIAL is set, CONFIG_UART_SAM0 is selected automatically when the sam0 SoC family is used. Signed-off-by: Benjamin Valentin <[email protected]>
Make sure that when e.g. CONFIG_SERIAL is set, CONFIG_UART_SAM0 is
selected automatically when the sam0 SoC family is used.
This fixes several examples & tests that will otherwise only compile after manually tweaking the configuration.