Lines Matching defs:subdev
26 #include <media/v4l2-subdev.h>
37 #define to_ad5820_device(sd) container_of(sd, struct ad5820_device, subdev)
40 struct v4l2_subdev subdev;
59 struct i2c_client *client = v4l2_get_subdevdata(&coil->subdev);
201 coil->subdev.ctrl_handler = &coil->ctrls;
207 * V4L2 subdev operations
209 static int ad5820_registered(struct v4l2_subdev *subdev)
211 struct ad5820_device *coil = to_ad5820_device(subdev);
217 ad5820_set_power(struct v4l2_subdev *subdev, int on)
219 struct ad5820_device *coil = to_ad5820_device(subdev);
273 struct v4l2_subdev *subdev = dev_get_drvdata(dev);
274 struct ad5820_device *coil = to_ad5820_device(subdev);
284 struct v4l2_subdev *subdev = dev_get_drvdata(dev);
285 struct ad5820_device *coil = to_ad5820_device(subdev);
315 v4l2_i2c_subdev_init(&coil->subdev, client, &ad5820_ops);
316 coil->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
317 coil->subdev.internal_ops = &ad5820_internal_ops;
318 coil->subdev.entity.function = MEDIA_ENT_F_LENS;
319 strscpy(coil->subdev.name, "ad5820 focus", sizeof(coil->subdev.name));
321 ret = media_entity_pads_init(&coil->subdev.entity, 0, NULL);
325 ret = v4l2_async_register_subdev(&coil->subdev);
332 media_entity_cleanup(&coil->subdev.entity);
340 struct v4l2_subdev *subdev = i2c_get_clientdata(client);
341 struct ad5820_device *coil = to_ad5820_device(subdev);
343 v4l2_async_unregister_subdev(&coil->subdev);
345 media_entity_cleanup(&coil->subdev.entity);