Page MenuHomeFreeBSD

[evdev]: Minor KPI changes
ClosedPublic

Authored by wulf on Aug 7 2018, 9:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 17, 7:19 PM
Unknown Object (File)
Sat, Dec 28, 7:46 PM
Unknown Object (File)
Dec 10 2024, 6:50 PM
Unknown Object (File)
Nov 24 2024, 3:20 AM
Unknown Object (File)
Oct 1 2024, 3:15 AM
Unknown Object (File)
Sep 9 2024, 3:42 AM
Unknown Object (File)
Sep 8 2024, 12:29 PM
Unknown Object (File)
Sep 8 2024, 7:44 AM
Subscribers

Details

Summary

This combines 2 mostly no-op changes affecting ft5406, ums, ukbd and some other drivers

  1. Remove evdev.ko linkage dependency on kbd driver

    Move evdev_ev_kbd_event() helper from evdev to kbd.c as otherwise evdev unconditionally requires all keyboard and console stuff to be compiled in to kernel. This dependency happens as evdev_ev_kbd_event() helper references kbdsw global variable defined in kbd.c through use of kbdd_ioctl() macro.

    While here make all keyboard drivers respect evdev_rcpt_mask while setting typematic rate and LEDs with evdev interface.

    Requested by: Milan Obuch <bsd@dino.sk>
  1. remove soft context from evdev methods parameter list.

    Now softc should be retrieved from struct edvev * pointer with evdev_get_softc() helper.

    wmt(4) is a sample of driver that support both KPI.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/dev/usb/input/wmt.c
233

Why is there an #if 1 here ?

sys/dev/usb/input/wmt.c
233

I am going to replace it with somethig like

#if (__FreeBSD_version >= 12XXXXXX)

when XXXXXX will be known

wulf edited the summary of this revision. (Show Details)

#if 1 replaced with #if __FreeBSD_version >= 1200000

This revision is now accepted and ready to land.Aug 7 2018, 11:35 AM
sys/arm/broadcom/bcm2835/bcm2835_ft5406.c
180

Why are you casting this? A void * shouldn't need to be cast to another pointer.

sys/dev/usb/input/wmt.c
233

Do we need the check?

sys/arm/broadcom/bcm2835/bcm2835_ft5406.c
180

I think I took it from some code snippets originated in caddr_t times. I will remove these useless casts.

sys/dev/usb/input/wmt.c
233

This check is not needed for already MFC-ed to 11 drivers but can be useful for not yet committed ones, if any exist, as it makes such a MFC simpler.
It is placed here only for reference as this file is a sample of driver that supports both versions of KPI. It should be removed after 11-EOL.

Useless softc casts removed

This revision now requires review to proceed.Aug 7 2018, 11:35 PM
This revision is now accepted and ready to land.Aug 8 2018, 6:03 AM
This revision was automatically updated to reflect the committed changes.