39 lines · plain
1==========================2Regulator API design notes3==========================4 5This document provides a brief, partially structured, overview of some6of the design considerations which impact the regulator API design.7 8Safety9------10 11 - Errors in regulator configuration can have very serious consequences12 for the system, potentially including lasting hardware damage.13 - It is not possible to automatically determine the power configuration14 of the system - software-equivalent variants of the same chip may15 have different power requirements, and not all components with power16 requirements are visible to software.17 18.. note::19 20 The API should make no changes to the hardware state unless it has21 specific knowledge that these changes are safe to perform on this22 particular system.23 24Consumer use cases25------------------26 27 - The overwhelming majority of devices in a system will have no28 requirement to do any runtime configuration of their power beyond29 being able to turn it on or off.30 31 - Many of the power supplies in the system will be shared between many32 different consumers.33 34.. note::35 36 The consumer API should be structured so that these use cases are37 very easy to handle and so that consumers will work with shared38 supplies without any additional effort.39