本帖最后由 z593512754 于 2015-2-16 11:18 编辑
Hi,Rita,
我想请教一下IMX6Q平台I2C设备的client是在哪里创建的?
如\yocto-dev\build\tmp\work\imx6qsabresd-poky-linux-gnueabi\linux-imx\3.10.17-r0\git\drivers\media\platform\mxc\capture\adv7180.c
里面有i2c_add_driver(&adv7180_i2c_driver),不知i2c_client是在什么地方创建
还有就是这颗IC是在你们哪个型号的开发板上验证过的呢?移植到SABRESD板子上需要改哪些地方?
static const struct i2c_device_id adv7180_id[] = {
{"adv7180", 0},
{},
};
MODULE_DEVICE_TABLE(i2c, adv7180_id);
static struct i2c_driver adv7180_i2c_driver = {
.driver = {
.owner = THIS_MODULE,
.name = "adv7180",
},
.probe = adv7180_probe,
.remove = adv7180_detach,
.id_table = adv7180_id,
};
static __init int adv7180_init(void)
{
u8 err = 0;
pr_debug("In adv7180_init\n");
/* Tells the i2c driver what functions to call for this driver. */
err = i2c_add_driver(&adv7180_i2c_driver);
if (err != 0)
pr_err("%s:driver registration failed, error=%d\n",
__func__, err);
return err;
} |