Page MenuHomeFreeBSD

ums(4): Support for input event interface
ClosedPublic

Authored by wulf_cicgroup.ru on Sep 12 2016, 11:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 2:20 PM
Unknown Object (File)
Feb 23 2024, 10:48 AM
Unknown Object (File)
Feb 21 2024, 6:49 PM
Unknown Object (File)
Feb 21 2024, 6:48 PM
Unknown Object (File)
Feb 21 2024, 6:48 PM
Unknown Object (File)
Feb 21 2024, 6:35 PM
Unknown Object (File)
Feb 10 2024, 2:23 AM
Unknown Object (File)
Jan 31 2024, 5:52 AM

Details

Summary

Adds support for input event interface in ums(4) driver

At present time evdev module is tuned to prefer sysmouse and kbdmux event devices so ums`s eventX cdev will be silent until sysctl kern.evdev.rcpt_mask=12 is executed

Known bug: Advertises and reports wrong event code for button #8 and further

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

wulf_cicgroup.ru retitled this revision from to ums(4): Support for input event interface.
wulf_cicgroup.ru updated this object.
wulf_cicgroup.ru edited the test plan for this revision. (Show Details)
wulf_cicgroup.ru set the repository for this revision to rS FreeBSD src repository - subversion.
sys/dev/usb/input/ums.c
360 ↗(On Diff #20284)

Can you explain a bit more how /dev/umsX and the evdev subsystem can be in use at the same time?

Should #ifdef EVDEV be controlled by a tunable sysctl perhaps?

892 ↗(On Diff #20284)

What is the purpose of putting the data into the USB_FIFO_RX when the evdev driver is active?

@wulf_cicgroup.ru

Have you thought about if it is better to have a MODULE_DEPEND on evdev.ko instead of all the ifdefs?

--HPS

@wulf_cicgroup.ru

Have you thought about if it is better to have a MODULE_DEPEND on evdev.ko instead of all the ifdefs?

I thought of it but was stopped every time at sysmouse support as it is part of sc/vt and can not be kldloaded thus making evdev always loaded.
But I didn`t think about making sysmouse evdev support as module itself till now.

Do I understand you right that you are talking about unconditional ums->evdev dependence and dropping all of #ifdefs?

sys/dev/usb/input/ums.c
360 ↗(On Diff #20284)

Can you explain a bit more how /dev/umsX and the evdev subsystem can be in use at the same time?

moused and than console mouse support still depend on legacy interfaces like /dev/umsX

Should #ifdef EVDEV be controlled by a tunable sysctl perhaps?

There is kern.evdev.rcpt_mask sysctl that enables/disables event reporting for sysmouse/kbdmux/all mouse drivers/all keyboard drivers depending on it value
or you are talking about per driver event reporting sysctl control ?
or about complete disabling per driver of evdev interfaces via something like loader tunables?
or about creation / destroying of evdev interfaces in sysctl handler?

892 ↗(On Diff #20284)

moused and than console mouse support still depends on it

sys/dev/usb/input/ums.c
360 ↗(On Diff #20284)

I was thinking about a global sysctl like the kern.evdev.rcpt_mask . I see now that EVDEV is paralel to /dev/umsX .

--HPS

892 ↗(On Diff #20284)

OK, I see.

sys/dev/usb/input/ums.c
360 ↗(On Diff #20284)

I was thinking about a global sysctl

Here we have several choices:

  1. Introduce loader tunable to make whole evdev a no-op. It`s trivial task as struct evdev_dev is declared in private header and can be considered as opaque data. Just bunch of checks one per public KPI routine are enough.
  2. Create global sysctl to make all /dev/input/eventXXX devices silent like kern.evdev.rcpt_mask does
  3. Leave things as is.
  4. Something else?

I have no strict opinion about that.

hselasky edited edge metadata.

I'm fine with the patch AS-IS.

This revision is now accepted and ready to land.Sep 15 2016, 4:30 PM
This revision was automatically updated to reflect the committed changes.