regulator.rst 868 B

1234567891011121314151617181920212223242526272829303132
  1. ==========================
  2. Regulator Driver Interface
  3. ==========================
  4. The regulator driver interface is relatively simple and designed to allow
  5. regulator drivers to register their services with the core framework.
  6. Registration
  7. ============
  8. Drivers can register a regulator by calling::
  9. struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
  10. const struct regulator_config *config);
  11. This will register the regulator's capabilities and operations to the regulator
  12. core.
  13. Regulators can be unregistered by calling::
  14. void regulator_unregister(struct regulator_dev *rdev);
  15. Regulator Events
  16. ================
  17. Regulators can send events (e.g. overtemperature, undervoltage, etc) to
  18. consumer drivers by calling::
  19. int regulator_notifier_call_chain(struct regulator_dev *rdev,
  20. unsigned long event, void *data);