Page MenuHomeFreeBSD

[evdev]: Minor KPI changes
ClosedPublic

Authored by wulf on Aug 7 2018, 9:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 29 2023, 1:39 AM
Unknown Object (File)
Dec 20 2023, 3:16 AM
Unknown Object (File)
Aug 2 2023, 7:52 AM
Unknown Object (File)
Aug 2 2023, 7:50 AM
Unknown Object (File)
Aug 2 2023, 7:50 AM
Unknown Object (File)
Aug 2 2023, 7:49 AM
Unknown Object (File)
Aug 2 2023, 7:48 AM
Unknown Object (File)
Aug 2 2023, 7:38 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/usb/input/wmt.c
233 ↗(On Diff #46375)

Why is there an #if 1 here ?

sys/dev/usb/input/wmt.c
233 ↗(On Diff #46375)

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 ↗(On Diff #46376)

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

sys/dev/usb/input/wmt.c
233 ↗(On Diff #46375)

Do we need the check?

sys/arm/broadcom/bcm2835/bcm2835_ft5406.c
180 ↗(On Diff #46376)

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 ↗(On Diff #46375)

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.