mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM / Hibernate: Fix preallocating of memory PM / Hibernate: Remove swsusp.c finally PM / Hibernate: Remove trailing space in message PM: Allow SCSI devices to suspend/resume asynchronously PM: Allow USB devices to suspend/resume asynchronously USB: implement non-tree resume ordering constraints for PCI host controllers PM: Allow PCI devices to suspend/resume asynchronously PM / Hibernate: Swap, remove useless check from swsusp_read() PM / Hibernate: Really deprecate deprecated user ioctls PM: Allow device drivers to use dpm_wait() PM: Start asynchronous resume threads upfront PM: Add facility for advanced testing of async suspend/resume PM: Add a switch for disabling/enabling asynchronous suspend/resume PM: Asynchronous suspend and resume of devices PM: Add parent information to timing messages PM: Document device power attributes in sysfs PM / Runtime: Add sysfs switch for disabling device run-time PM
This commit is contained in:
commit
06a79b82b2
28 changed files with 631 additions and 84 deletions
|
|
@ -472,6 +472,23 @@ static inline int device_is_registered(struct device *dev)
|
|||
return dev->kobj.state_in_sysfs;
|
||||
}
|
||||
|
||||
static inline void device_enable_async_suspend(struct device *dev)
|
||||
{
|
||||
if (dev->power.status == DPM_ON)
|
||||
dev->power.async_suspend = true;
|
||||
}
|
||||
|
||||
static inline void device_disable_async_suspend(struct device *dev)
|
||||
{
|
||||
if (dev->power.status == DPM_ON)
|
||||
dev->power.async_suspend = false;
|
||||
}
|
||||
|
||||
static inline bool device_async_suspend_enabled(struct device *dev)
|
||||
{
|
||||
return !!dev->power.async_suspend;
|
||||
}
|
||||
|
||||
void driver_init(void);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include <linux/spinlock.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/completion.h>
|
||||
|
||||
/*
|
||||
* Callbacks for platform drivers to implement.
|
||||
|
|
@ -412,9 +413,11 @@ struct dev_pm_info {
|
|||
pm_message_t power_state;
|
||||
unsigned int can_wakeup:1;
|
||||
unsigned int should_wakeup:1;
|
||||
unsigned async_suspend:1;
|
||||
enum dpm_state status; /* Owned by the PM core */
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
struct list_head entry;
|
||||
struct completion completion;
|
||||
#endif
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
struct timer_list suspend_timer;
|
||||
|
|
@ -430,6 +433,7 @@ struct dev_pm_info {
|
|||
unsigned int request_pending:1;
|
||||
unsigned int deferred_resume:1;
|
||||
unsigned int run_wake:1;
|
||||
unsigned int runtime_auto:1;
|
||||
enum rpm_request request;
|
||||
enum rpm_status runtime_status;
|
||||
int runtime_error;
|
||||
|
|
@ -508,6 +512,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
|
|||
__suspend_report_result(__func__, fn, ret); \
|
||||
} while (0)
|
||||
|
||||
extern void device_pm_wait_for_dev(struct device *sub, struct device *dev);
|
||||
#else /* !CONFIG_PM_SLEEP */
|
||||
|
||||
#define device_pm_lock() do {} while (0)
|
||||
|
|
@ -520,6 +525,7 @@ static inline int dpm_suspend_start(pm_message_t state)
|
|||
|
||||
#define suspend_report_result(fn, ret) do {} while (0)
|
||||
|
||||
static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {}
|
||||
#endif /* !CONFIG_PM_SLEEP */
|
||||
|
||||
/* How to reorder dpm_list after device_move() */
|
||||
|
|
|
|||
|
|
@ -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) {}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,11 @@
|
|||
|
||||
extern int pm_trace_enabled;
|
||||
|
||||
static inline int pm_trace_is_enabled(void)
|
||||
{
|
||||
return pm_trace_enabled;
|
||||
}
|
||||
|
||||
struct device;
|
||||
extern void set_trace_device(struct device *);
|
||||
extern void generate_resume_trace(const void *tracedata, unsigned int user);
|
||||
|
|
@ -17,6 +22,8 @@ extern void generate_resume_trace(const void *tracedata, unsigned int user);
|
|||
|
||||
#else
|
||||
|
||||
static inline int pm_trace_is_enabled(void) { return 0; }
|
||||
|
||||
#define TRACE_DEVICE(dev) do { } while (0)
|
||||
#define TRACE_RESUME(dev) do { } while (0)
|
||||
|
||||
|
|
|
|||
|
|
@ -339,6 +339,7 @@ struct usb_bus {
|
|||
|
||||
struct usb_devmap devmap; /* device address allocation map */
|
||||
struct usb_device *root_hub; /* Root hub */
|
||||
struct usb_bus *hs_companion; /* Companion EHCI bus, if any */
|
||||
struct list_head bus_list; /* list of busses */
|
||||
|
||||
int bandwidth_allocated; /* on this bus: how much of the time
|
||||
|
|
|
|||
Loading…
Reference in a new issue