yemista
yemista

Reputation: 433

When loading a platform driver for an I2C device does the device need to be present?

I am experimenting with building an I2C platform device driver for raspberrypi. The device is being registered as a misc device. My understanding is that when i load the driver via insmod, the probe function should be called, and at the very least should print the message I have in there. Instead I get a message about the kernel being tainted. As far as I know, even if my module taints the kernel, it should still run. MY question then is, does the device need to be physically connected to the raspberrypi in order to even call the probe function of my driver? Or is there some other issue?

Upvotes: 0

Views: 324

Answers (1)

xMutzelx
xMutzelx

Reputation: 586

The device doesn't have to be pysically plugged in to call the probe function. Most of the implemented probe functions even check if the device is plugged in or not.
The warning with the tainted kernel can also be ignored, your driver still should be able to run.
I think you missed to add your driver to the device tree.
You can find a good explanaition here LWN.net
Without more informations it is hard for us to guess some other possible problems.

Upvotes: 1

Related Questions