aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acpi_bus.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/acpi/acpi_bus.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r--include/acpi/acpi_bus.h29
1 files changed, 12 insertions, 17 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 4de84ce3a927..6cd5b6403a7b 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -148,9 +148,7 @@ struct acpi_device_flags {
148 u32 suprise_removal_ok:1; 148 u32 suprise_removal_ok:1;
149 u32 power_manageable:1; 149 u32 power_manageable:1;
150 u32 performance_manageable:1; 150 u32 performance_manageable:1;
151 u32 wake_capable:1; /* Wakeup(_PRW) supported? */ 151 u32 reserved:24;
152 u32 force_power_state:1;
153 u32 reserved:22;
154}; 152};
155 153
156/* File System */ 154/* File System */
@@ -184,7 +182,7 @@ struct acpi_device_pnp {
184 182
185#define acpi_device_bid(d) ((d)->pnp.bus_id) 183#define acpi_device_bid(d) ((d)->pnp.bus_id)
186#define acpi_device_adr(d) ((d)->pnp.bus_address) 184#define acpi_device_adr(d) ((d)->pnp.bus_address)
187char *acpi_device_hid(struct acpi_device *device); 185const char *acpi_device_hid(struct acpi_device *device);
188#define acpi_device_name(d) ((d)->pnp.device_name) 186#define acpi_device_name(d) ((d)->pnp.device_name)
189#define acpi_device_class(d) ((d)->pnp.device_class) 187#define acpi_device_class(d) ((d)->pnp.device_class)
190 188
@@ -212,7 +210,7 @@ struct acpi_device_power_state {
212struct acpi_device_power { 210struct acpi_device_power {
213 int state; /* Current state */ 211 int state; /* Current state */
214 struct acpi_device_power_flags flags; 212 struct acpi_device_power_flags flags;
215 struct acpi_device_power_state states[4]; /* Power states (D0-D3) */ 213 struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */
216}; 214};
217 215
218/* Performance Management */ 216/* Performance Management */
@@ -242,23 +240,16 @@ struct acpi_device_perf {
242struct acpi_device_wakeup_flags { 240struct acpi_device_wakeup_flags {
243 u8 valid:1; /* Can successfully enable wakeup? */ 241 u8 valid:1; /* Can successfully enable wakeup? */
244 u8 run_wake:1; /* Run-Wake GPE devices */ 242 u8 run_wake:1; /* Run-Wake GPE devices */
245 u8 always_enabled:1; /* Run-wake devices that are always enabled */
246 u8 notifier_present:1; /* Wake-up notify handler has been installed */ 243 u8 notifier_present:1; /* Wake-up notify handler has been installed */
247}; 244};
248 245
249struct acpi_device_wakeup_state {
250 u8 enabled:1;
251};
252
253struct acpi_device_wakeup { 246struct acpi_device_wakeup {
254 acpi_handle gpe_device; 247 acpi_handle gpe_device;
255 u64 gpe_number; 248 u64 gpe_number;
256 u64 sleep_state; 249 u64 sleep_state;
257 struct acpi_handle_list resources; 250 struct acpi_handle_list resources;
258 struct acpi_device_wakeup_state state;
259 struct acpi_device_wakeup_flags flags; 251 struct acpi_device_wakeup_flags flags;
260 int prepare_count; 252 int prepare_count;
261 int run_wake_count;
262}; 253};
263 254
264/* Device */ 255/* Device */
@@ -328,8 +319,8 @@ void acpi_bus_data_handler(acpi_handle handle, void *context);
328acpi_status acpi_bus_get_status_handle(acpi_handle handle, 319acpi_status acpi_bus_get_status_handle(acpi_handle handle,
329 unsigned long long *sta); 320 unsigned long long *sta);
330int acpi_bus_get_status(struct acpi_device *device); 321int acpi_bus_get_status(struct acpi_device *device);
331int acpi_bus_get_power(acpi_handle handle, int *state);
332int acpi_bus_set_power(acpi_handle handle, int state); 322int acpi_bus_set_power(acpi_handle handle, int state);
323int acpi_bus_update_power(acpi_handle handle, int *state_p);
333bool acpi_bus_power_manageable(acpi_handle handle); 324bool acpi_bus_power_manageable(acpi_handle handle);
334bool acpi_bus_can_wakeup(acpi_handle handle); 325bool acpi_bus_can_wakeup(acpi_handle handle);
335#ifdef CONFIG_ACPI_PROC_EVENT 326#ifdef CONFIG_ACPI_PROC_EVENT
@@ -389,21 +380,25 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
389int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); 380int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state);
390int acpi_disable_wakeup_device_power(struct acpi_device *dev); 381int acpi_disable_wakeup_device_power(struct acpi_device *dev);
391 382
392#ifdef CONFIG_PM_SLEEP 383#ifdef CONFIG_PM
393int acpi_pm_device_sleep_state(struct device *, int *); 384int acpi_pm_device_sleep_state(struct device *, int *);
394int acpi_pm_device_sleep_wake(struct device *, bool); 385#else
395#else /* !CONFIG_PM_SLEEP */
396static inline int acpi_pm_device_sleep_state(struct device *d, int *p) 386static inline int acpi_pm_device_sleep_state(struct device *d, int *p)
397{ 387{
398 if (p) 388 if (p)
399 *p = ACPI_STATE_D0; 389 *p = ACPI_STATE_D0;
400 return ACPI_STATE_D3; 390 return ACPI_STATE_D3;
401} 391}
392#endif
393
394#ifdef CONFIG_PM_SLEEP
395int acpi_pm_device_sleep_wake(struct device *, bool);
396#else
402static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) 397static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
403{ 398{
404 return -ENODEV; 399 return -ENODEV;
405} 400}
406#endif /* !CONFIG_PM_SLEEP */ 401#endif
407 402
408#endif /* CONFIG_ACPI */ 403#endif /* CONFIG_ACPI */
409 404