-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Introduction
Devicetree properties, by convention, use dash (-
) as a word separator. This RFC proposes making this a requirement for upstream bindings.
Problem description
There are currently no automated checks in CI that ensure that devicetree properties use dashes as separators. As a result, many properties use underscore (_
) as a separator. This is inconsistent with the style adopted by the devicetree specification for all standard properties (with the exception of device_type
, but this property is deprecated and has limited usage).
It would be better style to use dashes instead, and would make things consistent for users typing properties. It also would avoid situations like having a foo-bar
and foo_bar
property defined on the same node due to typos.
Proposed change
- Make all in-tree bindings and DTS files use dashes
- Add CI checks to make sure we don't regress this
Detailed RFC
This is a straightforward treewide change.
Proposed change (Detailed)
- Use grep to fix in-tree occurrences
- Modify edtlib to expose first-class methods that list all binding objects
- Add a new compliance check that uses these methods to complain on regressions, allowing administrator override if cases arise where we are inheriting an underscore in a property name from Linux bindings or other authoritative sources
Dependencies
Out of tree users of existing bindings will need to migrate to the new property names.
Concerns and Unresolved Questions
None.
Alternatives
An approach which allowed both styles for backwards incompatibility was considered, but this is too ripe for introducing simultaneous use of foo-bar
vs foo_bar
in a single devicetree.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status