Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit a5c31d3

Browse files
committed
input: passthrough virtio-input device
The virtio-input device event should be passthrough and send to uplayer directly, since the events get from host, and already handled in host input driver. Tracked-On: OAM-90659 Signed-off-by: Yang, Dong <dong.yang@intel.com>
1 parent c3a0958 commit a5c31d3

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

drivers/input/input.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,20 @@ static void input_handle_event(struct input_dev *dev,
371371
{
372372
int disposition = input_get_disposition(dev, type, code, &value);
373373

374+
if (dev->phys && !strncmp(dev->phys, "virtio", 6)) {
375+
struct input_value *v;
376+
if (!dev->vals)
377+
return;
378+
379+
v = &dev->vals[dev->num_vals++];
380+
v->type = type;
381+
v->code = code;
382+
v->value = value;
383+
input_pass_values(dev, dev->vals, dev->num_vals);
384+
dev->num_vals = 0;
385+
return;
386+
}
387+
374388
if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN)
375389
add_input_randomness(type, code, value);
376390

0 commit comments

Comments
 (0)