mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 13:09:04 -04:00
Merge branch 'power-domains' into for-linus
* power-domains: PM: Fix build issue in clock_ops.c for CONFIG_PM_RUNTIME unset PM: Revert "driver core: platform_bus: allow runtime override of dev_pm_ops" OMAP1 / PM: Use generic clock manipulation routines for runtime PM PM / Runtime: Generic clock manipulation rountines for runtime PM (v6) PM / Runtime: Add subsystem data field to struct dev_pm_info OMAP2+ / PM: move runtime PM implementation to use device power domains PM / Platform: Use generic runtime PM callbacks directly shmobile: Use power domains for platform runtime PM PM: Export platform bus type's default PM callbacks PM: Make power domain callbacks take precedence over subsystem ones
This commit is contained in:
commit
290c748725
15 changed files with 688 additions and 446 deletions
|
|
@ -150,9 +150,6 @@ extern struct platform_device *platform_create_bundle(struct platform_driver *dr
|
|||
struct resource *res, unsigned int n_res,
|
||||
const void *data, size_t size);
|
||||
|
||||
extern const struct dev_pm_ops * platform_bus_get_pm_ops(void);
|
||||
extern void platform_bus_set_pm_ops(const struct dev_pm_ops *pm);
|
||||
|
||||
/* early platform driver interface */
|
||||
struct early_platform_driver {
|
||||
const char *class_str;
|
||||
|
|
@ -205,4 +202,64 @@ static inline char *early_platform_driver_setup_func(void) \
|
|||
}
|
||||
#endif /* MODULE */
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
extern int platform_pm_prepare(struct device *dev);
|
||||
extern void platform_pm_complete(struct device *dev);
|
||||
#else
|
||||
#define platform_pm_prepare NULL
|
||||
#define platform_pm_complete NULL
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
extern int platform_pm_suspend(struct device *dev);
|
||||
extern int platform_pm_suspend_noirq(struct device *dev);
|
||||
extern int platform_pm_resume(struct device *dev);
|
||||
extern int platform_pm_resume_noirq(struct device *dev);
|
||||
#else
|
||||
#define platform_pm_suspend NULL
|
||||
#define platform_pm_resume NULL
|
||||
#define platform_pm_suspend_noirq NULL
|
||||
#define platform_pm_resume_noirq NULL
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HIBERNATE_CALLBACKS
|
||||
extern int platform_pm_freeze(struct device *dev);
|
||||
extern int platform_pm_freeze_noirq(struct device *dev);
|
||||
extern int platform_pm_thaw(struct device *dev);
|
||||
extern int platform_pm_thaw_noirq(struct device *dev);
|
||||
extern int platform_pm_poweroff(struct device *dev);
|
||||
extern int platform_pm_poweroff_noirq(struct device *dev);
|
||||
extern int platform_pm_restore(struct device *dev);
|
||||
extern int platform_pm_restore_noirq(struct device *dev);
|
||||
#else
|
||||
#define platform_pm_freeze NULL
|
||||
#define platform_pm_thaw NULL
|
||||
#define platform_pm_poweroff NULL
|
||||
#define platform_pm_restore NULL
|
||||
#define platform_pm_freeze_noirq NULL
|
||||
#define platform_pm_thaw_noirq NULL
|
||||
#define platform_pm_poweroff_noirq NULL
|
||||
#define platform_pm_restore_noirq NULL
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
#define USE_PLATFORM_PM_SLEEP_OPS \
|
||||
.prepare = platform_pm_prepare, \
|
||||
.complete = platform_pm_complete, \
|
||||
.suspend = platform_pm_suspend, \
|
||||
.resume = platform_pm_resume, \
|
||||
.freeze = platform_pm_freeze, \
|
||||
.thaw = platform_pm_thaw, \
|
||||
.poweroff = platform_pm_poweroff, \
|
||||
.restore = platform_pm_restore, \
|
||||
.suspend_noirq = platform_pm_suspend_noirq, \
|
||||
.resume_noirq = platform_pm_resume_noirq, \
|
||||
.freeze_noirq = platform_pm_freeze_noirq, \
|
||||
.thaw_noirq = platform_pm_thaw_noirq, \
|
||||
.poweroff_noirq = platform_pm_poweroff_noirq, \
|
||||
.restore_noirq = platform_pm_restore_noirq,
|
||||
#else
|
||||
#define USE_PLATFORM_PM_SLEEP_OPS
|
||||
#endif
|
||||
|
||||
#endif /* _PLATFORM_DEVICE_H_ */
|
||||
|
|
|
|||
|
|
@ -460,6 +460,7 @@ struct dev_pm_info {
|
|||
unsigned long active_jiffies;
|
||||
unsigned long suspended_jiffies;
|
||||
unsigned long accounting_timestamp;
|
||||
void *subsys_data; /* Owned by the subsystem. */
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -245,4 +245,46 @@ static inline void pm_runtime_dont_use_autosuspend(struct device *dev)
|
|||
__pm_runtime_use_autosuspend(dev, false);
|
||||
}
|
||||
|
||||
struct pm_clk_notifier_block {
|
||||
struct notifier_block nb;
|
||||
struct dev_power_domain *pwr_domain;
|
||||
char *con_ids[];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM_RUNTIME_CLK
|
||||
extern int pm_runtime_clk_init(struct device *dev);
|
||||
extern void pm_runtime_clk_destroy(struct device *dev);
|
||||
extern int pm_runtime_clk_add(struct device *dev, const char *con_id);
|
||||
extern void pm_runtime_clk_remove(struct device *dev, const char *con_id);
|
||||
extern int pm_runtime_clk_suspend(struct device *dev);
|
||||
extern int pm_runtime_clk_resume(struct device *dev);
|
||||
#else
|
||||
static inline int pm_runtime_clk_init(struct device *dev)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline void pm_runtime_clk_destroy(struct device *dev)
|
||||
{
|
||||
}
|
||||
static inline int pm_runtime_clk_add(struct device *dev, const char *con_id)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline void pm_runtime_clk_remove(struct device *dev, const char *con_id)
|
||||
{
|
||||
}
|
||||
#define pm_runtime_clock_suspend NULL
|
||||
#define pm_runtime_clock_resume NULL
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_CLK
|
||||
extern void pm_runtime_clk_add_notifier(struct bus_type *bus,
|
||||
struct pm_clk_notifier_block *clknb);
|
||||
#else
|
||||
static inline void pm_runtime_clk_add_notifier(struct bus_type *bus,
|
||||
struct pm_clk_notifier_block *clknb)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue