aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/platform.h
downloadkernel_samsung_smdk4412-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.tar.gz
kernel_samsung_smdk4412-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.tar.bz2
kernel_samsung_smdk4412-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.zip
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/platform.h')
-rw-r--r--include/linux/platform.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/linux/platform.h b/include/linux/platform.h
new file mode 100644
index 00000000000..3c33084a6ec
--- /dev/null
+++ b/include/linux/platform.h
@@ -0,0 +1,43 @@
+/*
+ * include/linux/platform.h - platform driver definitions
+ *
+ * Because of the prolific consumerism of the average American,
+ * and the dominant marketing budgets of PC OEMs, we have been
+ * blessed with frequent updates of the PC architecture.
+ *
+ * While most of these calls are singular per architecture, they
+ * require an extra layer of abstraction on the x86 so the right
+ * subsystem gets the right call.
+ *
+ * Basically, this consolidates the power off and reboot callbacks
+ * into one structure, as well as adding power management hooks.
+ *
+ * When adding a platform driver, please make sure all callbacks are
+ * filled. There are defaults defined below that do nothing; use those
+ * if you do not support that callback.
+ */
+
+#ifndef _PLATFORM_H_
+#define _PLATFORM_H_
+#ifdef __KERNEL__
+
+#include <linux/types.h>
+
+struct platform_t {
+ char * name;
+ u32 suspend_states;
+ void (*reboot)(char * cmd);
+ void (*halt)(void);
+ void (*power_off)(void);
+ int (*suspend)(int state, int flags);
+ void (*idle)(void);
+};
+
+extern struct platform_t * platform;
+extern void default_reboot(char * cmd);
+extern void default_halt(void);
+extern int default_suspend(int state, int flags);
+extern void default_idle(void);
+
+#endif /* __KERNEL__ */
+#endif /* _PLATFORM_H */