diff options
Diffstat (limited to 'kernel/ethosu_device.c')
-rw-r--r-- | kernel/ethosu_device.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/ethosu_device.c b/kernel/ethosu_device.c index 0df6c07..7ad2a28 100644 --- a/kernel/ethosu_device.c +++ b/kernel/ethosu_device.c @@ -252,6 +252,17 @@ static long ethosu_ioctl(struct file *file, file, cmd, arg); switch (cmd) { + case ETHOSU_IOCTL_DRIVER_VERSION_GET: { + const struct ethosu_uapi_kernel_driver_version version = { + .major = ETHOSU_KERNEL_DRIVER_VERSION_MAJOR, + .minor = ETHOSU_KERNEL_DRIVER_VERSION_MINOR, + .patch = ETHOSU_KERNEL_DRIVER_VERSION_PATCH, + }; + + ret = copy_to_user(udata, &version, + sizeof(version)) ? -EFAULT : 0; + break; + } case ETHOSU_IOCTL_CAPABILITIES_REQ: { dev_info(dev, "Device ioctl: Capabilities request"); |