0
votes

I am using mcp3021.c file for Microchip MCP3021 IC. My module's init and exit functions are replaced with module_i2c_driver(mcp3021_driver), But I don't see the driver register print in my Kernel log when I ran the code. Can anybody please help me with this ?

2

2 Answers

0
votes

First thing which kernel version you are using ? because this macro is introduced in Linux kernel after version 3.3 .

So if your are using kernel version below this you should actually get error while compiling the kernel.

0
votes

You have verify are few things to make it work,

  1. Ensure that I2C device is properly mounted in hardware.
  2. Confirm that your device is not in reset state.
  3. Ensure that in your device tree you are using the appropriate I2C bus and driver id is properly configured.
  4. Check your kernel configuration(.config) that your driver is enabled.

I2C Probe will be called only if above all conditions are met.