fpga: add method to get fpga manager from device

The intent is to provide a non-DT method of getting
ahold of a FPGA manager to do some FPGA programming.

This patch refactors of_fpga_mgr_get() to reuse most of it
while adding a new method fpga_mgr_get() for getting a
pointer to a fpga manager struct, given the device.

Signed-off-by: Alan Tull <atull@opensource.altera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alan Tull
2016-11-01 14:14:23 -05:00
committed by Greg Kroah-Hartman
parent 39a842e22c
commit 9dce0287a6
3 changed files with 60 additions and 24 deletions

View File

@@ -117,6 +117,8 @@ int fpga_mgr_firmware_load(struct fpga_manager *mgr, u32 flags,
struct fpga_manager *of_fpga_mgr_get(struct device_node *node);
struct fpga_manager *fpga_mgr_get(struct device *dev);
void fpga_mgr_put(struct fpga_manager *mgr);
int fpga_mgr_register(struct device *dev, const char *name,