submitting-patches.rst 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ==========================================
  3. Submitting Devicetree (DT) binding patches
  4. ==========================================
  5. I. For patch submitters
  6. =======================
  7. 0) Normal patch submission rules from
  8. Documentation/process/submitting-patches.rst applies.
  9. 1) The Documentation/ and include/dt-bindings/ portion of the patch should
  10. be a separate patch. The preferred subject prefix for binding patches is::
  11. "dt-bindings: <binding dir>: ..."
  12. Few subsystems, like ASoC, media, regulators and SPI, expect reverse order
  13. of the prefixes::
  14. "<binding dir>: dt-bindings: ..."
  15. The 80 characters of the subject are precious. It is recommended to not
  16. use "Documentation" or "doc" because that is implied. All bindings are
  17. docs. Repeating "binding" again should also be avoided.
  18. 2) DT binding files are written in DT schema format using json-schema
  19. vocabulary and YAML file format. The DT binding files must pass validation
  20. by running::
  21. make dt_binding_check
  22. See Documentation/devicetree/bindings/writing-schema.rst for more details
  23. about schema and tools setup.
  24. 3) DT binding files should be dual licensed. The preferred license tag is
  25. (GPL-2.0-only OR BSD-2-Clause).
  26. 4) Submit the entire series to the devicetree mailinglist at
  27. devicetree@vger.kernel.org
  28. and Cc: the DT maintainers. Use scripts/get_maintainer.pl to identify
  29. all of the DT maintainers.
  30. 5) The Documentation/ portion of the patch should come in the series before
  31. the code implementing the binding.
  32. 6) Any compatible strings used in a chip or board DTS file must be
  33. previously documented in the corresponding DT binding file
  34. in Documentation/devicetree/bindings. This rule applies even if
  35. the Linux device driver does not yet match on the compatible
  36. string. [ checkpatch will emit warnings if this step is not
  37. followed as of commit bff5da4335256513497cc8c79f9a9d1665e09864
  38. ("checkpatch: add DT compatible string documentation checks"). ]
  39. 7) If a documented compatible string is not yet matched by the
  40. driver, the documentation should also include a compatible
  41. string that is matched by the driver.
  42. 8) Bindings are actively used by multiple projects other than the Linux
  43. Kernel, extra care and consideration may need to be taken when making changes
  44. to existing bindings.
  45. II. For kernel maintainers
  46. ==========================
  47. 1) If you aren't comfortable reviewing a given binding, reply to it and ask
  48. the devicetree maintainers for guidance. This will help them prioritize
  49. which ones to review and which ones are ok to let go.
  50. 2) For driver (not subsystem) bindings: If you are comfortable with the
  51. binding, and it hasn't received an Acked-by from the devicetree
  52. maintainers after a few weeks, go ahead and take it.
  53. For subsystem bindings (anything affecting more than a single device),
  54. getting a devicetree maintainer to review it is required.
  55. 3) For a series going though multiple trees, the binding patch should be
  56. kept with the driver using the binding.
  57. III. Notes
  58. ==========
  59. 0) Please see Documentation/devicetree/bindings/ABI.rst for details
  60. regarding devicetree ABI.
  61. 1) This document is intended as a general familiarization with the process as
  62. decided at the 2013 Kernel Summit. When in doubt, the current word of the
  63. devicetree maintainers overrules this document. In that situation, a patch
  64. updating this document would be appreciated.