162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci/*
462306a36Sopenharmony_ci * Generic code to add IPMI platform devices.
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#include <linux/ipmi.h>
862306a36Sopenharmony_ci
962306a36Sopenharmony_cienum ipmi_plat_interface_type { IPMI_PLAT_IF_SI, IPMI_PLAT_IF_SSIF };
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_cistruct ipmi_plat_data {
1262306a36Sopenharmony_ci	enum ipmi_plat_interface_type iftype;
1362306a36Sopenharmony_ci	unsigned int type; /* si_type for si, SI_INVALID for others */
1462306a36Sopenharmony_ci	unsigned int space; /* addr_space for si, intf# for ssif. */
1562306a36Sopenharmony_ci	unsigned long addr;
1662306a36Sopenharmony_ci	unsigned int regspacing;
1762306a36Sopenharmony_ci	unsigned int regsize;
1862306a36Sopenharmony_ci	unsigned int regshift;
1962306a36Sopenharmony_ci	unsigned int irq;
2062306a36Sopenharmony_ci	unsigned int slave_addr;
2162306a36Sopenharmony_ci	enum ipmi_addr_src addr_source;
2262306a36Sopenharmony_ci};
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_cistruct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
2562306a36Sopenharmony_ci					  struct ipmi_plat_data *p);
26