fpga: add fpga_compatible2flag

Add a "compatible" string to binary flag converter, which uses
a callback str2flag() of given FPGA driver if available.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-8-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
diff --git a/include/fpga.h b/include/fpga.h
index 6365e15..13b1bbe 100644
--- a/include/fpga.h
+++ b/include/fpga.h
@@ -75,5 +75,6 @@
 int fpga_info(int devnum);
 const fpga_desc *const fpga_validate(int devnum, const void *buf,
 				     size_t bsize, char *fn);
+int fpga_compatible2flag(int devnum, const char *compatible);
 
 #endif	/* _FPGA_H_ */