Platform: Rockchip
OS: Android 7.1.2
Kernel: 3.10
解决方案:直接去掉I2C通信同步锁
kerneldriversi2cbussesi2c-rockchip.c
static int rockchip_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{
int ret;
struct rockchip_i2c *i2c = i2c_get_adapdata(adap);
unsigned long scl_rate = i2c->scl_rate;
int can_sleep = !(in_atomic() || irqs_disabled());
/*if (can_sleep) {
mutex_lock(&i2c->suspend_lock);
if (i2c->suspended) {
dev_err(i2c->dev, "i2c is suspendedn");
mutex_unlock(&i2c->suspend_lock);
return -EIO;
}
}*/
Platform: Rockchip
OS: Android 7.1.2
Kernel: 3.10
解决方案:直接去掉I2C通信同步锁
kerneldriversi2cbussesi2c-rockchip.c
static int rockchip_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{
int ret;
struct rockchip_i2c *i2c = i2c_get_adapdata(adap);
unsigned long scl_rate = i2c->scl_rate;
int can_sleep = !(in_atomic() || irqs_disabled());
/*if (can_sleep) {
mutex_lock(&i2c->suspend_lock);
if (i2c->suspended) {
dev_err(i2c->dev, "i2c is suspendedn");
mutex_unlock(&i2c->suspend_lock);
return -EIO;
}
}*/
举报