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

RTC API

An RTC device is represented in the kernel as an instance of the struct rtc_device structure. Unlike other kernel framework device registrations (where the device is given as a parameter to the registering function), the RTC device is built by the core, and is registered before the rtc_device structure gets returned to the driver. The device is built and registered with the kernel using the rtc_device_register() function:

struct rtc_device *rtc_device_register(const char *name,                              struct device *dev, 
                             const struct rtc_class_ops *ops, 
                             struct module *owner) 

The meanings of the parameters of the are as follows:

  • name: This is your RTC device name. It could be the chip's name; for example, ds1343.
  • dev: This is the parent device, used for ...
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