- 论坛徽章:
- 0
|
模拟i2c总线,用的是内核的i2c-gpio模块,现在就是运行到- ret = gpio_request(pdata->sda_pin, "scl");
- if (ret){
- printk("i2c-gpio %s, %d\n", __FUNCTION__, __LINE__);
- goto err_request_sda;
- }
- ret = gpio_request(pdata->scl_pin, "scl");
- //ret = gpio_request(scl_i2c, "scl");
- if (ret){
- printk("i2c-gpio %s, %d\n", __FUNCTION__, __LINE__);
- goto err_request_scl;
- }
复制代码 这里的request_gpio无法通过,如果屏蔽这2句,可以看到i2c-2总线,但是看不到波形输出!
[ 1.085457] i2c-gpio: --i2c_gpio_probe--222-----
[ 1.086034] i2c-gpio:configure gpio done!!!
[ 1.086548] i2c-gpio:SCL (GPIO3
[ 1.086956] i2c-gpio:SDA (GPIO37)
[ 1.087364] i2c-gpio:SCL (GPIO3
[ 1.087772] i2c-gpio:SDA (GPIO37)
[ 1.088181] pdata get i2c_gpio_probe, 286
[ 1.088690] i2c-gpio i2c_gpio_probe, 291
[ 1.089169] i2c-gpio i2c_gpio_probe, 305
[ 1.089659] i2c-gpio: probe of i2c-gpio.2 failed with error -38 |
|