diff options
author | Andrey Panin <pazke@donpac.ru> | 2005-09-06 18:18:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:44 -0400 |
commit | ebad6a4230bdb5927495e28bc7837f515bf667a7 (patch) | |
tree | 373339d76d8424dd749957847b6d83707e65e016 /include | |
parent | c3c7120d552989be94c9137989be5abb6da8954f (diff) |
[PATCH] dmi: add onboard devices discovery
This patch adds onboard devices and IPMI BMC discovery into DMI scan code.
Drivers can use dmi_find_device() function to search for devices by type and
name.
Signed-off-by: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dmi.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 5e93e6dce9a4..c30175e8dec6 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __DMI_H__ | 1 | #ifndef __DMI_H__ |
2 | #define __DMI_H__ | 2 | #define __DMI_H__ |
3 | 3 | ||
4 | #include <linux/list.h> | ||
5 | |||
4 | enum dmi_field { | 6 | enum dmi_field { |
5 | DMI_NONE, | 7 | DMI_NONE, |
6 | DMI_BIOS_VENDOR, | 8 | DMI_BIOS_VENDOR, |
@@ -16,6 +18,24 @@ enum dmi_field { | |||
16 | DMI_STRING_MAX, | 18 | DMI_STRING_MAX, |
17 | }; | 19 | }; |
18 | 20 | ||
21 | enum dmi_device_type { | ||
22 | DMI_DEV_TYPE_ANY = 0, | ||
23 | DMI_DEV_TYPE_OTHER, | ||
24 | DMI_DEV_TYPE_UNKNOWN, | ||
25 | DMI_DEV_TYPE_VIDEO, | ||
26 | DMI_DEV_TYPE_SCSI, | ||
27 | DMI_DEV_TYPE_ETHERNET, | ||
28 | DMI_DEV_TYPE_TOKENRING, | ||
29 | DMI_DEV_TYPE_SOUND, | ||
30 | DMI_DEV_TYPE_IPMI = -1 | ||
31 | }; | ||
32 | |||
33 | struct dmi_header { | ||
34 | u8 type; | ||
35 | u8 length; | ||
36 | u16 handle; | ||
37 | }; | ||
38 | |||
19 | /* | 39 | /* |
20 | * DMI callbacks for problem boards | 40 | * DMI callbacks for problem boards |
21 | */ | 41 | */ |
@@ -26,22 +46,32 @@ struct dmi_strmatch { | |||
26 | 46 | ||
27 | struct dmi_system_id { | 47 | struct dmi_system_id { |
28 | int (*callback)(struct dmi_system_id *); | 48 | int (*callback)(struct dmi_system_id *); |
29 | char *ident; | 49 | const char *ident; |
30 | struct dmi_strmatch matches[4]; | 50 | struct dmi_strmatch matches[4]; |
31 | void *driver_data; | 51 | void *driver_data; |
32 | }; | 52 | }; |
33 | 53 | ||
34 | #define DMI_MATCH(a,b) { a, b } | 54 | #define DMI_MATCH(a, b) { a, b } |
55 | |||
56 | struct dmi_device { | ||
57 | struct list_head list; | ||
58 | int type; | ||
59 | const char *name; | ||
60 | void *device_data; /* Type specific data */ | ||
61 | }; | ||
35 | 62 | ||
36 | #if defined(CONFIG_X86) && !defined(CONFIG_X86_64) | 63 | #if defined(CONFIG_X86) && !defined(CONFIG_X86_64) |
37 | 64 | ||
38 | extern int dmi_check_system(struct dmi_system_id *list); | 65 | extern int dmi_check_system(struct dmi_system_id *list); |
39 | extern char * dmi_get_system_info(int field); | 66 | extern char * dmi_get_system_info(int field); |
40 | 67 | extern struct dmi_device * dmi_find_device(int type, const char *name, | |
68 | struct dmi_device *from); | ||
41 | #else | 69 | #else |
42 | 70 | ||
43 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } | 71 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } |
44 | static inline char * dmi_get_system_info(int field) { return NULL; } | 72 | static inline char * dmi_get_system_info(int field) { return NULL; } |
73 | static struct dmi_device * dmi_find_device(int type, const char *name, | ||
74 | struct dmi_device *from) { return NULL; } | ||
45 | 75 | ||
46 | #endif | 76 | #endif |
47 | 77 | ||