|
@@ -16,6 +16,7 @@
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
|
|
+#include <linux/fpga-dfl.h>
|
|
|
|
|
|
#include "dfl.h"
|
|
#include "dfl.h"
|
|
|
|
|
|
@@ -116,6 +117,13 @@ static struct dfl_feature_driver fme_feature_drvs[] = {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static long fme_ioctl_check_extension(struct dfl_feature_platform_data *pdata,
|
|
|
|
+ unsigned long arg)
|
|
|
|
+{
|
|
|
|
+ /* No extension support for now */
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static int fme_open(struct inode *inode, struct file *filp)
|
|
static int fme_open(struct inode *inode, struct file *filp)
|
|
{
|
|
{
|
|
struct platform_device *fdev = dfl_fpga_inode_to_feature_dev(inode);
|
|
struct platform_device *fdev = dfl_fpga_inode_to_feature_dev(inode);
|
|
@@ -156,6 +164,10 @@ static long fme_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|
dev_dbg(&pdev->dev, "%s cmd 0x%x\n", __func__, cmd);
|
|
dev_dbg(&pdev->dev, "%s cmd 0x%x\n", __func__, cmd);
|
|
|
|
|
|
switch (cmd) {
|
|
switch (cmd) {
|
|
|
|
+ case DFL_FPGA_GET_API_VERSION:
|
|
|
|
+ return DFL_FPGA_API_VERSION;
|
|
|
|
+ case DFL_FPGA_CHECK_EXTENSION:
|
|
|
|
+ return fme_ioctl_check_extension(pdata, arg);
|
|
default:
|
|
default:
|
|
/*
|
|
/*
|
|
* Let sub-feature's ioctl function to handle the cmd.
|
|
* Let sub-feature's ioctl function to handle the cmd.
|