Lines Matching +full:sub +full:- +full:module
1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Copyright (C) 2017-2018 Intel Corporation, Inc.
24 #include <linux/io-64-nonatomic-lo-hi.h>
28 #include <linux/fpga/fpga-region.h>
111 /* AFU MMIO access permission. 1 - VF, 0 - PF. */
172 * struct dfl_fpga_port_ops - port ops
175 * @owner: pointer to the module which owns this port ops.
182 struct module *owner;
195 * struct dfl_feature_id - dfl private feature id
204 * struct dfl_feature_driver - dfl private feature driver
215 * struct dfl_feature_irq_ctx - dfl private feature interrupt context
228 * struct dfl_feature - sub feature of the feature devices
230 * @dev: ptr to pdev of the feature device which has the sub feature.
231 * @id: sub feature id.
232 * @resource_index: each sub feature has one mmio resource for its registers.
238 * @ops: ops of this sub feature.
239 * @ddev: ptr to the dfl device of this sub feature.
254 #define FEATURE_DEV_ID_UNUSED (-1)
257 * struct dfl_feature_platform_data - platform data for feature devices
268 * @num: number for sub features.
270 * @features: sub features of this feature dev.
291 if (pdata->excl_open) in dfl_feature_dev_use_begin()
292 return -EBUSY; in dfl_feature_dev_use_begin()
295 if (pdata->open_count) in dfl_feature_dev_use_begin()
296 return -EBUSY; in dfl_feature_dev_use_begin()
298 pdata->excl_open = true; in dfl_feature_dev_use_begin()
300 pdata->open_count++; in dfl_feature_dev_use_begin()
308 pdata->excl_open = false; in dfl_feature_dev_use_end()
310 if (WARN_ON(pdata->open_count <= 0)) in dfl_feature_dev_use_end()
313 pdata->open_count--; in dfl_feature_dev_use_end()
319 return pdata->open_count; in dfl_feature_dev_use_count()
326 pdata->private = private; in dfl_fpga_pdata_set_private()
332 return pdata->private; in dfl_fpga_pdata_get_private()
343 #define DFL_FPGA_FEATURE_DEV_FME "dfl-fme"
344 #define DFL_FPGA_FEATURE_DEV_PORT "dfl-port"
352 struct module *owner);
360 pdata = container_of(inode->i_cdev, struct dfl_feature_platform_data, in dfl_fpga_inode_to_feature_dev()
362 return pdata->dev; in dfl_fpga_inode_to_feature_dev()
366 for ((feature) = (pdata)->features; \
367 (feature) < (pdata)->features + (pdata)->num; (feature)++)
376 if (feature->id == id) in dfl_get_feature_by_id()
387 if (feature && feature->ioaddr) in dfl_get_feature_ioaddr_by_id()
388 return feature->ioaddr; in dfl_get_feature_ioaddr_by_id()
402 return pdata->dev->dev.parent->parent; in dfl_fpga_pdata_to_parent()
427 * struct dfl_fpga_enum_info - DFL FPGA enumeration information
442 * struct dfl_fpga_enum_dfl - DFL FPGA enumeration device feature list info
462 * struct dfl_fpga_cdev - container device of DFL based FPGA
499 mutex_lock(&cdev->lock); in dfl_fpga_cdev_find_port()
501 mutex_unlock(&cdev->lock); in dfl_fpga_cdev_find_port()
520 * enum dfl_id_type - define the DFL FIU types
529 * struct dfl_device_id - dfl device identifier
541 * struct dfl_device - represent an dfl device on dfl bus
566 * struct dfl_driver - represent an dfl device driver
590 int __dfl_driver_register(struct dfl_driver *dfl_drv, struct module *owner);
594 * module_dfl_driver() - Helper macro for drivers that don't do
595 * anything special in module init/exit. This eliminates a lot of
596 * boilerplate. Each module may only use this macro once, and