Root/
1 | #ifndef __DMI_H__ |
2 | #define __DMI_H__ |
3 | |
4 | #include <linux/list.h> |
5 | #include <linux/mod_devicetable.h> |
6 | |
7 | /* enum dmi_field is in mod_devicetable.h */ |
8 | |
9 | enum dmi_device_type { |
10 | DMI_DEV_TYPE_ANY = 0, |
11 | DMI_DEV_TYPE_OTHER, |
12 | DMI_DEV_TYPE_UNKNOWN, |
13 | DMI_DEV_TYPE_VIDEO, |
14 | DMI_DEV_TYPE_SCSI, |
15 | DMI_DEV_TYPE_ETHERNET, |
16 | DMI_DEV_TYPE_TOKENRING, |
17 | DMI_DEV_TYPE_SOUND, |
18 | DMI_DEV_TYPE_PATA, |
19 | DMI_DEV_TYPE_SATA, |
20 | DMI_DEV_TYPE_SAS, |
21 | DMI_DEV_TYPE_IPMI = -1, |
22 | DMI_DEV_TYPE_OEM_STRING = -2, |
23 | }; |
24 | |
25 | struct dmi_header { |
26 | u8 type; |
27 | u8 length; |
28 | u16 handle; |
29 | }; |
30 | |
31 | struct dmi_device { |
32 | struct list_head list; |
33 | int type; |
34 | const char *name; |
35 | void *device_data; /* Type specific data */ |
36 | }; |
37 | |
38 | #ifdef CONFIG_DMI |
39 | |
40 | extern int dmi_check_system(const struct dmi_system_id *list); |
41 | const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list); |
42 | extern const char * dmi_get_system_info(int field); |
43 | extern const struct dmi_device * dmi_find_device(int type, const char *name, |
44 | const struct dmi_device *from); |
45 | extern void dmi_scan_machine(void); |
46 | extern bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp); |
47 | extern int dmi_name_in_vendors(const char *str); |
48 | extern int dmi_name_in_serial(const char *str); |
49 | extern int dmi_available; |
50 | extern int dmi_walk(void (*decode)(const struct dmi_header *, void *), |
51 | void *private_data); |
52 | extern bool dmi_match(enum dmi_field f, const char *str); |
53 | |
54 | #else |
55 | |
56 | static inline int dmi_check_system(const struct dmi_system_id *list) { return 0; } |
57 | static inline const char * dmi_get_system_info(int field) { return NULL; } |
58 | static inline const struct dmi_device * dmi_find_device(int type, const char *name, |
59 | const struct dmi_device *from) { return NULL; } |
60 | static inline void dmi_scan_machine(void) { return; } |
61 | static inline bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp) |
62 | { |
63 | if (yearp) |
64 | *yearp = 0; |
65 | if (monthp) |
66 | *monthp = 0; |
67 | if (dayp) |
68 | *dayp = 0; |
69 | return false; |
70 | } |
71 | static inline int dmi_name_in_vendors(const char *s) { return 0; } |
72 | static inline int dmi_name_in_serial(const char *s) { return 0; } |
73 | #define dmi_available 0 |
74 | static inline int dmi_walk(void (*decode)(const struct dmi_header *, void *), |
75 | void *private_data) { return -1; } |
76 | static inline bool dmi_match(enum dmi_field f, const char *str) |
77 | { return false; } |
78 | static inline const struct dmi_system_id * |
79 | dmi_first_match(const struct dmi_system_id *list) { return NULL; } |
80 | |
81 | #endif |
82 | |
83 | #endif /* __DMI_H__ */ |
84 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9