lib: os: onoff: add API for on-off service request and release management

There are various situations where it's necessary to support turning
devices on or off at runtime, includin power rails, clocks, other
peripherals, and binary device power management.  The complexity of
properly managing multiple consumers of a device in a multithreaded
system suggests that a shared implementation is desirable.  This
commit provides an API that supports managing on-off resources.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
Peter A. Bigot 2019-11-30 08:12:09 -06:00 committed by Carles Cufí
commit 1964bf08bb
11 changed files with 2384 additions and 0 deletions

2
tests/lib/onoff/prj.conf Normal file
View file

@ -0,0 +1,2 @@
CONFIG_POLL=y
CONFIG_ZTEST=y