Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | #ifndef __DMI_H__ |
2 | #define __DMI_H__ | |
3 | ||
ebad6a42 AP |
4 | #include <linux/list.h> |
5 | ||
1da177e4 LT |
6 | enum dmi_field { |
7 | DMI_NONE, | |
8 | DMI_BIOS_VENDOR, | |
9 | DMI_BIOS_VERSION, | |
10 | DMI_BIOS_DATE, | |
11 | DMI_SYS_VENDOR, | |
12 | DMI_PRODUCT_NAME, | |
13 | DMI_PRODUCT_VERSION, | |
e70c9d5e | 14 | DMI_PRODUCT_SERIAL, |
4f5c791a | 15 | DMI_PRODUCT_UUID, |
1da177e4 LT |
16 | DMI_BOARD_VENDOR, |
17 | DMI_BOARD_NAME, | |
18 | DMI_BOARD_VERSION, | |
4f5c791a LP |
19 | DMI_BOARD_SERIAL, |
20 | DMI_BOARD_ASSET_TAG, | |
21 | DMI_CHASSIS_VENDOR, | |
22 | DMI_CHASSIS_TYPE, | |
23 | DMI_CHASSIS_VERSION, | |
24 | DMI_CHASSIS_SERIAL, | |
25 | DMI_CHASSIS_ASSET_TAG, | |
1da177e4 LT |
26 | DMI_STRING_MAX, |
27 | }; | |
28 | ||
ebad6a42 AP |
29 | enum dmi_device_type { |
30 | DMI_DEV_TYPE_ANY = 0, | |
31 | DMI_DEV_TYPE_OTHER, | |
32 | DMI_DEV_TYPE_UNKNOWN, | |
33 | DMI_DEV_TYPE_VIDEO, | |
34 | DMI_DEV_TYPE_SCSI, | |
35 | DMI_DEV_TYPE_ETHERNET, | |
36 | DMI_DEV_TYPE_TOKENRING, | |
37 | DMI_DEV_TYPE_SOUND, | |
2e0c1f6c SM |
38 | DMI_DEV_TYPE_IPMI = -1, |
39 | DMI_DEV_TYPE_OEM_STRING = -2 | |
ebad6a42 AP |
40 | }; |
41 | ||
42 | struct dmi_header { | |
43 | u8 type; | |
44 | u8 length; | |
45 | u16 handle; | |
46 | }; | |
47 | ||
1da177e4 LT |
48 | /* |
49 | * DMI callbacks for problem boards | |
50 | */ | |
51 | struct dmi_strmatch { | |
52 | u8 slot; | |
53 | char *substr; | |
54 | }; | |
55 | ||
56 | struct dmi_system_id { | |
1855256c | 57 | int (*callback)(const struct dmi_system_id *); |
ebad6a42 | 58 | const char *ident; |
1da177e4 LT |
59 | struct dmi_strmatch matches[4]; |
60 | void *driver_data; | |
61 | }; | |
62 | ||
ebad6a42 AP |
63 | #define DMI_MATCH(a, b) { a, b } |
64 | ||
65 | struct dmi_device { | |
66 | struct list_head list; | |
67 | int type; | |
68 | const char *name; | |
69 | void *device_data; /* Type specific data */ | |
70 | }; | |
1da177e4 | 71 | |
e9928674 | 72 | #ifdef CONFIG_DMI |
1da177e4 | 73 | |
1855256c JG |
74 | extern int dmi_check_system(const struct dmi_system_id *list); |
75 | extern const char * dmi_get_system_info(int field); | |
76 | extern const struct dmi_device * dmi_find_device(int type, const char *name, | |
77 | const struct dmi_device *from); | |
e9928674 | 78 | extern void dmi_scan_machine(void); |
f083a329 | 79 | extern int dmi_get_year(int field); |
1855256c | 80 | extern int dmi_name_in_vendors(const char *str); |
81b4e1f6 | 81 | extern int dmi_available; |
e9928674 | 82 | |
1da177e4 LT |
83 | #else |
84 | ||
1855256c JG |
85 | static inline int dmi_check_system(const struct dmi_system_id *list) { return 0; } |
86 | static inline const char * dmi_get_system_info(int field) { return NULL; } | |
87 | static inline const struct dmi_device * dmi_find_device(int type, const char *name, | |
88 | const struct dmi_device *from) { return NULL; } | |
f083a329 | 89 | static inline int dmi_get_year(int year) { return 0; } |
1855256c | 90 | static inline int dmi_name_in_vendors(const char *s) { return 0; } |
81b4e1f6 | 91 | #define dmi_available 0 |
1da177e4 LT |
92 | |
93 | #endif | |
94 | ||
95 | #endif /* __DMI_H__ */ |