@@ -823,3 +823,119 @@ Excluding declarations from the header based on compile-time options may prevent
823823their documentation from being generated. Their absence also prevents use of
824824``if (IS_ENABLED(CONFIG_FOO)) {} `` as an alternative to preprocessor
825825conditionals when the code path should change based on the selected options.
826+
827+ Rule A.2: Inclusive Language
828+ ============================
829+
830+ Severity
831+ --------
832+
833+ Required
834+
835+ Description
836+ -----------
837+
838+ Do not introduce new usage of offensive terms listed below. This rule applies
839+ but is not limited to source code, comments, documentation, and branch names.
840+ Replacement terms may vary by area or subsystem, but should aim to follow
841+ updated industry standards when possible.
842+
843+ Exceptions are allowed for maintaining existing implementations or adding new
844+ implementations of industry standard specifications governed externally to the
845+ Zephyr Project.
846+
847+ Existing usage is recommended to change as soon as updated industry standard
848+ specifications become available or new terms are publicly announced by the
849+ governing body, or immediately if no specifications apply.
850+
851+ .. list-table ::
852+ :header-rows: 1
853+
854+ * - Offensive Terms
855+ - Recommended Replacements
856+
857+ * - ``{master,leader} / slave ``
858+ - - ``{primary,main} / {secondary,replica} ``
859+ - ``{initiator,requester} / {target,responder} ``
860+ - ``{controller,host} / {device,worker,proxy,target} ``
861+ - ``director / performer ``
862+ - ``central / peripheral ``
863+
864+ * - ``blacklist / whitelist ``
865+ - * ``denylist / allowlist ``
866+ * ``blocklist / passlist ``
867+ * ``rejectlist / acceptlist ``
868+
869+ * - ``grandfather policy ``
870+ - * ``legacy ``
871+
872+ * - ``sanity ``
873+ - * ``coherence ``
874+ * ``confidence ``
875+
876+
877+ Rationale
878+ ---------
879+
880+ Offensive terms do not create an inclusive community environment and therefore
881+ violate the Zephyr Project `Code of Conduct `_. This coding rule was inspired by
882+ a similar rule in `Linux `_.
883+
884+ .. _Code of Conduct : https://github.com/zephyrproject-rtos/zephyr/blob/master/CODE_OF_CONDUCT.md
885+ .. _Linux : https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=49decddd39e5f6132ccd7d9fdc3d7c470b0061bb
886+
887+ Status
888+ ------
889+
890+ Related GitHub Issues and Pull Requests are tagged with the `Inclusive Language Label `_.
891+
892+ .. list-table ::
893+ :header-rows: 1
894+
895+ * - Area
896+ - Selected Replacements
897+ - Status
898+
899+ * - :ref: `bluetooth_api `
900+ - See `Bluetooth Appropriate Language Mapping Tables `_
901+ -
902+
903+ * - eSPI
904+ - * ``master / slave `` => TBD
905+ -
906+
907+ * - gPTP
908+ - * ``master / slave `` => TBD
909+ -
910+
911+ * - :ref: `i2c_api `
912+ - * ``master / slave `` => TBD
913+ - NXP publishes the `I2C Specification `_ and has selected ``controller /
914+ target `` as replacement terms, but the timing to publish an announcement
915+ or new specification is TBD. Zephyr will update I2C when replacement
916+ terminology is confirmed by a public announcement or updated
917+ specification.
918+
919+ * - :ref: `i2s_api `
920+ - * ``master / slave `` => TBD
921+ -
922+
923+ * - SMP/AMP
924+ - * ``master / slave `` => TBD
925+ -
926+
927+ * - :ref: `spi_api `
928+ - * ``master / slave `` => ``controller / peripheral ``
929+ * ``MOSI / MISO / SS `` => ``SDO / SDI / CS ``
930+ - The Open Source Hardware Association has selected these replacement
931+ terms. See `OSHWA Resolution to Redefine SPI Signal Names `_
932+
933+ * - :ref: `twister_script `
934+ - * ``platform_whitelist `` => ``platform_allow ``
935+ * ``sanitycheck `` => ``twister ``
936+ -
937+
938+ .. _Inclusive Language Label : https://github.com/zephyrproject-rtos/zephyr/issues?q=label%3A%22Inclusive+Language%22
939+ .. _I2C Specification : https://www.nxp.com/docs/en/user-guide/UM10204.pdf
940+ .. _Bluetooth Appropriate Language Mapping Tables : https://btprodspecificationrefs.blob.core.windows.net/language-mapping/Appropriate_Language_Mapping_Table.pdf
941+ .. _OSHWA Resolution to Redefine SPI Signal Names : https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/
0 commit comments