mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
LinuxKPI: add can_wakeup option and accessor functions
We can implement device_set_wakeup_capable() in the !CONFIG_PM_SLEEP case; we do not have the infrastructure in place for the CONFIG_PM_SLEEP case so leave a pr_debug TODO. Needed by an upcoming wireless driver. MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D58883
This commit is contained in:
1 parent
c40219c572
commit
a424fb3519
2 files changed
+23
No files matched your search
@@ -49,6 +49,7 @@ struct dev_pm_domain {
|
||||
|
||||
struct dev_pm_info {
|
||||
atomic_t usage_count;
|
||||
bool can_wakeup;
|
||||
};
|
||||
|
||||
#define PM_EVENT_FREEZE 0x0001
|
||||
@@ -111,4 +112,20 @@ pm_vt_switch_unregister(struct device *dev __unused)
|
||||
{
|
||||
}
|
||||
|
||||
#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 */
|
||||
@@ -2833,6 +2833,12 @@ device_can_wakeup(struct device *dev)
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user