power: device: deduplicate suspending code
Function to put devices in lower power mode were all implemented in the same way. Deduplicate code there by implementing single function to handle all cases. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This commit is contained in:
parent
8224a449a2
commit
21409494d1
2 changed files with 37 additions and 32 deletions
|
@ -361,6 +361,13 @@ __syscall struct device *device_get_binding(const char *name);
|
|||
|
||||
#endif /* CONFIG_DEVICE_POWER_MANAGEMENT */
|
||||
|
||||
/**
|
||||
* @brief Get name of device PM state
|
||||
*
|
||||
* @param state State id which name should be returned
|
||||
*/
|
||||
const char *device_pm_state_str(u32_t state);
|
||||
|
||||
/**
|
||||
* @brief Indicate that the device is in the middle of a transaction
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue