Skip to Content
Linux Device Drivers Development
book

Linux Device Drivers Development

by John Madieu
October 2017
Intermediate to advanced
586 pages
14h 8m
English
Packt Publishing
Content preview from Linux Device Drivers Development

Putting it all together

So far, we have described the structures used when writing drivers for input devices, and how they can be managed from the user space:

  1. Allocate a new input device, according to its type (polled, or not), using input_allocate_polled_device() or input_allocate_device().
  2. Fill in the mandatory fields (if necessary):
    • Specify the type of event the device supports by using the set_bit() helper macro on the input_dev.evbit field.
    • Depending on the event type, EV_REL, EV_ABS, EV_KEY, or other, indicate the code this device can report, using either input_dev.relbit, input_dev.absbit, input_dev.keybit, or other.
    • Specify input_dev.dev, in order to set up a proper device tree.
    • Fill abs_info if necessary.
    • For polled devices, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Device Drivers, Second Edition

Linux Device Drivers, Second Edition

Jonathan Corbet, Alessandro Rubini
Linux Device Drivers, 3rd Edition

Linux Device Drivers, 3rd Edition

Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman

Publisher Resources

ISBN: 9781785280009Supplemental Content