design.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. Regulator API design notes
  2. ==========================
  3. This document provides a brief, partially structured, overview of some
  4. of the design considerations which impact the regulator API design.
  5. Safety
  6. ------
  7. - Errors in regulator configuration can have very serious consequences
  8. for the system, potentially including lasting hardware damage.
  9. - It is not possible to automatically determine the power configuration
  10. of the system - software-equivalent variants of the same chip may
  11. have different power requirements, and not all components with power
  12. requirements are visible to software.
  13. => The API should make no changes to the hardware state unless it has
  14. specific knowledge that these changes are safe to perform on this
  15. particular system.
  16. Consumer use cases
  17. ------------------
  18. - The overwhelming majority of devices in a system will have no
  19. requirement to do any runtime configuration of their power beyond
  20. being able to turn it on or off.
  21. - Many of the power supplies in the system will be shared between many
  22. different consumers.
  23. => The consumer API should be structured so that these use cases are
  24. very easy to handle and so that consumers will work with shared
  25. supplies without any additional effort.