RFC: API change: clock_control: Change parameters of clock_control_async_on #27423
Labels
area: Clock Control
Breaking API Change
Breaking changes to stable, public APIs
RFC
Request For Comments: want input from the community
Problem Description
clock_control_async_on
initiates asynchronous start of the clock. It was initially introduced mainly to cover Nordic case were there are multiple users of one clock willing to start a clock asynchronously. Function takesstruct clock_control_async_data
as the parameter which consists of callback, user_data and list node. Structure can be linked by the driver to support multiple requests. Because of that, API requires that structure is valid until clock is started and callback is executed.Asynchronous clock start was added to cover Nordic case and currently isn't used by any other implementation. On the other hand, API does not mention reference counting which was implicitly implemented in the Nordic clock control driver which lead to the confusion (see #20806).
Meanwhile
onoff_manager
was added to handle multiple users of the single resource in a generic way and Nordic clock control driver was adapted to use it (#24334). Once it was merged, Nordic clock control driver does use reference counting thus does not require enqueueing asynchronous requests since there is only one clock user (onoff manager). Since no other driver is using it and there is a model in place for multiple users (accessing clock through onoff API) havingstruct clock_control_async_data
became redundant and confusing.Proposed change
Remove linked structure and any notion of support for multiple users of the single clock source.
Detailed RFC
Convert
to
Dependencies
Only Nordic driver was implementing that API.
The text was updated successfully, but these errors were encountered: