drivers/periph/wdt: Expose configurations to Kconfig#13377
drivers/periph/wdt: Expose configurations to Kconfig#13377fjmolinas merged 8 commits intoRIOT-OS:masterfrom
Conversation
There was a problem hiding this comment.
Currently WDT_WARNING_PERIOD is only supported on the sam0 platform.
If there is already a Kconfig symbol for that, we should make the option depend on that so it's not available when it would do nothing.
Also the range of this value will depend on the individual hardware implementation.
Maybe the option should rather live in cpu/$arch/periph
The problem here is, why this is in the documentation of a common peripheral interface when only one platform supports it? We can add a check to see if
I wouldn't move it to a CPU folder as this configuration, as it is documented, is part of the WDT API. |
Only one platform currently supports it, but when drafting out the API we saw that many platforms could support this, although not all, that is why it was in the public api. The issue was that how each platform handles the wakeup varies a lot, in some cases is it configurable through some range, in others it only has a some discrete values, and in some cases these are just % of the timeout time, e.g. 50% of the timeout. For others its a fixed amount of time independent or dependent of the timeout.
I think we should change the definition in the public to: And then as @benpicco suggested have the symbol definition in What do you think @leandrolanzieri ? |
Is the plan to have this option in most of the platforms? We could leave the definition on this common file and add a dependency to indicate that it's available. Then, every platform can extend the symbol to its needs. It could look like: @fjmolinas thoughts? |
|
@leandrolanzieri seems good! |
|
@fjmolinas done. I had to replicate the dependencies in the CPU-specific Kconfig so they do not weaken. |
|
@leandrolanzieri this one needs rebase! |
e01936f to
90bbea7
Compare
|
@fjmolinas rebased |
|
This works for |
By default disabled options do not show up, you can toggle the |
90bbea7 to
f69427f
Compare
|
@fjmolinas all green |
|
Thanks all for reviewing and testing! |
Contribution description
This moves
WDT_WARNING_PERIODconfiguration macro toCONFIG_namespace and exposes it to Kconfig.Testing procedure
Check that the value can be changed via menuconfig.
Issues/PRs references
Part of #12888