I had been looking at the sdio kernel driver code. I can see the module will be included in the kernel. But how will the kernel know, what hardware is connected and which driver to be invoked.? The answer need not be specific to SDIO. Please answer if you can help with any hardware. I just want to learn how it works.