Lines Matching refs:dw9807_dev
158 static void dw9807_subdev_cleanup(struct dw9807_device *dw9807_dev) in dw9807_subdev_cleanup() argument
160 v4l2_async_unregister_subdev(&dw9807_dev->sd); in dw9807_subdev_cleanup()
161 v4l2_ctrl_handler_free(&dw9807_dev->ctrls_vcm); in dw9807_subdev_cleanup()
162 media_entity_cleanup(&dw9807_dev->sd.entity); in dw9807_subdev_cleanup()
188 struct dw9807_device *dw9807_dev; in dw9807_probe() local
191 dw9807_dev = devm_kzalloc(&client->dev, sizeof(*dw9807_dev), in dw9807_probe()
193 if (dw9807_dev == NULL) in dw9807_probe()
196 v4l2_i2c_subdev_init(&dw9807_dev->sd, client, &dw9807_ops); in dw9807_probe()
197 dw9807_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; in dw9807_probe()
198 dw9807_dev->sd.internal_ops = &dw9807_int_ops; in dw9807_probe()
200 rval = dw9807_init_controls(dw9807_dev); in dw9807_probe()
204 rval = media_entity_pads_init(&dw9807_dev->sd.entity, 0, NULL); in dw9807_probe()
208 dw9807_dev->sd.entity.function = MEDIA_ENT_F_LENS; in dw9807_probe()
210 rval = v4l2_async_register_subdev(&dw9807_dev->sd); in dw9807_probe()
221 v4l2_ctrl_handler_free(&dw9807_dev->ctrls_vcm); in dw9807_probe()
222 media_entity_cleanup(&dw9807_dev->sd.entity); in dw9807_probe()
230 struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd); in dw9807_remove() local
234 dw9807_subdev_cleanup(dw9807_dev); in dw9807_remove()
248 struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd); in dw9807_vcm_suspend() local
252 for (val = dw9807_dev->current_val & ~(DW9807_CTRL_STEPS - 1); in dw9807_vcm_suspend()
280 struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd); in dw9807_vcm_resume() local
291 for (val = dw9807_dev->current_val % DW9807_CTRL_STEPS; in dw9807_vcm_resume()
292 val < dw9807_dev->current_val + DW9807_CTRL_STEPS - 1; in dw9807_vcm_resume()