18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci/*
48c2ecf20Sopenharmony_ci * Generic code to add IPMI platform devices.
58c2ecf20Sopenharmony_ci */
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#include <linux/ipmi.h>
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cienum ipmi_plat_interface_type { IPMI_PLAT_IF_SI, IPMI_PLAT_IF_SSIF };
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_cistruct ipmi_plat_data {
128c2ecf20Sopenharmony_ci	enum ipmi_plat_interface_type iftype;
138c2ecf20Sopenharmony_ci	unsigned int type; /* si_type for si, SI_INVALID for others */
148c2ecf20Sopenharmony_ci	unsigned int space; /* addr_space for si, intf# for ssif. */
158c2ecf20Sopenharmony_ci	unsigned long addr;
168c2ecf20Sopenharmony_ci	unsigned int regspacing;
178c2ecf20Sopenharmony_ci	unsigned int regsize;
188c2ecf20Sopenharmony_ci	unsigned int regshift;
198c2ecf20Sopenharmony_ci	unsigned int irq;
208c2ecf20Sopenharmony_ci	unsigned int slave_addr;
218c2ecf20Sopenharmony_ci	enum ipmi_addr_src addr_source;
228c2ecf20Sopenharmony_ci};
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_cistruct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
258c2ecf20Sopenharmony_ci					  struct ipmi_plat_data *p);
26