4 #include <linux/list.h>
5 #include <linux/kobject.h>
6 #include <linux/mod_devicetable.h>
8 /* enum dmi_field is in mod_devicetable.h */
10 enum dmi_device_type
{
16 DMI_DEV_TYPE_ETHERNET
,
17 DMI_DEV_TYPE_TOKENRING
,
22 DMI_DEV_TYPE_IPMI
= -1,
23 DMI_DEV_TYPE_OEM_STRING
= -2,
24 DMI_DEV_TYPE_DEV_ONBOARD
= -3,
25 DMI_DEV_TYPE_DEV_SLOT
= -4,
34 DMI_ENTRY_MEM_CONTROLLER
,
37 DMI_ENTRY_PORT_CONNECTOR
,
38 DMI_ENTRY_SYSTEM_SLOT
,
39 DMI_ENTRY_ONBOARD_DEVICE
,
43 DMI_ENTRY_GROUP_ASSOC
,
44 DMI_ENTRY_SYSTEM_EVENT_LOG
,
45 DMI_ENTRY_PHYS_MEM_ARRAY
,
47 DMI_ENTRY_32_MEM_ERROR
,
48 DMI_ENTRY_MEM_ARRAY_MAPPED_ADDR
,
49 DMI_ENTRY_MEM_DEV_MAPPED_ADDR
,
50 DMI_ENTRY_BUILTIN_POINTING_DEV
,
51 DMI_ENTRY_PORTABLE_BATTERY
,
52 DMI_ENTRY_SYSTEM_RESET
,
53 DMI_ENTRY_HW_SECURITY
,
54 DMI_ENTRY_SYSTEM_POWER_CONTROLS
,
55 DMI_ENTRY_VOLTAGE_PROBE
,
56 DMI_ENTRY_COOLING_DEV
,
58 DMI_ENTRY_ELECTRICAL_CURRENT_PROBE
,
59 DMI_ENTRY_OOB_REMOTE_ACCESS
,
61 DMI_ENTRY_SYSTEM_BOOT
,
63 DMI_ENTRY_MGMT_DEV_COMPONENT
,
64 DMI_ENTRY_MGMT_DEV_THRES
,
65 DMI_ENTRY_MEM_CHANNEL
,
67 DMI_ENTRY_SYS_POWER_SUPPLY
,
69 DMI_ENTRY_ONBOARD_DEV_EXT
,
70 DMI_ENTRY_MGMT_CONTROLLER_HOST
,
71 DMI_ENTRY_INACTIVE
= 126,
72 DMI_ENTRY_END_OF_TABLE
= 127,
82 struct list_head list
;
85 void *device_data
; /* Type specific data */
90 struct dmi_dev_onboard
{
91 struct dmi_device dev
;
98 extern struct kobject
*dmi_kobj
;
99 extern int dmi_check_system(const struct dmi_system_id
*list
);
100 const struct dmi_system_id
*dmi_first_match(const struct dmi_system_id
*list
);
101 extern const char * dmi_get_system_info(int field
);
102 extern const struct dmi_device
* dmi_find_device(int type
, const char *name
,
103 const struct dmi_device
*from
);
104 extern void dmi_scan_machine(void);
105 extern void dmi_memdev_walk(void);
106 extern void dmi_set_dump_stack_arch_desc(void);
107 extern bool dmi_get_date(int field
, int *yearp
, int *monthp
, int *dayp
);
108 extern int dmi_name_in_vendors(const char *str
);
109 extern int dmi_name_in_serial(const char *str
);
110 extern int dmi_available
;
111 extern int dmi_walk(void (*decode
)(const struct dmi_header
*, void *),
113 extern bool dmi_match(enum dmi_field f
, const char *str
);
114 extern void dmi_memdev_name(u16 handle
, const char **bank
, const char **device
);
118 static inline int dmi_check_system(const struct dmi_system_id
*list
) { return 0; }
119 static inline const char * dmi_get_system_info(int field
) { return NULL
; }
120 static inline const struct dmi_device
* dmi_find_device(int type
, const char *name
,
121 const struct dmi_device
*from
) { return NULL
; }
122 static inline void dmi_scan_machine(void) { return; }
123 static inline void dmi_memdev_walk(void) { }
124 static inline void dmi_set_dump_stack_arch_desc(void) { }
125 static inline bool dmi_get_date(int field
, int *yearp
, int *monthp
, int *dayp
)
135 static inline int dmi_name_in_vendors(const char *s
) { return 0; }
136 static inline int dmi_name_in_serial(const char *s
) { return 0; }
137 #define dmi_available 0
138 static inline int dmi_walk(void (*decode
)(const struct dmi_header
*, void *),
139 void *private_data
) { return -1; }
140 static inline bool dmi_match(enum dmi_field f
, const char *str
)
142 static inline void dmi_memdev_name(u16 handle
, const char **bank
,
143 const char **device
) { }
144 static inline const struct dmi_system_id
*
145 dmi_first_match(const struct dmi_system_id
*list
) { return NULL
; }
149 #endif /* __DMI_H__ */