Skip to content
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

dts: bindings: timer: move a few counter bindings to correct location #81473

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

danieldegrasse
Copy link
Collaborator

@danieldegrasse danieldegrasse commented Nov 15, 2024

A few bindings in the timer directory (for kernel timing sources) were being used for counters (which can have alarms set, and have a distinct API). Move these bindings to the counters directory.

Bindings found with:

ls dts/bindings/timer/* | sed 's/dts\/bindings\/timer\/\(.*\).yaml/\1/' | sed 's/,/_/' | sed 's/-/_/g' | grep -f - -r drivers/counter

@zephyrbot zephyrbot added size: XS A PR changing only a single line of code platform: NXP S32 NXP Semiconductors, S32 platform: NXP Drivers NXP Semiconductors, drivers labels Nov 15, 2024
@danieldegrasse danieldegrasse added this to the v4.1.0 milestone Nov 15, 2024
A few bindings in the timer directory (for kernel timing sources) were
being used for counters (which can have alarms set, and have a distinct
API). Move these bindings to the counters directory.

Signed-off-by: Daniel DeGrasse <[email protected]>
@zephyrbot zephyrbot added platform: Raspberry Pi Pico Raspberry Pi Pico (RPi Pico) platform: nRF Nordic nRFx platform: Renesas SmartBond Renesas Electronics Corporation, SmartBond platform: GD32 GigaDevice platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) labels Nov 15, 2024
Copy link
Member

@manuargue manuargue Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with the change, but what would be the right place for hw timers that could be used either as a system timer or as a counter? perhaps the binding is defined in one place and the other binding inherits from it?
Currently there's only a counter driver for this hw counter, but in the future we may introduce a system timer driver as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good question. Personally, I would lean towards the timer folder, but I am not sure if it matters too much. The reason for this PR was that I got myself confused when looking at some counter drivers, and assumed they were timer drivers because of their binding location.

@decsny any preference here?

@nashif nashif merged commit 35f6c49 into zephyrproject-rtos:main Nov 19, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: GD32 GigaDevice platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) platform: nRF Nordic nRFx platform: NXP Drivers NXP Semiconductors, drivers platform: NXP S32 NXP Semiconductors, S32 platform: Raspberry Pi Pico Raspberry Pi Pico (RPi Pico) platform: Renesas SmartBond Renesas Electronics Corporation, SmartBond size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants