What is the sequence followed by the Linux kernel to configure a device?
- by Jaime Soriano
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? :)