mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
fpga: ts73xx-fpga: add OF match table for device tree probing
The ts73xx-fpga driver currently only matches by platform device name, which prevents it from being probed when the device is described in a device tree. Add an of_device_id table so the driver can match against the "technologic,ts7300-fpga" compatible string. The TS-7350 and TS-7390 use different FPGAs with a different programming interface, so while the driver is named "ts73xx-fpga", it doesn't apply to them. Signed-off-by: Phil Pemberton <philpem@philpem.me.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20260409122016.3940462-3-philpem@philpem.me.uk Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/iopoll.h>
|
||||
@@ -119,9 +120,17 @@ static int ts73xx_fpga_probe(struct platform_device *pdev)
|
||||
return PTR_ERR_OR_ZERO(mgr);
|
||||
}
|
||||
|
||||
static const struct of_device_id ts73xx_fpga_of_match[] = {
|
||||
{ .compatible = "technologic,ts7300-fpga" },
|
||||
{},
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, ts73xx_fpga_of_match);
|
||||
|
||||
static struct platform_driver ts73xx_fpga_driver = {
|
||||
.driver = {
|
||||
.name = "ts73xx-fpga-mgr",
|
||||
.of_match_table = ts73xx_fpga_of_match,
|
||||
},
|
||||
.probe = ts73xx_fpga_probe,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user