|
i2c问题
发表于 2016-8-20 17:09:08
浏览:10437
|
回复:4
打印
只看该作者
[复制链接]
楼主
各位请教一个i2c方面的问题,我在firefly-rk3288-reload.dts的&i2c1 {...}里加入一个设备信息:au@88 {compatible = "st, abc"; reg = <0x88>;};并重新编译下载了kernel.img和resource.img,然后在驱动程序如下: 最终还是不能执行probe函数,也就是没匹配上,实在找不到问题了,特来求助!
static struct of_device_id audio_i2c_dts[] = {
{.compatible = "st,abc", },
{}
};
static const struct i2c_device_id i2c_id_table[] = {
{"abc", 0},
{}
};
static struct i2c_driver xxx_i2c_audio_driver = {
.probe = xxx_i2c_audio_probe,
.remove = xxx_i2c_audio_remove,
.driver = {
.name = "xxx_i2c_audio",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(audio_i2c_dts),
},
.id_table = i2c_id_table,
};
|
|