linux/drivers/char/ipmi/ipmi_plat_data.h
Corey Minyard 3cd83bac48 ipmi: Consolidate the adding of platform devices
It was being done in two different places now that hard-coded devices
use platform devices, and it's about to be three with hotmod switching
to platform devices.  So put the code in one place.

This required some rework on some interfaces to make the type space
clean.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
2019-02-22 07:12:41 -06:00

23 lines
559 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Generic code to add IPMI platform devices.
*/
#include <linux/ipmi.h>
struct ipmi_plat_data {
unsigned int type; /* si_type for si, SI_INVALID for others */
unsigned int space; /* addr_space for si, intf# for ssif. */
unsigned long addr;
unsigned int regspacing;
unsigned int regsize;
unsigned int regshift;
unsigned int irq;
unsigned int slave_addr;
enum ipmi_addr_src addr_source;
};
struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
struct ipmi_plat_data *p);