Merge tag 'r8169-upstream-20061204-00' of git://electric-eye.fr.zoreil.com/home/romie...
[linux-2.6-block.git] / include / linux / dmi.h
CommitLineData
1da177e4
LT
1#ifndef __DMI_H__
2#define __DMI_H__
3
ebad6a42
AP
4#include <linux/list.h>
5
1da177e4
LT
6enum 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,
1da177e4
LT
15 DMI_BOARD_VENDOR,
16 DMI_BOARD_NAME,
17 DMI_BOARD_VERSION,
18 DMI_STRING_MAX,
19};
20
ebad6a42
AP
21enum 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,
2e0c1f6c
SM
30 DMI_DEV_TYPE_IPMI = -1,
31 DMI_DEV_TYPE_OEM_STRING = -2
ebad6a42
AP
32};
33
34struct dmi_header {
35 u8 type;
36 u8 length;
37 u16 handle;
38};
39
1da177e4
LT
40/*
41 * DMI callbacks for problem boards
42 */
43struct dmi_strmatch {
44 u8 slot;
45 char *substr;
46};
47
48struct dmi_system_id {
49 int (*callback)(struct dmi_system_id *);
ebad6a42 50 const char *ident;
1da177e4
LT
51 struct dmi_strmatch matches[4];
52 void *driver_data;
53};
54
ebad6a42
AP
55#define DMI_MATCH(a, b) { a, b }
56
57struct dmi_device {
58 struct list_head list;
59 int type;
60 const char *name;
61 void *device_data; /* Type specific data */
62};
1da177e4 63
e9928674 64#ifdef CONFIG_DMI
1da177e4
LT
65
66extern int dmi_check_system(struct dmi_system_id *list);
67extern char * dmi_get_system_info(int field);
ebad6a42
AP
68extern struct dmi_device * dmi_find_device(int type, const char *name,
69 struct dmi_device *from);
e9928674 70extern void dmi_scan_machine(void);
f083a329 71extern int dmi_get_year(int field);
a1bae672 72extern int dmi_name_in_vendors(char *str);
e9928674 73
1da177e4
LT
74#else
75
76static inline int dmi_check_system(struct dmi_system_id *list) { return 0; }
77static inline char * dmi_get_system_info(int field) { return NULL; }
c47a3167 78static inline struct dmi_device * dmi_find_device(int type, const char *name,
ebad6a42 79 struct dmi_device *from) { return NULL; }
f083a329 80static inline int dmi_get_year(int year) { return 0; }
a1bae672 81static inline int dmi_name_in_vendors(char *s) { return 0; }
1da177e4
LT
82
83#endif
84
85#endif /* __DMI_H__ */