xref: /linux/drivers/char/ipmi/ipmi_plat_data.h (revision 44f57d78)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 
3 /*
4  * Generic code to add IPMI platform devices.
5  */
6 
7 #include <linux/ipmi.h>
8 
9 enum ipmi_plat_interface_type { IPMI_PLAT_IF_SI, IPMI_PLAT_IF_SSIF };
10 
11 struct ipmi_plat_data {
12 	enum ipmi_plat_interface_type iftype;
13 	unsigned int type; /* si_type for si, SI_INVALID for others */
14 	unsigned int space; /* addr_space for si, intf# for ssif. */
15 	unsigned long addr;
16 	unsigned int regspacing;
17 	unsigned int regsize;
18 	unsigned int regshift;
19 	unsigned int irq;
20 	unsigned int slave_addr;
21 	enum ipmi_addr_src addr_source;
22 };
23 
24 struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
25 					  struct ipmi_plat_data *p);
26