diff options
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 502af53ec012..dc1ebfeeb5ec 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -864,21 +864,16 @@ static inline void arch_reserve_mem_area(acpi_physical_address addr, | |||
864 | #endif | 864 | #endif |
865 | 865 | ||
866 | #if defined(CONFIG_ACPI) && defined(CONFIG_PM) | 866 | #if defined(CONFIG_ACPI) && defined(CONFIG_PM) |
867 | int acpi_dev_runtime_suspend(struct device *dev); | 867 | int acpi_dev_suspend(struct device *dev, bool wakeup); |
868 | int acpi_dev_runtime_resume(struct device *dev); | 868 | int acpi_dev_resume(struct device *dev); |
869 | int acpi_subsys_runtime_suspend(struct device *dev); | 869 | int acpi_subsys_runtime_suspend(struct device *dev); |
870 | int acpi_subsys_runtime_resume(struct device *dev); | 870 | int acpi_subsys_runtime_resume(struct device *dev); |
871 | struct acpi_device *acpi_dev_pm_get_node(struct device *dev); | ||
872 | int acpi_dev_pm_attach(struct device *dev, bool power_on); | 871 | int acpi_dev_pm_attach(struct device *dev, bool power_on); |
873 | #else | 872 | #else |
874 | static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; } | 873 | static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; } |
875 | static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; } | 874 | static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; } |
876 | static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; } | 875 | static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; } |
877 | static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; } | 876 | static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; } |
878 | static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev) | ||
879 | { | ||
880 | return NULL; | ||
881 | } | ||
882 | static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) | 877 | static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) |
883 | { | 878 | { |
884 | return -ENODEV; | 879 | return -ENODEV; |
@@ -887,22 +882,30 @@ static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) | |||
887 | 882 | ||
888 | #if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP) | 883 | #if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP) |
889 | int acpi_dev_suspend_late(struct device *dev); | 884 | int acpi_dev_suspend_late(struct device *dev); |
890 | int acpi_dev_resume_early(struct device *dev); | ||
891 | int acpi_subsys_prepare(struct device *dev); | 885 | int acpi_subsys_prepare(struct device *dev); |
892 | void acpi_subsys_complete(struct device *dev); | 886 | void acpi_subsys_complete(struct device *dev); |
893 | int acpi_subsys_suspend_late(struct device *dev); | 887 | int acpi_subsys_suspend_late(struct device *dev); |
888 | int acpi_subsys_suspend_noirq(struct device *dev); | ||
889 | int acpi_subsys_resume_noirq(struct device *dev); | ||
894 | int acpi_subsys_resume_early(struct device *dev); | 890 | int acpi_subsys_resume_early(struct device *dev); |
895 | int acpi_subsys_suspend(struct device *dev); | 891 | int acpi_subsys_suspend(struct device *dev); |
896 | int acpi_subsys_freeze(struct device *dev); | 892 | int acpi_subsys_freeze(struct device *dev); |
893 | int acpi_subsys_freeze_late(struct device *dev); | ||
894 | int acpi_subsys_freeze_noirq(struct device *dev); | ||
895 | int acpi_subsys_thaw_noirq(struct device *dev); | ||
897 | #else | 896 | #else |
898 | static inline int acpi_dev_suspend_late(struct device *dev) { return 0; } | ||
899 | static inline int acpi_dev_resume_early(struct device *dev) { return 0; } | 897 | static inline int acpi_dev_resume_early(struct device *dev) { return 0; } |
900 | static inline int acpi_subsys_prepare(struct device *dev) { return 0; } | 898 | static inline int acpi_subsys_prepare(struct device *dev) { return 0; } |
901 | static inline void acpi_subsys_complete(struct device *dev) {} | 899 | static inline void acpi_subsys_complete(struct device *dev) {} |
902 | static inline int acpi_subsys_suspend_late(struct device *dev) { return 0; } | 900 | static inline int acpi_subsys_suspend_late(struct device *dev) { return 0; } |
901 | static inline int acpi_subsys_suspend_noirq(struct device *dev) { return 0; } | ||
902 | static inline int acpi_subsys_resume_noirq(struct device *dev) { return 0; } | ||
903 | static inline int acpi_subsys_resume_early(struct device *dev) { return 0; } | 903 | static inline int acpi_subsys_resume_early(struct device *dev) { return 0; } |
904 | static inline int acpi_subsys_suspend(struct device *dev) { return 0; } | 904 | static inline int acpi_subsys_suspend(struct device *dev) { return 0; } |
905 | static inline int acpi_subsys_freeze(struct device *dev) { return 0; } | 905 | static inline int acpi_subsys_freeze(struct device *dev) { return 0; } |
906 | static inline int acpi_subsys_freeze_late(struct device *dev) { return 0; } | ||
907 | static inline int acpi_subsys_freeze_noirq(struct device *dev) { return 0; } | ||
908 | static inline int acpi_subsys_thaw_noirq(struct device *dev) { return 0; } | ||
906 | #endif | 909 | #endif |
907 | 910 | ||
908 | #ifdef CONFIG_ACPI | 911 | #ifdef CONFIG_ACPI |
@@ -1254,4 +1257,13 @@ int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res) | |||
1254 | } | 1257 | } |
1255 | #endif | 1258 | #endif |
1256 | 1259 | ||
1260 | #ifdef CONFIG_ACPI_LPIT | ||
1261 | int lpit_read_residency_count_address(u64 *address); | ||
1262 | #else | ||
1263 | static inline int lpit_read_residency_count_address(u64 *address) | ||
1264 | { | ||
1265 | return -EINVAL; | ||
1266 | } | ||
1267 | #endif | ||
1268 | |||
1257 | #endif /*_LINUX_ACPI_H*/ | 1269 | #endif /*_LINUX_ACPI_H*/ |