What is the sequence followed by the Linux kernel to configure a device?
Posted
by Jaime Soriano
on Stack Overflow
See other posts from Stack Overflow
or by Jaime Soriano
Published on 2010-06-01T19:05:15Z
Indexed on
2010/06/01
19:14 UTC
Read the original article
Hit count: 450
As I understood after reading the chapter related to The Linux Device Model in the Linux Device Drivers 3rd Edition, when a new device is configured, the kernel follows more or less this sequence:
- The Device is registered in the driver core (
device_register()
, what includes device initialization) - A kobject is registered in the device model
- It provokes a hotplug event
- Bus and drivers are checked to see which one matches with the device
- Probe
- Device is binded to the driver
My main doubt is, in step 1, when is device_register()
called and what info should be yet in the device
struct?
Is it called by the bus to which the device is connected? Any example in the code?
Have I misunderstood something? :)
© Stack Overflow or respective owner