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

Remark

For kernel versions older than 4.10, if you look at drivers/i2c/i2c-core.c in the i2c_device_probe() function (for information, it is the function the kernel calls every time an I2C device is registered to the I2C core), you will see something like this:

    if (!driver->probe || !driver->id_table) 
            return -ENODEV; 

This means that even if you do not need to use the .id_table, it is mandatory in the driver. In fact, you can use the OF match style only, but cannot get rid of .id_table. Kernel developers tried to remove the need for .id_table and exclusively use .of_match_table for device matching. The patch is available at this URL: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c80f52847c50109ca248c22efbf71ff10553dca4 ...

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