summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAlan Tull <atull@kernel.org>2017-11-15 14:20:23 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-28 16:30:38 +0100
commit52a3a7ccce07e73323fc1bae9eb0b0b63375391c (patch)
tree6796ce652e7ad0c399ba3cd3cd1bb2f5034fa089 /include/linux
parent3b49537f8084af15ccaac542eaf317e01c6869e6 (diff)
downloadtalos-obmc-linux-52a3a7ccce07e73323fc1bae9eb0b0b63375391c.tar.gz
talos-obmc-linux-52a3a7ccce07e73323fc1bae9eb0b0b63375391c.zip
fpga: region: add register/unregister functions
Another step in separating common code from device tree specific code for FPGA regions. * add FPGA region register/unregister functions. * add the register/unregister functions to the header * use devm_kzalloc to alloc the region. * add a method for getting bridges to the region struct * add priv to the region struct * use region->info in of_fpga_region_get_bridges Signed-off-by: Alan Tull <atull@kernel.org> Acked-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fpga/fpga-region.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fpga/fpga-region.h b/include/linux/fpga/fpga-region.h
index 8a355171406b..8c8a3249f96c 100644
--- a/include/linux/fpga/fpga-region.h
+++ b/include/linux/fpga/fpga-region.h
@@ -12,6 +12,8 @@
* @bridge_list: list of FPGA bridges specified in region
* @mgr: FPGA manager
* @info: FPGA image info
+ * @priv: private data
+ * @get_bridges: optional function to get bridges to a list
*/
struct fpga_region {
struct device dev;
@@ -19,10 +21,15 @@ struct fpga_region {
struct list_head bridge_list;
struct fpga_manager *mgr;
struct fpga_image_info *info;
+ void *priv;
+ int (*get_bridges)(struct fpga_region *region);
};
#define to_fpga_region(d) container_of(d, struct fpga_region, dev)
int fpga_region_program_fpga(struct fpga_region *region);
+int fpga_region_register(struct device *dev, struct fpga_region *region);
+int fpga_region_unregister(struct fpga_region *region);
+
#endif /* _FPGA_REGION_H */
OpenPOWER on IntegriCloud