Lines Matching defs:dw9714_dev

66 static int dw9714_t_focus_vcm(struct dw9714_device *dw9714_dev, u16 val)
68 struct i2c_client *client = v4l2_get_subdevdata(&dw9714_dev->sd);
70 dw9714_dev->current_val = val;
116 static void dw9714_subdev_cleanup(struct dw9714_device *dw9714_dev)
118 v4l2_async_unregister_subdev(&dw9714_dev->sd);
119 v4l2_ctrl_handler_free(&dw9714_dev->ctrls_vcm);
120 media_entity_cleanup(&dw9714_dev->sd.entity);
142 struct dw9714_device *dw9714_dev;
145 dw9714_dev = devm_kzalloc(&client->dev, sizeof(*dw9714_dev),
147 if (dw9714_dev == NULL)
150 dw9714_dev->vcc = devm_regulator_get(&client->dev, "vcc");
151 if (IS_ERR(dw9714_dev->vcc))
152 return PTR_ERR(dw9714_dev->vcc);
154 rval = regulator_enable(dw9714_dev->vcc);
160 v4l2_i2c_subdev_init(&dw9714_dev->sd, client, &dw9714_ops);
161 dw9714_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
163 dw9714_dev->sd.internal_ops = &dw9714_int_ops;
165 rval = dw9714_init_controls(dw9714_dev);
169 rval = media_entity_pads_init(&dw9714_dev->sd.entity, 0, NULL);
173 dw9714_dev->sd.entity.function = MEDIA_ENT_F_LENS;
175 rval = v4l2_async_register_subdev(&dw9714_dev->sd);
186 regulator_disable(dw9714_dev->vcc);
187 v4l2_ctrl_handler_free(&dw9714_dev->ctrls_vcm);
188 media_entity_cleanup(&dw9714_dev->sd.entity);
196 struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
201 ret = regulator_disable(dw9714_dev->vcc);
208 dw9714_subdev_cleanup(dw9714_dev);
220 struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
226 for (val = dw9714_dev->current_val & ~(DW9714_CTRL_STEPS - 1);
235 ret = regulator_disable(dw9714_dev->vcc);
252 struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
258 ret = regulator_enable(dw9714_dev->vcc);
265 for (val = dw9714_dev->current_val % DW9714_CTRL_STEPS;
266 val < dw9714_dev->current_val + DW9714_CTRL_STEPS - 1;