diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -49,6 +49,7 @@ struct dev_pm_info { atomic_t usage_count; + bool can_wakeup; }; #define PM_EVENT_FREEZE 0x0001 @@ -111,4 +112,20 @@ { } +#ifdef CONFIG_PM_SLEEP +static inline void +device_set_wakeup_capable(struct device *dev __unused, bool capable __unused) +{ + pr_debug("%s: TODO\n", __func__); +} +#else +void linuxkpi_device_set_wakeup_capable(struct device *, bool); + +static inline void +device_set_wakeup_capable(struct device *dev, bool capable) +{ + linuxkpi_device_set_wakeup_capable(dev, capable); +} +#endif + #endif /* _LINUXKPI_LINUX_PM_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2833,6 +2833,12 @@ return (false); } +void +linuxkpi_device_set_wakeup_capable(struct device *dev, bool capable) +{ + dev->power.can_wakeup = capable; +} + static void devm_device_group_remove(struct device *dev, void *p) {