Linux v2.6.15-rc6
[pohmelfs.git] / include / linux / platform.h
blob3c33084a6ec21a90ffc748f9207f97b1df024b24
1 /*
2 * include/linux/platform.h - platform driver definitions
4 * Because of the prolific consumerism of the average American,
5 * and the dominant marketing budgets of PC OEMs, we have been
6 * blessed with frequent updates of the PC architecture.
8 * While most of these calls are singular per architecture, they
9 * require an extra layer of abstraction on the x86 so the right
10 * subsystem gets the right call.
12 * Basically, this consolidates the power off and reboot callbacks
13 * into one structure, as well as adding power management hooks.
15 * When adding a platform driver, please make sure all callbacks are
16 * filled. There are defaults defined below that do nothing; use those
17 * if you do not support that callback.
18 */
20 #ifndef _PLATFORM_H_
21 #define _PLATFORM_H_
22 #ifdef __KERNEL__
24 #include <linux/types.h>
26 struct platform_t {
27 char * name;
28 u32 suspend_states;
29 void (*reboot)(char * cmd);
30 void (*halt)(void);
31 void (*power_off)(void);
32 int (*suspend)(int state, int flags);
33 void (*idle)(void);
36 extern struct platform_t * platform;
37 extern void default_reboot(char * cmd);
38 extern void default_halt(void);
39 extern int default_suspend(int state, int flags);
40 extern void default_idle(void);
42 #endif /* __KERNEL__ */
43 #endif /* _PLATFORM_H */