mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
Add cl perf profile set ioctl
This commit is contained in:
parent
8a965edb33
commit
1f292258d5
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Copyright (c) 2020 TUXEDO Computers GmbH <tux@tuxedocomputers.com>
|
* Copyright (c) 2020-2021 TUXEDO Computers GmbH <tux@tuxedocomputers.com>
|
||||||
*
|
*
|
||||||
* This file is part of tuxedo-keyboard.
|
* This file is part of tuxedo-keyboard.
|
||||||
*
|
*
|
||||||
|
@ -45,6 +45,9 @@
|
||||||
#define CLEVO_CMD_SET_FLIGHTMODE_SW 0x20
|
#define CLEVO_CMD_SET_FLIGHTMODE_SW 0x20
|
||||||
#define CLEVO_CMD_SET_TOUCHPAD_SW 0x2a
|
#define CLEVO_CMD_SET_TOUCHPAD_SW 0x2a
|
||||||
|
|
||||||
|
#define CLEVO_CMD_OPT 0x79
|
||||||
|
#define CLEVO_OPT_SUBCMD_SET_PERF_PROF 0x19
|
||||||
|
|
||||||
int clevo_keyboard_init(void);
|
int clevo_keyboard_init(void);
|
||||||
|
|
||||||
struct clevo_interface_t {
|
struct clevo_interface_t {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Copyright (c) 2019-2020 TUXEDO Computers GmbH <tux@tuxedocomputers.com>
|
* Copyright (c) 2019-2021 TUXEDO Computers GmbH <tux@tuxedocomputers.com>
|
||||||
*
|
*
|
||||||
* This file is part of tuxedo-io.
|
* This file is part of tuxedo-io.
|
||||||
*
|
*
|
||||||
|
@ -66,6 +66,8 @@ static long clevo_ioctl_interface(struct file *file, unsigned int cmd, unsigned
|
||||||
u32 copy_result;
|
u32 copy_result;
|
||||||
u32 argument = (u32) arg;
|
u32 argument = (u32) arg;
|
||||||
|
|
||||||
|
u32 clevo_arg;
|
||||||
|
|
||||||
const char str_no_if[] = "";
|
const char str_no_if[] = "";
|
||||||
char *str_clevo_if;
|
char *str_clevo_if;
|
||||||
|
|
||||||
|
@ -139,6 +141,11 @@ static long clevo_ioctl_interface(struct file *file, unsigned int cmd, unsigned
|
||||||
copy_result = copy_from_user(&argument, (int32_t *) arg, sizeof(argument));
|
copy_result = copy_from_user(&argument, (int32_t *) arg, sizeof(argument));
|
||||||
clevo_evaluate_method(CLEVO_CMD_SET_TOUCHPAD_SW, argument, &result);
|
clevo_evaluate_method(CLEVO_CMD_SET_TOUCHPAD_SW, argument, &result);
|
||||||
break;
|
break;
|
||||||
|
case W_CL_PERF_PROFILE:
|
||||||
|
copy_result = copy_from_user(&argument, (int32_t *) arg, sizeof(argument));
|
||||||
|
clevo_arg = (CLEVO_OPT_SUBCMD_SET_PERF_PROF << 0x18) | (argument & 0xff);
|
||||||
|
clevo_evaluate_method(CLEVO_CMD_OPT, clevo_arg, &result);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Copyright (c) 2019-2020 TUXEDO Computers GmbH <tux@tuxedocomputers.com>
|
* Copyright (c) 2019-2021 TUXEDO Computers GmbH <tux@tuxedocomputers.com>
|
||||||
*
|
*
|
||||||
* This file is part of tuxedo-io.
|
* This file is part of tuxedo-io.
|
||||||
*
|
*
|
||||||
|
@ -60,6 +60,7 @@
|
||||||
#define W_CL_WEBCAM_SW _IOW(MAGIC_WRITE_CL, 0x12, int32_t*)
|
#define W_CL_WEBCAM_SW _IOW(MAGIC_WRITE_CL, 0x12, int32_t*)
|
||||||
#define W_CL_FLIGHTMODE_SW _IOW(MAGIC_WRITE_CL, 0x13, int32_t*)
|
#define W_CL_FLIGHTMODE_SW _IOW(MAGIC_WRITE_CL, 0x13, int32_t*)
|
||||||
#define W_CL_TOUCHPAD_SW _IOW(MAGIC_WRITE_CL, 0x14, int32_t*)
|
#define W_CL_TOUCHPAD_SW _IOW(MAGIC_WRITE_CL, 0x14, int32_t*)
|
||||||
|
#define W_CL_PERF_PROFILE _IOW(MAGIC_WRITE_CL, 0x15, int32_t*)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#define W_TF_BC _IOW(MAGIC_WRITE_CL, 0x91, uint32_t*)
|
#define W_TF_BC _IOW(MAGIC_WRITE_CL, 0x91, uint32_t*)
|
||||||
|
|
Loading…
Reference in a new issue