-
Notifications
You must be signed in to change notification settings - Fork 8.2k
include/drivers: clock_control.h: Add configure() to api #43790
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
d47d678 to
d76cd9a
Compare
d76cd9a to
2d7119f
Compare
2d7119f to
000a70f
Compare
include/drivers/clock_control.h
Outdated
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.
I think we should rename this slightly to be specific to what is getting configure (ie is this just for clock source selection)
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.
This was initially _select() and was then updated to be more generic on this initial comment: #43790 (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.
@galak Also, given the discussion we had yesterday, maybe it's not bad to 'open' the API given:
- we'll likely have a clock_control overhaul in medium term. Letting experiments happen might be a good thing before and then build on these experiments
- since this api implementation is vendor specific anyway, these isn't much risk anyway
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.
My concern with the name is its not clear at all what is being configured an adding an API that vague doesn't make sense to me.
754f34e to
7f9a126
Compare
Add configure() function to clock_control API. This function allows caller to configure a given clock. Signed-off-by: Erwan Gouriou <[email protected]>
7f9a126 to
ee352d6
Compare
|
@nordic-krch, @gmarull PR updated according to comments. Thanks for the review |
|
API meeting:
|
MaureenHelm
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.
No objection to adding this function to the API, but it needs at least one implementation before we merge the PR.
@MaureenHelm On going in following PR: #42097 |
Can we close this PR and merge the API change together with the implementation? |
Up to you. On my side, no problem to keep it open, as it's easier to access than deep down buried into #42097, if people would like to check it. |
I would personally prefer merging this first @MaureenHelm, for future visibility. But I won't argue if you'd rather not. |
I'd rather not. Do we have any non-STM32 implementations in the works? |
|
Merged as part of #45053. Closed |
Add configure() function to clock_control API.
This function should enable caller to configure its source clock.
Extracted from #42097 where its usage is illustrated.
Note:
On maintainer's request, initial
select()has been replaced by more genericconfigure()#42097 is using the initial
select()proposal.Signed-off-by: Erwan Gouriou [email protected]