Lines Matching +full:vendor +full:- +full:extension

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 hexium_orion.c - v4l2 driver for the Hexium Orion frame grabber cards
16 #include <media/drv-intf/saa7146_vv.h>
197 /* this is only called for old HV-PCI6/Orion cards
208 if (0 == dev->revision) { in hexium_probe()
209 return -EFAULT; in hexium_probe()
214 return -ENOMEM; in hexium_probe()
216 /* enable i2c-port pins */ in hexium_probe()
223 strscpy(hexium->i2c_adapter.name, "hexium orion", in hexium_probe()
224 sizeof(hexium->i2c_adapter.name)); in hexium_probe()
225 saa7146_i2c_adapter_prepare(dev, &hexium->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480); in hexium_probe()
226 if (i2c_add_adapter(&hexium->i2c_adapter) < 0) { in hexium_probe()
227 DEB_S("cannot register i2c-device. skipping.\n"); in hexium_probe()
229 return -EFAULT; in hexium_probe()
240 if (0x17c8 == dev->pci->subsystem_vendor && 0x0101 == dev->pci->subsystem_device) { in hexium_probe()
243 dev->ext_priv = hexium; in hexium_probe()
244 hexium->type = HEXIUM_ORION_1SVHS_3BNC; in hexium_probe()
248 if (0x17c8 == dev->pci->subsystem_vendor && 0x2101 == dev->pci->subsystem_device) { in hexium_probe()
251 dev->ext_priv = hexium; in hexium_probe()
252 hexium->type = HEXIUM_ORION_4BNC; in hexium_probe()
258 err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, in hexium_probe()
261 pr_info("device is a Hexium HV-PCI6/Orion (old)\n"); in hexium_probe()
263 dev->ext_priv = hexium; in hexium_probe()
264 hexium->type = HEXIUM_HV_PCI6_ORION; in hexium_probe()
268 i2c_del_adapter(&hexium->i2c_adapter); in hexium_probe()
270 return -EFAULT; in hexium_probe()
279 struct hexium *hexium = (struct hexium *) dev->ext_priv; in hexium_init_done()
288 …if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_WRITE, i, I2C_SMBUS_BYTE_DATA, &d… in hexium_init_done()
306 …if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_WRITE, adr, I2C_SMBUS_BYTE_DATA, … in hexium_set_input()
307 return -1; in hexium_set_input()
317 DEB_EE("VIDIOC_ENUMINPUT %d\n", i->index); in vidioc_enum_input()
319 if (i->index >= HEXIUM_INPUTS) in vidioc_enum_input()
320 return -EINVAL; in vidioc_enum_input()
322 memcpy(i, &hexium_inputs[i->index], sizeof(struct v4l2_input)); in vidioc_enum_input()
324 DEB_D("v4l2_ioctl: VIDIOC_ENUMINPUT %d\n", i->index); in vidioc_enum_input()
331 struct hexium *hexium = (struct hexium *) dev->ext_priv; in vidioc_g_input()
333 *input = hexium->cur_input; in vidioc_g_input()
342 struct hexium *hexium = (struct hexium *) dev->ext_priv; in vidioc_s_input()
345 return -EINVAL; in vidioc_s_input()
347 hexium->cur_input = input; in vidioc_s_input()
358 struct hexium *hexium = (struct hexium *) dev->ext_priv; in hexium_attach()
372 if (0 != saa7146_register_device(&hexium->video_dev, dev, "hexium orion", VFL_TYPE_VIDEO)) { in hexium_attach()
374 return -1; in hexium_attach()
377 pr_err("found 'hexium orion' frame grabber-%d\n", hexium_num); in hexium_attach()
381 hexium->cur_input = 0; in hexium_attach()
390 struct hexium *hexium = (struct hexium *) dev->ext_priv; in hexium_detach()
394 saa7146_unregister_device(&hexium->video_dev, dev); in hexium_detach()
397 hexium_num--; in hexium_detach()
399 i2c_del_adapter(&hexium->i2c_adapter); in hexium_detach()
409 static struct saa7146_extension extension; variable
412 .ext_priv = "Hexium HV-PCI6 / Orion",
413 .ext = &extension,
417 .ext_priv = "Hexium HV-PCI6 / Orion (1 SVHS/3 BNC)",
418 .ext = &extension,
422 .ext_priv = "Hexium HV-PCI6 / Orion (4 BNC)",
423 .ext = &extension,
428 .vendor = PCI_VENDOR_ID_PHILIPS,
435 .vendor = PCI_VENDOR_ID_PHILIPS,
442 .vendor = PCI_VENDOR_ID_PHILIPS,
449 .vendor = 0,
463 static struct saa7146_extension extension = { variable
464 .name = "hexium HV-PCI6 Orion",
480 if (0 != saa7146_register_extension(&extension)) { in hexium_init_module()
481 DEB_S("failed to register extension\n"); in hexium_init_module()
482 return -ENODEV; in hexium_init_module()
490 saa7146_unregister_extension(&extension); in hexium_cleanup_module()
496 MODULE_DESCRIPTION("video4linux-2 driver for Hexium Orion frame grabber cards");