How Probe will bind driver and device in below driver snippet
How Probe will bind driver and device in below driver snippet. I was trying to understand i2c_device_id and platform_device_id.For platform_device_id I see these type of drivers and device declarations. The names in id table are different than driver.driver.name How they will be matched later ? file
/drivers/media/tuners/it913x.c Code:
static const struct platform_device_id it913x_id_table[] = { I referred this https://lwn.net/Articles/448499/ "If an ID table is present, the platform bus code will scan through it every time it has to find a driver for a new platform device. If the device's name matches the name in an ID table entry, the device will be given to the driver for management a pointer to the matching ID table entry will be made available to the driver as well." the bold line I thought should be if the driver's name and device name in the ID table matches then the device will be given to the driver for management. Am I correct ? How does platform_device_id helps in binding the device and driver? |
I think one is for legacy applications and hardware. So, just to make sure, you should use both.
|
All times are GMT -5. The time now is 05:44 AM. |