Home
last modified time | relevance | path

Searched refs:dev_vcm (Results 1 – 10 of 10) sorted by relevance

/OK3568_Linux_fs/kernel/drivers/media/i2c/
H A Dgt9760s.c241 static unsigned int gt9760s_move_time(struct gt9760s_device *dev_vcm, unsigned int move_pos) in gt9760s_move_time() argument
243 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in gt9760s_move_time()
253 if (dev_vcm->dlc_enable) { in gt9760s_move_time()
254 step_case = dev_vcm->mclk & 0x3; in gt9760s_move_time()
257 if (gt9760s_dlc_time_table[i].t_src == dev_vcm->t_src) in gt9760s_move_time()
261 step_case = dev_vcm->step_mode & 0x3; in gt9760s_move_time()
264 if (gt9760s_lsc_time_table[i].t_src == dev_vcm->t_src) in gt9760s_move_time()
295 codes_per_step = (dev_vcm->step_mode & 0x0c) >> 2; in gt9760s_move_time()
299 if (dev_vcm->dlc_enable) { in gt9760s_move_time()
316 struct gt9760s_device *dev_vcm = sd_to_vcm_dev(sd); in gt9760s_init() local
[all …]
H A Ddw9714.c354 static unsigned int dw9714_move_time(struct dw9714_device *dev_vcm, in dw9714_move_time() argument
357 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in dw9714_move_time()
367 if (dev_vcm->adcanced_mode) { in dw9714_move_time()
369 sac_prescl = 1 << dev_vcm->sac_prescl; in dw9714_move_time()
370 move_time_ms = (((381 + 3 * dev_vcm->sac_time)) * sac_prescl + 99) / 100; in dw9714_move_time()
372 } else if (dev_vcm->dlc_enable) { in dw9714_move_time()
373 step_case = dev_vcm->mclk & 0x3; in dw9714_move_time()
377 if (dw9714_dlc_time_table[i].t_src == dev_vcm->t_src) in dw9714_move_time()
381 step_case = dev_vcm->step_mode & 0x3; in dw9714_move_time()
385 if (dw9714_lsc_time_table[i].t_src == dev_vcm->t_src) in dw9714_move_time()
[all …]
H A Dcn3927v.c372 static unsigned int cn3927v_move_time(struct cn3927v_device *dev_vcm, in cn3927v_move_time() argument
375 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in cn3927v_move_time()
385 if (dev_vcm->adcanced_mode) { in cn3927v_move_time()
387 sac_prescl = 1 << dev_vcm->sac_prescl; in cn3927v_move_time()
388 move_time_ms = (((381 + 3 * dev_vcm->sac_time)) * sac_prescl + 50) / 100; in cn3927v_move_time()
390 } else if (dev_vcm->dlc_enable) { in cn3927v_move_time()
391 step_case = dev_vcm->mclk & 0x3; in cn3927v_move_time()
395 if (cn3927v_dlc_time_table[i].t_src == dev_vcm->t_src) in cn3927v_move_time()
399 step_case = dev_vcm->step_mode & 0x3; in cn3927v_move_time()
403 if (cn3927v_lsc_time_table[i].t_src == dev_vcm->t_src) in cn3927v_move_time()
[all …]
H A Daw8601.c142 static unsigned int aw8601_move_time_div(struct aw8601_device *dev_vcm, in aw8601_move_time_div() argument
145 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in aw8601_move_time_div()
148 switch (dev_vcm->t_div) { in aw8601_move_time_div()
170 __func__, dev_vcm->t_div); in aw8601_move_time_div()
176 static unsigned int aw8601_move_time(struct aw8601_device *dev_vcm, in aw8601_move_time() argument
179 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in aw8601_move_time()
182 switch (dev_vcm->step_mode) { in aw8601_move_time()
184 move_time_us = 252 + dev_vcm->t_src * 4; in aw8601_move_time()
191 move_time_us = 6300 + dev_vcm->t_src * 100; in aw8601_move_time()
192 move_time_us = aw8601_move_time_div(dev_vcm, move_time_us); in aw8601_move_time()
[all …]
H A Ddw9800w.c147 static unsigned int dw9800w_move_time_div(struct dw9800w_device *dev_vcm, in dw9800w_move_time_div() argument
150 struct i2c_client *client = dev_vcm->client; in dw9800w_move_time_div()
153 switch (dev_vcm->t_div) { in dw9800w_move_time_div()
175 __func__, dev_vcm->t_div); in dw9800w_move_time_div()
181 static unsigned int dw9800w_move_time(struct dw9800w_device *dev_vcm, in dw9800w_move_time() argument
184 struct i2c_client *client = dev_vcm->client; in dw9800w_move_time()
187 switch (dev_vcm->step_mode) { in dw9800w_move_time()
189 move_time_us = 252 + dev_vcm->t_src * 4; in dw9800w_move_time()
196 move_time_us = 6300 + dev_vcm->t_src * 100; in dw9800w_move_time()
197 move_time_us = dw9800w_move_time_div(dev_vcm, move_time_us); in dw9800w_move_time()
[all …]
H A Ddw9763.c149 static unsigned int dw9763_move_time_div(struct dw9763_device *dev_vcm, in dw9763_move_time_div() argument
152 struct i2c_client *client = dev_vcm->client; in dw9763_move_time_div()
155 switch (dev_vcm->t_div) { in dw9763_move_time_div()
175 dev_err(&client->dev, "%s: t_div parameter err %d\n", __func__, dev_vcm->t_div); in dw9763_move_time_div()
182 static unsigned int dw9763_move_time(struct dw9763_device *dev_vcm, in dw9763_move_time() argument
185 struct i2c_client *client = dev_vcm->client; in dw9763_move_time()
188 switch (dev_vcm->step_mode) { in dw9763_move_time()
194 move_time_us = 6300 + dev_vcm->t_src * 100; in dw9763_move_time()
195 move_time_us = dw9763_move_time_div(dev_vcm, move_time_us); in dw9763_move_time()
203 __func__, dev_vcm->step_mode); in dw9763_move_time()
[all …]
H A Dfp5510.c152 static int __fp5510_power_on(struct fp5510_device *dev_vcm) in __fp5510_power_on() argument
154 if (!IS_ERR(dev_vcm->pwdn_gpio)) { in __fp5510_power_on()
155 gpiod_set_value_cansleep(dev_vcm->pwdn_gpio, 1); in __fp5510_power_on()
156 dev_err(dev_vcm->sd.dev, "power on success!\n"); in __fp5510_power_on()
162 static int __fp5510_power_off(struct fp5510_device *dev_vcm) in __fp5510_power_off() argument
164 if (!IS_ERR(dev_vcm->pwdn_gpio)) { in __fp5510_power_off()
165 gpiod_set_value_cansleep(dev_vcm->pwdn_gpio, 0); in __fp5510_power_off()
166 dev_err(dev_vcm->sd.dev, "power off success!\n"); in __fp5510_power_off()
254 static unsigned int fp5510_move_time(struct fp5510_device *dev_vcm, in fp5510_move_time() argument
265 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in fp5510_move_time()
[all …]
H A Dvm149c.c147 struct vm149c_device *dev_vcm, in vm149c_get_pos() argument
150 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in vm149c_get_pos()
162 if (abs_step <= dev_vcm->start_current) in vm149c_get_pos()
164 else if ((abs_step > dev_vcm->start_current) && in vm149c_get_pos()
165 (abs_step <= dev_vcm->rated_current)) in vm149c_get_pos()
166 abs_step = (dev_vcm->rated_current - abs_step) / dev_vcm->step; in vm149c_get_pos()
181 struct vm149c_device *dev_vcm, in vm149c_set_pos() argument
188 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in vm149c_set_pos()
191 position = dev_vcm->start_current; in vm149c_set_pos()
193 position = dev_vcm->start_current + in vm149c_set_pos()
[all …]
H A Dak7375.c75 struct ak7375_device *dev_vcm = to_ak7375_vcm(ctrl); in ak7375_set_ctrl() local
78 return ak7375_i2c_write(dev_vcm, AK7375_REG_POSITION, in ak7375_set_ctrl()
122 static int ak7375_init_controls(struct ak7375_device *dev_vcm) in ak7375_init_controls() argument
124 struct v4l2_ctrl_handler *hdl = &dev_vcm->ctrls_vcm; in ak7375_init_controls()
129 dev_vcm->focus = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_FOCUS_ABSOLUTE, in ak7375_init_controls()
133 dev_err(dev_vcm->sd.dev, "%s fail error: 0x%x\n", in ak7375_init_controls()
135 dev_vcm->sd.ctrl_handler = hdl; in ak7375_init_controls()
H A Ddw9807-vcm.c114 struct dw9807_device *dev_vcm = container_of(ctrl->handler, in dw9807_set_ctrl() local
118 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in dw9807_set_ctrl()
120 dev_vcm->current_val = ctrl->val; in dw9807_set_ctrl()
165 static int dw9807_init_controls(struct dw9807_device *dev_vcm) in dw9807_init_controls() argument
167 struct v4l2_ctrl_handler *hdl = &dev_vcm->ctrls_vcm; in dw9807_init_controls()
169 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd); in dw9807_init_controls()
176 dev_vcm->sd.ctrl_handler = hdl; in dw9807_init_controls()