]> Git Repo - linux.git/blob - include/linux/fpga/fpga-region.h
fpga: region: add fpga_region_class_find
[linux.git] / include / linux / fpga / fpga-region.h
1 #ifndef _FPGA_REGION_H
2 #define _FPGA_REGION_H
3
4 #include <linux/device.h>
5 #include <linux/fpga/fpga-mgr.h>
6 #include <linux/fpga/fpga-bridge.h>
7
8 /**
9  * struct fpga_region - FPGA Region structure
10  * @dev: FPGA Region device
11  * @mutex: enforces exclusive reference to region
12  * @bridge_list: list of FPGA bridges specified in region
13  * @mgr: FPGA manager
14  * @info: FPGA image info
15  * @priv: private data
16  * @get_bridges: optional function to get bridges to a list
17  */
18 struct fpga_region {
19         struct device dev;
20         struct mutex mutex; /* for exclusive reference to region */
21         struct list_head bridge_list;
22         struct fpga_manager *mgr;
23         struct fpga_image_info *info;
24         void *priv;
25         int (*get_bridges)(struct fpga_region *region);
26 };
27
28 #define to_fpga_region(d) container_of(d, struct fpga_region, dev)
29
30 struct fpga_region *fpga_region_class_find(
31         struct device *start, const void *data,
32         int (*match)(struct device *, const void *));
33
34 int fpga_region_program_fpga(struct fpga_region *region);
35 int fpga_region_register(struct device *dev, struct fpga_region *region);
36 int fpga_region_unregister(struct fpga_region *region);
37
38 #endif /* _FPGA_REGION_H */
This page took 0.035127 seconds and 4 git commands to generate.