-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Is your enhancement proposal related to a problem? Please describe.
With the new RTC API (#52618), a problem emerges: since devices can only implement one driver interface (#48934), RTC peripherals that were previously used only as counters can't reuse their devicetree compatible to become RTCs without dropping their counter driver.
Describe the solution you'd like
Implement a generic counter driver that can piggyback off any RTC device, allowing RTC devices to still be used as counters. It would internally use the RTC API to implement the counter API.
Describe alternatives you've considered
As done in #56334, there could simply be a check that CONFIG_RTC
and CONFIG_COUNTER
aren't active at the same time, so only either the RTC or counter driver can be implemented for a device. This would probably become quite annoying though because users may want to use an RTC device as an RTC, and a separate counter device as a counter.
cc @bjarki-trackunit