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);
274 struct v4l2_subdev *subdev = i2c_get_clientdata(client);
275 struct ad5820_device *coil = to_ad5820_device(subdev);
286 struct v4l2_subdev *subdev = i2c_get_clientdata(client);
287 struct ad5820_device *coil = to_ad5820_device(subdev);
324 v4l2_i2c_subdev_init(&coil->subdev, client, &ad5820_ops);
325 coil->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
326 coil->subdev.internal_ops = &ad5820_internal_ops;
327 coil->subdev.entity.function = MEDIA_ENT_F_LENS;
328 strscpy(coil->subdev.name, "ad5820 focus", sizeof(coil->subdev.name));
330 ret = media_entity_pads_init(&coil->subdev.entity, 0, NULL);
334 ret = v4l2_async_register_subdev(&coil->subdev);
341 media_entity_cleanup(&coil->subdev.entity);
349 struct v4l2_subdev *subdev = i2c_get_clientdata(client);
350 struct ad5820_device *coil = to_ad5820_device(subdev);
352 v4l2_async_unregister_subdev(&coil->subdev);
354 media_entity_cleanup(&coil->subdev.entity);