问题
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