]> bbs.cooldavid.org Git - net-next-2.6.git/blame - include/linux/dmi.h
8139cp: fix checksum broken
[net-next-2.6.git] / include / linux / dmi.h
CommitLineData
1da177e4
LT
1#ifndef __DMI_H__
2#define __DMI_H__
3
ebad6a42 4#include <linux/list.h>
d945b697 5#include <linux/mod_devicetable.h>
ebad6a42 6
d945b697 7/* enum dmi_field is in mod_devicetable.h */
1da177e4 8
ebad6a42
AP
9enum 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,
b4bd7d59
WVS
18 DMI_DEV_TYPE_PATA,
19 DMI_DEV_TYPE_SATA,
20 DMI_DEV_TYPE_SAS,
2e0c1f6c 21 DMI_DEV_TYPE_IPMI = -1,
b4bd7d59 22 DMI_DEV_TYPE_OEM_STRING = -2,
911e1c9b 23 DMI_DEV_TYPE_DEV_ONBOARD = -3,
ebad6a42
AP
24};
25
26struct dmi_header {
27 u8 type;
28 u8 length;
29 u16 handle;
30};
31
ebad6a42
AP
32struct dmi_device {
33 struct list_head list;
34 int type;
35 const char *name;
36 void *device_data; /* Type specific data */
37};
1da177e4 38
e9928674 39#ifdef CONFIG_DMI
1da177e4 40
911e1c9b
N
41struct dmi_dev_onboard {
42 struct dmi_device dev;
43 int instance;
44 int segment;
45 int bus;
46 int devfn;
47};
48
1855256c 49extern int dmi_check_system(const struct dmi_system_id *list);
d7b1956f 50const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
1855256c
JG
51extern const char * dmi_get_system_info(int field);
52extern const struct dmi_device * dmi_find_device(int type, const char *name,
53 const struct dmi_device *from);
e9928674 54extern void dmi_scan_machine(void);
3e5cd1f2 55extern bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp);
1855256c 56extern int dmi_name_in_vendors(const char *str);
fd8cd7e1 57extern int dmi_name_in_serial(const char *str);
81b4e1f6 58extern int dmi_available;
e7a19c56
JD
59extern int dmi_walk(void (*decode)(const struct dmi_header *, void *),
60 void *private_data);
d61c72e5 61extern bool dmi_match(enum dmi_field f, const char *str);
e9928674 62
1da177e4
LT
63#else
64
1855256c
JG
65static inline int dmi_check_system(const struct dmi_system_id *list) { return 0; }
66static inline const char * dmi_get_system_info(int field) { return NULL; }
67static inline const struct dmi_device * dmi_find_device(int type, const char *name,
68 const struct dmi_device *from) { return NULL; }
7ae9392c 69static inline void dmi_scan_machine(void) { return; }
3e5cd1f2
TH
70static inline bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp)
71{
72 if (yearp)
73 *yearp = 0;
74 if (monthp)
75 *monthp = 0;
76 if (dayp)
77 *dayp = 0;
78 return false;
79}
1855256c 80static inline int dmi_name_in_vendors(const char *s) { return 0; }
fd8cd7e1 81static inline int dmi_name_in_serial(const char *s) { return 0; }
81b4e1f6 82#define dmi_available 0
e7a19c56
JD
83static inline int dmi_walk(void (*decode)(const struct dmi_header *, void *),
84 void *private_data) { return -1; }
d61c72e5
JS
85static inline bool dmi_match(enum dmi_field f, const char *str)
86 { return false; }
d8204ee2
KG
87static inline const struct dmi_system_id *
88 dmi_first_match(const struct dmi_system_id *list) { return NULL; }
1da177e4
LT
89
90#endif
91
92#endif /* __DMI_H__ */