Lines Matching refs:sd
47 struct v4l2_subdev sd;
76 return container_of(subdev, struct dw9763_device, sd);
142 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd);
175 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd);
213 struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd);
265 struct i2c_client *client = v4l2_get_subdevdata(&dev->sd);
314 static int dw9763_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
317 struct dw9763_device *dev_vcm = sd_to_dw9763_vcm(sd);
319 rval = pm_runtime_get_sync(sd->dev);
321 pm_runtime_put_noidle(sd->dev);
327 pm_runtime_put_noidle(sd->dev);
333 static int dw9763_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
335 pm_runtime_put(sd->dev);
345 static long dw9763_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
349 struct i2c_client *client = v4l2_get_subdevdata(sd);
350 struct dw9763_device *dw9763_dev = sd_to_dw9763_vcm(sd);
376 static long dw9763_compat_ioctl32(struct v4l2_subdev *sd,
382 struct i2c_client *client = v4l2_get_subdevdata(sd);
388 ret = dw9763_ioctl(sd, RK_VIDIOC_VCM_TIMEINFO, &vcm_tim);
426 v4l2_device_unregister_subdev(&dw9763_dev->sd);
429 media_entity_cleanup(&dw9763_dev->sd.entity);
443 dev_err(dev_vcm->sd.dev, "%s fail error: 0x%x\n",
445 dev_vcm->sd.ctrl_handler = hdl;
461 struct v4l2_subdev *sd;
523 v4l2_i2c_subdev_init(&dw9763_dev->sd, client, &dw9763_ops);
524 dw9763_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
525 dw9763_dev->sd.internal_ops = &dw9763_int_ops;
531 ret = media_entity_pads_init(&dw9763_dev->sd.entity, 0, NULL);
535 sd = &dw9763_dev->sd;
536 sd->entity.function = MEDIA_ENT_F_LENS;
544 snprintf(sd->name, sizeof(sd->name), "m%02d_%s_%s %s",
546 DW9763_NAME, dev_name(sd->dev));
547 ret = v4l2_async_register_subdev(sd);
628 struct v4l2_subdev *sd = i2c_get_clientdata(client);
629 struct dw9763_device *dw9763_dev = sd_to_dw9763_vcm(sd);