36 #include <linux/module.h>
41 #include <linux/pci.h>
42 #include <linux/videodev2.h>
44 #include <linux/slab.h>
57 static int radio_nr = -1;
62 static const int clk = 1,
data = 2, wren = 4, mo_st = 8, power = 16;
66 #define PCI_VENDOR_ID_GUILLEMOT 0x5046
67 #define PCI_DEVICE_ID_GUILLEMOT_MAXIRADIO 0x1001
107 static void maxiradio_tea575x_set_direction(
struct snd_tea575x *tea,
bool output)
112 .set_pins = maxiradio_tea575x_set_pins,
113 .get_pins = maxiradio_tea575x_get_pins,
114 .set_direction = maxiradio_tea575x_set_direction,
134 v4l2_err(v4l2_dev,
"Could not register v4l2_device\n");
137 dev->
tea.private_data =
dev;
138 dev->
tea.ops = &maxiradio_tea_ops;
141 dev->
tea.cannot_read_data =
true;
142 dev->
tea.v4l2_dev = v4l2_dev;
143 dev->
tea.radio_nr = radio_nr;
144 strlcpy(dev->
tea.card,
"Maxi Radio FM2000",
sizeof(dev->
tea.card));
146 "PCI:%s", pci_name(pdev));
152 dev_err(&pdev->
dev,
"can't reserve I/O ports\n");
157 goto err_out_free_region;
161 printk(
KERN_ERR "radio-maxiradio: Unable to detect TEA575x tuner\n");
162 goto err_out_free_region;
178 struct maxiradio *dev = to_maxiradio(v4l2_dev);
196 .name =
"radio-maxiradio",
197 .id_table = maxiradio_pci_tbl,
198 .probe = maxiradio_probe,
202 static int __init maxiradio_init(
void)
204 return pci_register_driver(&maxiradio_driver);
207 static void __exit maxiradio_exit(
void)