Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 
0003 /*
0004  * Generic code to add IPMI platform devices.
0005  */
0006 
0007 #include <linux/ipmi.h>
0008 
0009 enum ipmi_plat_interface_type { IPMI_PLAT_IF_SI, IPMI_PLAT_IF_SSIF };
0010 
0011 struct ipmi_plat_data {
0012     enum ipmi_plat_interface_type iftype;
0013     unsigned int type; /* si_type for si, SI_INVALID for others */
0014     unsigned int space; /* addr_space for si, intf# for ssif. */
0015     unsigned long addr;
0016     unsigned int regspacing;
0017     unsigned int regsize;
0018     unsigned int regshift;
0019     unsigned int irq;
0020     unsigned int slave_addr;
0021     enum ipmi_addr_src addr_source;
0022 };
0023 
0024 struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
0025                       struct ipmi_plat_data *p);