pm: device: add deprecated busy APIs
Add old APIs marked as deprecated. The API keep the same behavior as before, so external users have time to migrate their codebase. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
caf3369927
commit
ec9346c605
1 changed files with 20 additions and 0 deletions
|
@ -186,6 +186,26 @@ static inline bool pm_device_is_any_busy(void) { return false; }
|
|||
static inline bool pm_device_is_busy(const struct device *dev) { return false; }
|
||||
#endif
|
||||
|
||||
__deprecated static inline void device_busy_set(const struct device *dev)
|
||||
{
|
||||
pm_device_busy_set(dev);
|
||||
}
|
||||
|
||||
__deprecated static inline void device_busy_clear(const struct device *dev)
|
||||
{
|
||||
pm_device_busy_clear(dev);
|
||||
}
|
||||
|
||||
__deprecated static inline int device_any_busy_check(void)
|
||||
{
|
||||
return pm_device_is_any_busy() ? -EBUSY : 0;
|
||||
}
|
||||
|
||||
__deprecated static inline int device_busy_check(const struct device *dev)
|
||||
{
|
||||
return pm_device_is_busy(dev) ? -EBUSY : 0;
|
||||
}
|
||||
|
||||
/** Alias for legacy use of device_pm_control_nop */
|
||||
#define device_pm_control_nop __DEPRECATED_MACRO NULL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue