|
@@ -663,11 +663,11 @@ static int32_t cam_cci_set_clk_param(struct cci_device *cci_dev,
|
|
|
if (i2c_freq_mode == cci_dev->i2c_freq_mode[master]) {
|
|
|
CAM_DBG(CAM_CCI, "CCI%d_I2C_M%d, curr_freq: %d", cci_dev->soc_info.index, master,
|
|
|
i2c_freq_mode);
|
|
|
- spin_lock(&cci_master->freq_cnt_lock);
|
|
|
+ mutex_lock(&cci_master->freq_cnt_lock);
|
|
|
if (cci_master->freq_ref_cnt == 0)
|
|
|
down(&cci_master->master_sem);
|
|
|
cci_master->freq_ref_cnt++;
|
|
|
- spin_unlock(&cci_master->freq_cnt_lock);
|
|
|
+ mutex_unlock(&cci_master->freq_cnt_lock);
|
|
|
mutex_unlock(&cci_master->mutex);
|
|
|
return 0;
|
|
|
}
|
|
@@ -675,9 +675,9 @@ static int32_t cam_cci_set_clk_param(struct cci_device *cci_dev,
|
|
|
cci_dev->soc_info.index, master, cci_dev->i2c_freq_mode[master], i2c_freq_mode);
|
|
|
down(&cci_master->master_sem);
|
|
|
|
|
|
- spin_lock(&cci_master->freq_cnt_lock);
|
|
|
+ mutex_lock(&cci_master->freq_cnt_lock);
|
|
|
cci_master->freq_ref_cnt++;
|
|
|
- spin_unlock(&cci_master->freq_cnt_lock);
|
|
|
+ mutex_unlock(&cci_master->freq_cnt_lock);
|
|
|
|
|
|
clk_params = &cci_dev->cci_clk_params[i2c_freq_mode];
|
|
|
|
|
@@ -1273,10 +1273,10 @@ enable_irq:
|
|
|
rel_mutex_q:
|
|
|
mutex_unlock(&cci_dev->cci_master_info[master].mutex_q[queue]);
|
|
|
|
|
|
- spin_lock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
+ mutex_lock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
if (--cci_dev->cci_master_info[master].freq_ref_cnt == 0)
|
|
|
up(&cci_dev->cci_master_info[master].master_sem);
|
|
|
- spin_unlock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
+ mutex_unlock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
@@ -1496,10 +1496,10 @@ static int32_t cam_cci_read(struct v4l2_subdev *sd,
|
|
|
rel_mutex_q:
|
|
|
mutex_unlock(&cci_dev->cci_master_info[master].mutex_q[queue]);
|
|
|
|
|
|
- spin_lock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
+ mutex_lock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
if (--cci_dev->cci_master_info[master].freq_ref_cnt == 0)
|
|
|
up(&cci_dev->cci_master_info[master].master_sem);
|
|
|
- spin_unlock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
+ mutex_unlock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
@@ -1559,10 +1559,10 @@ static int32_t cam_cci_i2c_write(struct v4l2_subdev *sd,
|
|
|
}
|
|
|
|
|
|
ERROR:
|
|
|
- spin_lock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
+ mutex_lock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
if (--cci_dev->cci_master_info[master].freq_ref_cnt == 0)
|
|
|
up(&cci_dev->cci_master_info[master].master_sem);
|
|
|
- spin_unlock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
+ mutex_unlock(&cci_dev->cci_master_info[master].freq_cnt_lock);
|
|
|
return rc;
|
|
|
}
|
|
|
|