pm: add type for device PM control callback
Add a type and documentation for the device PM control callback. This way possible return codes and its meaning are documented. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
6d273f49bd
commit
8be0472ba8
2 changed files with 14 additions and 2 deletions
|
@ -93,6 +93,19 @@ struct pm_device {
|
|||
struct k_condvar condvar;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Device power management control function callback.
|
||||
*
|
||||
* @param dev Device instance.
|
||||
* @param state Requested state.
|
||||
*
|
||||
* @retval 0 If successful.
|
||||
* @retval -ENOTSUP If the requested state is not supported.
|
||||
* @retval Errno Other negative errno on failure.
|
||||
*/
|
||||
typedef int (*pm_device_control_callback_t)(const struct device *dev,
|
||||
enum pm_device_state state);
|
||||
|
||||
/**
|
||||
* @brief Get name of device PM state
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue