Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12244

Platform device and platform driver linking

$
0
0

While going through the usb code in linux. I came across platform_device_add() api.

My question is when we create a platform device using the above api, how does the associated driver gets bind to it?

As per my understanding is that the platform drivers register itself and when a match occurs with the device tree compatible string and the one mentioned in the driver, the probe of the driver is called.

So does it use something like a "compatible string" as in the case of the device tree?Does it use the "name" field present in the "struct platform_device" and match it with the "struct platform_driver" 's "name" field.

Please correct me if I am wrong. Also any text source to learn more on this will be helpful as I am new to this.


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>