diff options
| author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2026-03-08 09:40:38 +0000 |
|---|---|---|
| committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2026-04-06 19:28:09 +0000 |
| commit | 356d6f47d3b54b34aaba9e60aa551f3d615d0e2f (patch) | |
| tree | 2138eedcf5e1a9526ad0cc0ed8213d3cd28717bd /sys/compat/linuxkpi/common | |
| parent | ca6ea6df1f9241346d043a2091484ac9ced6580e (diff) | |
Diffstat (limited to 'sys/compat/linuxkpi/common')
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/mfd/core.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/mfd/core.h b/sys/compat/linuxkpi/common/include/linux/mfd/core.h new file mode 100644 index 000000000000..1a69a3803b5d --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/mfd/core.h @@ -0,0 +1,49 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_LINUX_MFD_CORE_H_ +#define _LINUXKPI_LINUX_MFD_CORE_H_ + +#include <linux/platform_device.h> + +/* + * <linux/ioport.h> is not included by Linux, but we need it here to get the + * definition of `struct resource`. + * + * At least the amdgpu DRM driver (amdgpu_isp.c at the time of this writing) + * needs the structure without including this header: it relies on an implicit + * include of <linux/ioport.h> from <linux/pci.h>, which we can't have due to + * conflict with the FreeBSD native `struct resource`. + */ +#include <linux/ioport.h> + +#include <linux/kernel.h> /* pr_debug */ + +struct resource; +struct mfd_cell { + const char *name; + void *platform_data; + size_t pdata_size; + int num_resources; + const struct resource *resources; +}; + +static inline int +mfd_add_hotplug_devices(struct device *parent, + const struct mfd_cell *cells, int n_devs) +{ + pr_debug("%s: TODO\n", __func__); + + return (0); +} + +static inline void +mfd_remove_devices(struct device *parent) +{ + pr_debug("%s: TODO\n", __func__); +} + +#endif /* _LINUXKPI_LINUX_MFD_CORE_H_ */ |
