Manual merge with Linus
[deliverable/linux.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,
30 DMI_DEV_TYPE_IPMI = -1
31};
32
33struct dmi_header {
34 u8 type;
35 u8 length;
36 u16 handle;
37};
38
1da177e4
LT
39/*
40 * DMI callbacks for problem boards
41 */
42struct dmi_strmatch {
43 u8 slot;
44 char *substr;
45};
46
47struct dmi_system_id {
48 int (*callback)(struct dmi_system_id *);
ebad6a42 49 const char *ident;
1da177e4
LT
50 struct dmi_strmatch matches[4];
51 void *driver_data;
52};
53
ebad6a42
AP
54#define DMI_MATCH(a, b) { a, b }
55
56struct dmi_device {
57 struct list_head list;
58 int type;
59 const char *name;
60 void *device_data; /* Type specific data */
61};
1da177e4
LT
62
63#if defined(CONFIG_X86) && !defined(CONFIG_X86_64)
64
65extern int dmi_check_system(struct dmi_system_id *list);
66extern char * dmi_get_system_info(int field);
ebad6a42
AP
67extern struct dmi_device * dmi_find_device(int type, const char *name,
68 struct dmi_device *from);
1da177e4
LT
69#else
70
71static inline int dmi_check_system(struct dmi_system_id *list) { return 0; }
72static inline char * dmi_get_system_info(int field) { return NULL; }
ebad6a42
AP
73static struct dmi_device * dmi_find_device(int type, const char *name,
74 struct dmi_device *from) { return NULL; }
1da177e4
LT
75
76#endif
77
78#endif /* __DMI_H__ */
This page took 0.169009 seconds and 5 git commands to generate.