Lines Matching refs:tr
43 struct timbradio *tr = video_drvdata(file); in timbradio_vidioc_g_tuner() local
44 return v4l2_subdev_call(tr->sd_tuner, tuner, g_tuner, v); in timbradio_vidioc_g_tuner()
50 struct timbradio *tr = video_drvdata(file); in timbradio_vidioc_s_tuner() local
51 return v4l2_subdev_call(tr->sd_tuner, tuner, s_tuner, v); in timbradio_vidioc_s_tuner()
57 struct timbradio *tr = video_drvdata(file); in timbradio_vidioc_s_frequency() local
58 return v4l2_subdev_call(tr->sd_tuner, tuner, s_frequency, f); in timbradio_vidioc_s_frequency()
64 struct timbradio *tr = video_drvdata(file); in timbradio_vidioc_g_frequency() local
65 return v4l2_subdev_call(tr->sd_tuner, tuner, g_frequency, f); in timbradio_vidioc_g_frequency()
90 struct timbradio *tr; in timbradio_probe() local
99 tr = devm_kzalloc(&pdev->dev, sizeof(*tr), GFP_KERNEL); in timbradio_probe()
100 if (!tr) { in timbradio_probe()
105 tr->pdata = *pdata; in timbradio_probe()
106 mutex_init(&tr->lock); in timbradio_probe()
108 strscpy(tr->video_dev.name, "Timberdale Radio", in timbradio_probe()
109 sizeof(tr->video_dev.name)); in timbradio_probe()
110 tr->video_dev.fops = &timbradio_fops; in timbradio_probe()
111 tr->video_dev.ioctl_ops = &timbradio_ioctl_ops; in timbradio_probe()
112 tr->video_dev.release = video_device_release_empty; in timbradio_probe()
113 tr->video_dev.minor = -1; in timbradio_probe()
114 tr->video_dev.lock = &tr->lock; in timbradio_probe()
115 tr->video_dev.device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; in timbradio_probe()
117 strscpy(tr->v4l2_dev.name, DRIVER_NAME, sizeof(tr->v4l2_dev.name)); in timbradio_probe()
118 err = v4l2_device_register(NULL, &tr->v4l2_dev); in timbradio_probe()
122 tr->video_dev.v4l2_dev = &tr->v4l2_dev; in timbradio_probe()
124 tr->sd_tuner = v4l2_i2c_new_subdev_board(&tr->v4l2_dev, in timbradio_probe()
126 tr->sd_dsp = v4l2_i2c_new_subdev_board(&tr->v4l2_dev, in timbradio_probe()
128 if (tr->sd_tuner == NULL || tr->sd_dsp == NULL) { in timbradio_probe()
133 tr->v4l2_dev.ctrl_handler = tr->sd_dsp->ctrl_handler; in timbradio_probe()
135 err = video_register_device(&tr->video_dev, VFL_TYPE_RADIO, -1); in timbradio_probe()
141 video_set_drvdata(&tr->video_dev, tr); in timbradio_probe()
143 platform_set_drvdata(pdev, tr); in timbradio_probe()
147 v4l2_device_unregister(&tr->v4l2_dev); in timbradio_probe()
156 struct timbradio *tr = platform_get_drvdata(pdev); in timbradio_remove() local
158 video_unregister_device(&tr->video_dev); in timbradio_remove()
159 v4l2_device_unregister(&tr->v4l2_dev); in timbradio_remove()