Lines Matching +full:card +full:- +full:detect +full:- +full:delay
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Guillemot Maxi Radio FM 2000 PCI radio card driver for Linux
12 * The card uses the TEA5757 chip that includes a search function but it
22 * - better pci interface thanks to Francois Romieu <romieu@cogenit.fr>
25 * - tiding up
26 * - removed support for multiple devices as it didn't work anyway
29 * - card unmutes if you change frequency
32 * - Conversion to V4L2 API
33 * - Uses video_ioctl2 for parsing and to add debug support
40 #include <linux/delay.h>
46 #include <media/drv-intf/tea575x.h>
47 #include <media/v4l2-device.h>
48 #include <media/v4l2-ioctl.h>
49 #include <media/v4l2-fh.h>
50 #include <media/v4l2-ctrls.h>
51 #include <media/v4l2-event.h>
58 static int radio_nr = -1;
86 struct maxiradio *dev = tea->private_data; in maxiradio_tea575x_set_pins()
94 outb(bits, dev->io); in maxiradio_tea575x_set_pins()
97 /* Note: this card cannot read out the data of the shift registers,
101 struct maxiradio *dev = tea->private_data; in maxiradio_tea575x_get_pins()
102 u8 bits = inb(dev->io); in maxiradio_tea575x_get_pins()
123 int retval = -ENOMEM; in maxiradio_probe()
127 dev_err(&pdev->dev, "not enough memory\n"); in maxiradio_probe()
128 return -ENOMEM; in maxiradio_probe()
131 v4l2_dev = &dev->v4l2_dev; in maxiradio_probe()
134 retval = v4l2_device_register(&pdev->dev, v4l2_dev); in maxiradio_probe()
139 dev->tea.private_data = dev; in maxiradio_probe()
140 dev->tea.ops = &maxiradio_tea_ops; in maxiradio_probe()
143 dev->tea.cannot_read_data = true; in maxiradio_probe()
144 dev->tea.v4l2_dev = v4l2_dev; in maxiradio_probe()
145 dev->tea.radio_nr = radio_nr; in maxiradio_probe()
146 strscpy(dev->tea.card, "Maxi Radio FM2000", sizeof(dev->tea.card)); in maxiradio_probe()
148 retval = -ENODEV; in maxiradio_probe()
151 pci_resource_len(pdev, 0), v4l2_dev->name)) { in maxiradio_probe()
152 dev_err(&pdev->dev, "can't reserve I/O ports\n"); in maxiradio_probe()
159 dev->io = pci_resource_start(pdev, 0); in maxiradio_probe()
160 if (snd_tea575x_init(&dev->tea, THIS_MODULE)) { in maxiradio_probe()
161 printk(KERN_ERR "radio-maxiradio: Unable to detect TEA575x tuner\n"); in maxiradio_probe()
180 snd_tea575x_exit(&dev->tea); in maxiradio_remove()
182 outb(0, dev->io); in maxiradio_remove()
197 .name = "radio-maxiradio",