From d933e7417f58a673886293448230d099e04eb211 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Thu, 19 Oct 2023 09:37:06 +0000 Subject: [PATCH] doc: guidelines: add a note about specialized drivers Add a note about requirements for specialized drivers, clarifying the requirements about using Zephyr APIs. Signed-off-by: Fabio Baltieri --- doc/contribute/guidelines.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/contribute/guidelines.rst b/doc/contribute/guidelines.rst index 5460d0954e..bc6bbed81b 100644 --- a/doc/contribute/guidelines.rst +++ b/doc/contribute/guidelines.rst @@ -1026,3 +1026,18 @@ Some example past treewide changes are: Note that adding a new version of a widely used API while maintaining support for the old one is not a treewide change. Deprecation and removal of such APIs, however, are treewide changes. + +Specialized driver requirements +=============================== + +Drivers for standalone devices should use the Zephyr bus APIs (SPI, I2C...) +whenever possible so that the device can be used with any SoC from any vendor +implementing a compatible bus. + +If it is not technically possible to achieve full performance using the Zephyr +APIs due to specialized accelerators in a particular SoC family, one could +extend the support for an external device by providing a specialized path for +that SoC family. However, the driver must still provide a regular path (via +Zephyr APIs) for all other SoCs. Every exception must be approved by the +Architecture WG in order to be validated and potentially to be learned/improved +from.