i2c注册宏未找到?

时间:2014-04-21 09:59:07

标签: linux-kernel driver linux-device-driver i2c

我正在使用raspPi上的I2C驱动程序:

/* register I2C device static */
static const struct i2c_board_info rasp_i2c_devices[] = {
    { "mbed", mbedID },
};

/* in the init function of my module */
i2c_register_board_info(0,rasp_i2c_devices,ARRAY_SIZE(rasp_i2c_devices));

当我编译时,我得到以下错误:

make[1]: Entering directory `/home/zilleplus/rasp/linux'
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "i2c_register_board_info" [/home/zilleplus/LedCube/Module/I2C/I2Crasp.ko] undefined!

- >使用make -j4交叉编译内核ARCH = arm CROSS_COMPILE = $ {PITOOLSBIN} CONFIG_DEBUG_SECTION_MISMATCH = y

我从哪里去?我确实包括#include <linux/i2c.h> 我真的不明白为什么我会收到这个错误。

带小模块的pastebin显示问题: http://pastebin.com/ch58BUZj


回应我的.config注释:

CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m

0 个答案:

没有答案