diff --git a/src/tuxedo_io/tuxedo_io.c b/src/tuxedo_io/tuxedo_io.c index 02380d5..90a310b 100644 --- a/src/tuxedo_io/tuxedo_io.c +++ b/src/tuxedo_io/tuxedo_io.c @@ -415,6 +415,10 @@ static long uniwill_ioctl_interface(struct file *file, unsigned int cmd, unsigne copy_result = copy_to_user((char *) arg, str_no_if, strlen(str_no_if) + 1); } break; + case R_UW_MODEL_ID: + result = uw_feats->model; + copy_result = copy_to_user((void *) arg, &result, sizeof(result)); + break; case R_UW_FANSPEED: uniwill_read_ec_ram(0x1804, &byte_data); result = byte_data; diff --git a/src/tuxedo_io/tuxedo_io_ioctl.h b/src/tuxedo_io/tuxedo_io_ioctl.h index a98d79c..596dbfe 100644 --- a/src/tuxedo_io/tuxedo_io_ioctl.h +++ b/src/tuxedo_io/tuxedo_io_ioctl.h @@ -1,5 +1,5 @@ /*! - * Copyright (c) 2019-2021 TUXEDO Computers GmbH + * Copyright (c) 2019-2022 TUXEDO Computers GmbH * * This file is part of tuxedo-io. * @@ -72,6 +72,7 @@ // Read #define R_UW_HW_IF_STR _IOR(MAGIC_READ_UW, 0x00, char*) +#define R_UW_MODEL_ID _IOR(MAGIC_READ_UW, 0x01, int32_t*) #define R_UW_FANSPEED _IOR(MAGIC_READ_UW, 0x10, int32_t*) #define R_UW_FANSPEED2 _IOR(MAGIC_READ_UW, 0x11, int32_t*) #define R_UW_FAN_TEMP _IOR(MAGIC_READ_UW, 0x12, int32_t*)