mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
PM / Runtime: Add sysfs switch for disabling device run-time PM
Add new device sysfs attribute, power/control, allowing the user space to block the run-time power management of the devices. If this attribute is set to "on", the driver of the device won't be able to power manage it at run time (without breaking the rules) and the device will always be in the full power state (except when the entire system goes into a sleep state). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Alan Stern <stern@rowland.harvard.edu>
This commit is contained in:
parent
68c6b85984
commit
5382363917
4 changed files with 101 additions and 0 deletions
|
@ -28,6 +28,8 @@ extern int __pm_runtime_set_status(struct device *dev, unsigned int status);
|
|||
extern int pm_runtime_barrier(struct device *dev);
|
||||
extern void pm_runtime_enable(struct device *dev);
|
||||
extern void __pm_runtime_disable(struct device *dev, bool check_resume);
|
||||
extern void pm_runtime_allow(struct device *dev);
|
||||
extern void pm_runtime_forbid(struct device *dev);
|
||||
|
||||
static inline bool pm_children_suspended(struct device *dev)
|
||||
{
|
||||
|
@ -78,6 +80,8 @@ static inline int __pm_runtime_set_status(struct device *dev,
|
|||
static inline int pm_runtime_barrier(struct device *dev) { return 0; }
|
||||
static inline void pm_runtime_enable(struct device *dev) {}
|
||||
static inline void __pm_runtime_disable(struct device *dev, bool c) {}
|
||||
static inline void pm_runtime_allow(struct device *dev) {}
|
||||
static inline void pm_runtime_forbid(struct device *dev) {}
|
||||
|
||||
static inline bool pm_children_suspended(struct device *dev) { return false; }
|
||||
static inline void pm_suspend_ignore_children(struct device *dev, bool en) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue