Skip to content

Commit a764774

Browse files
committed
CONTRIBUTING.md: Add bindings&software version guidelines
To ensure consistency with software, add guidelines on how to use the semantic versioning information. The first release should have major version at least 1. The dt-binding compatible must be suffixed by -v<major>. Signed-off-by: Jorge Marques <[email protected]>
1 parent 90c35d7 commit a764774

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

CONTRIBUTING.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,25 @@ and responsibilities that he or she has by using them.
139139
- If it's the case, to update all the README files of the affected projects
140140
and IP cores.
141141

142-
Resources:
142+
## Devicetree bindings & drivers
143+
144+
The IPs typically follow [Semantic Versioning 2.0.0](https://semver.org/)
145+
and his information must be used in devicetree bindings and drivers to assert
146+
compatibility. The first stable release version should be higher or equal to
147+
v1.0.0 and all fields should be treated as decimals.
148+
149+
Devicetree compatibles take the major number prefixed by **v**, for example,
150+
the **compatible** of *axi_my_ip* v1.2.3 is **adi,axi-my-ip-v1** and the
151+
**dt-binding** filename is **adi,axi-my-ip.yaml** (no major suffix). Per the
152+
last paragraph, *adi,axi-my-ip-v0* is **never** appropriate.
153+
154+
Software drivers must parse the **VERSION** register for feature handling
155+
across versions. The patch number shouldn't have to be handled by software
156+
drivers, if it seems necessary to, consider incrementing the minor number
157+
instead.
158+
159+
## Related resources
160+
143161
* [How to write a good commit message](https://cbea.ms/git-commit/) and [another resource](https://gist.github.com/rsp/057481db4dbd999bb7077f211f53f212)
144162
* [Write better commits, build better projects](https://github.blog/2022-06-30-write-better-commits-build-better-projects/)
145163
* [Good commit example (but extreme one)](https://dhwthompson.com/2019/my-favourite-git-commit)

0 commit comments

Comments
 (0)