summaryrefslogtreecommitdiffstats
path: root/include/linux/ipmi.h
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2010-12-08 10:10:16 +0800
committerLen Brown <len.brown@intel.com>2010-12-14 00:21:51 -0500
commit16f4232ce4d6855361b4eb56262f4a202295c978 (patch)
tree76edaaa76feab9876eb8b12b50d5660b6f4d434c /include/linux/ipmi.h
parentcf7d7e5a1980d1116ee152d25dac382b112b9c17 (diff)
downloadop-kernel-dev-16f4232ce4d6855361b4eb56262f4a202295c978.zip
op-kernel-dev-16f4232ce4d6855361b4eb56262f4a202295c978.tar.gz
IPMI: Add one interface to get more info of low-level IPMI device
The IPMI smi_watcher will be used to catch the IPMI interface as they come or go. In order to communicate with the correct IPMI device, it should be confirmed whether it is what we wanted especially on the system with multiple IPMI devices. But the new_smi callback function of smi_watcher provides very limited info(only the interface number and dev pointer) and there is no detailed info about the low level interface. For example: which mechansim registers the IPMI interface(ACPI, PCI, DMI and so on). This is to add one interface that can get more info of low-level IPMI device. For example: the ACPI device handle will be returned for the pnp_acpi IPMI device. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux/ipmi.h')
-rw-r--r--include/linux/ipmi.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index 65aae34..045f2f2 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -454,6 +454,44 @@ unsigned int ipmi_addr_length(int addr_type);
/* Validate that the given IPMI address is valid. */
int ipmi_validate_addr(struct ipmi_addr *addr, int len);
+/*
+ * How did the IPMI driver find out about the device?
+ */
+enum ipmi_addr_src {
+ SI_INVALID = 0, SI_HOTMOD, SI_HARDCODED, SI_SPMI, SI_ACPI, SI_SMBIOS,
+ SI_PCI, SI_DEVICETREE, SI_DEFAULT
+};
+
+union ipmi_smi_info_union {
+ /*
+ * the acpi_info element is defined for the SI_ACPI
+ * address type
+ */
+ struct {
+ void *acpi_handle;
+ } acpi_info;
+};
+
+struct ipmi_smi_info {
+ enum ipmi_addr_src addr_src;
+
+ /*
+ * Base device for the interface. Don't forget to put this when
+ * you are done.
+ */
+ struct device *dev;
+
+ /*
+ * The addr_info provides more detailed info for some IPMI
+ * devices, depending on the addr_src. Currently only SI_ACPI
+ * info is provided.
+ */
+ union ipmi_smi_info_union addr_info;
+};
+
+/* This is to get the private info of ipmi_smi_t */
+extern int ipmi_get_smi_info(int if_num, struct ipmi_smi_info *data);
+
#endif /* __KERNEL__ */
OpenPOWER on IntegriCloud