summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVicki Pfau <vi@endrift.com>2026-05-21 18:50:40 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-06-01 21:49:14 -0700
commitc6f1363abbff69e5bd1cd1fcf060e1510e8d6d31 (patch)
tree18ccbb5d2d28a6ece2bf9989071343e938f6cac9 /drivers
parent37340ac2c7be914ff76fdc6bb505b204a4140268 (diff)
Input: userio - allow setting other id values
Previously, only the type value was settable. The proto value is used internally for choosing the right drivers, so we should expose it. The other values make sense to expose as well. Signed-off-by: Vicki Pfau <vi@endrift.com> Link: https://patch.msgid.link/20260522015040.3953472-2-vi@endrift.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/serio/userio.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/input/serio/userio.c b/drivers/input/serio/userio.c
index abca8cb6aca5..8c19975c84bf 100644
--- a/drivers/input/serio/userio.c
+++ b/drivers/input/serio/userio.c
@@ -206,6 +206,36 @@ static int userio_execute_cmd(struct userio_device *userio,
userio->serio->id.type = cmd->data;
break;
+ case USERIO_CMD_SET_PORT_EXTRA:
+ if (userio->running) {
+ dev_warn(userio_misc.this_device,
+ "Can't change port extra on an already running userio instance\n");
+ return -EBUSY;
+ }
+
+ userio->serio->id.extra = cmd->data;
+ break;
+
+ case USERIO_CMD_SET_PORT_ID:
+ if (userio->running) {
+ dev_warn(userio_misc.this_device,
+ "Can't change port id on an already running userio instance\n");
+ return -EBUSY;
+ }
+
+ userio->serio->id.id = cmd->data;
+ break;
+
+ case USERIO_CMD_SET_PORT_PROTO:
+ if (userio->running) {
+ dev_warn(userio_misc.this_device,
+ "Can't change port proto on an already running userio instance\n");
+ return -EBUSY;
+ }
+
+ userio->serio->id.proto = cmd->data;
+ break;
+
case USERIO_CMD_SEND_INTERRUPT:
if (!userio->running) {
dev_warn(userio_misc.this_device,