1 /* 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2026 The FreeBSD Foundation 5 */ 6 7 #ifndef _LINUXKPI_LINUX_MFD_CORE_H_ 8 #define _LINUXKPI_LINUX_MFD_CORE_H_ 9 10 #include <linux/platform_device.h> 11 12 /* 13 * <linux/ioport.h> is not included by Linux, but we need it here to get the 14 * definition of `struct resource`. 15 * 16 * At least the amdgpu DRM driver (amdgpu_isp.c at the time of this writing) 17 * needs the structure without including this header: it relies on an implicit 18 * include of <linux/ioport.h> from <linux/pci.h>, which we can't have due to 19 * conflict with the FreeBSD native `struct resource`. 20 */ 21 #include <linux/ioport.h> 22 23 #include <linux/kernel.h> /* pr_debug */ 24 25 struct resource; 26 struct mfd_cell { 27 const char *name; 28 void *platform_data; 29 size_t pdata_size; 30 int num_resources; 31 const struct resource *resources; 32 }; 33 34 static inline int mfd_add_hotplug_devices(struct device * parent,const struct mfd_cell * cells,int n_devs)35mfd_add_hotplug_devices(struct device *parent, 36 const struct mfd_cell *cells, int n_devs) 37 { 38 pr_debug("%s: TODO\n", __func__); 39 40 return (0); 41 } 42 43 static inline void mfd_remove_devices(struct device * parent)44mfd_remove_devices(struct device *parent) 45 { 46 pr_debug("%s: TODO\n", __func__); 47 } 48 49 #endif /* _LINUXKPI_LINUX_MFD_CORE_H_ */ 50