xref: /linux/drivers/char/ipmi/ipmi_plat_data.h (revision d73236383eb1cd4b7b65c33a09f0ed45f6781f40)
13cd83bacSCorey Minyard /* SPDX-License-Identifier: GPL-2.0+ */
23cd83bacSCorey Minyard 
33cd83bacSCorey Minyard /*
43cd83bacSCorey Minyard  * Generic code to add IPMI platform devices.
53cd83bacSCorey Minyard  */
63cd83bacSCorey Minyard 
73cd83bacSCorey Minyard #include <linux/ipmi.h>
83cd83bacSCorey Minyard 
9*d7323638SCorey Minyard enum ipmi_plat_interface_type { IPMI_PLAT_IF_SI, IPMI_PLAT_IF_SSIF };
10*d7323638SCorey Minyard 
113cd83bacSCorey Minyard struct ipmi_plat_data {
12*d7323638SCorey Minyard 	enum ipmi_plat_interface_type iftype;
133cd83bacSCorey Minyard 	unsigned int type; /* si_type for si, SI_INVALID for others */
143cd83bacSCorey Minyard 	unsigned int space; /* addr_space for si, intf# for ssif. */
153cd83bacSCorey Minyard 	unsigned long addr;
163cd83bacSCorey Minyard 	unsigned int regspacing;
173cd83bacSCorey Minyard 	unsigned int regsize;
183cd83bacSCorey Minyard 	unsigned int regshift;
193cd83bacSCorey Minyard 	unsigned int irq;
203cd83bacSCorey Minyard 	unsigned int slave_addr;
213cd83bacSCorey Minyard 	enum ipmi_addr_src addr_source;
223cd83bacSCorey Minyard };
233cd83bacSCorey Minyard 
243cd83bacSCorey Minyard struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
253cd83bacSCorey Minyard 					  struct ipmi_plat_data *p);
26