Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fpga: dfl: afu: add DFL_FPGA_GET_API_VERSION/CHECK_EXTENSION ioctls support

DFL_FPGA_GET_API_VERSION and DFL_FPGA_CHECK_EXTENSION ioctls are common
ones which need to be supported by all feature devices drivers including
FME and AFU. This patch implements above 2 ioctls in FPGA Accelerated
Function Unit (AFU) driver.

Signed-off-by: Tim Whisonant <tim.whisonant@intel.com>
Signed-off-by: Enno Luebbers <enno.luebbers@intel.com>
Signed-off-by: Shiva Rao <shiva.rao@intel.com>
Signed-off-by: Christopher Rauer <christopher.rauer@intel.com>
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Wu Hao <hao.wu@intel.com>
Acked-by: Alan Tull <atull@kernel.org>
Acked-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wu Hao and committed by
Greg Kroah-Hartman
6fd893c4 e4664c0e

+11
+11
drivers/fpga/dfl-afu-main.c
··· 236 236 return 0; 237 237 } 238 238 239 + static long afu_ioctl_check_extension(struct dfl_feature_platform_data *pdata, 240 + unsigned long arg) 241 + { 242 + /* No extension support for now */ 243 + return 0; 244 + } 245 + 239 246 static long afu_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) 240 247 { 241 248 struct platform_device *pdev = filp->private_data; ··· 255 248 pdata = dev_get_platdata(&pdev->dev); 256 249 257 250 switch (cmd) { 251 + case DFL_FPGA_GET_API_VERSION: 252 + return DFL_FPGA_API_VERSION; 253 + case DFL_FPGA_CHECK_EXTENSION: 254 + return afu_ioctl_check_extension(pdata, arg); 258 255 default: 259 256 /* 260 257 * Let sub-feature's ioctl function to handle the cmd