i2c registering macro not found?

若如初见. 提交于 2019-12-01 23:39:22

问题


I ame working on I2C driver on a raspPi:

/* 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));

When i compile i get following error:

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!

--> cross compiled kernel with make -j4 ARCH=arm CROSS_COMPILE=${PITOOLSBIN} CONFIG_DEBUG_SECTION_MISMATCH=y

Where do i go to from here? i did include #include <linux/i2c.h> i dont realy understand why i get this error.

pastebin with small module demonstrating problem: http://pastebin.com/ch58BUZj


in response to comment piece of my .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

来源:https://stackoverflow.com/questions/23195032/i2c-registering-macro-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!