drivers/media/usb/pvrusb2/pvrusb2-devattr.c

Source file repositories/reference/linux-study-clean/drivers/media/usb/pvrusb2/pvrusb2-devattr.c

File Facts

System
Linux kernel
Corpus path
drivers/media/usb/pvrusb2/pvrusb2-devattr.c
Extension
.c
Size
21575 bytes
Lines
719
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0-only
/*
 *
 *  Copyright (C) 2007 Mike Isely <isely@pobox.com>
 */

/*

This source file should encompass ALL per-device type information for the
driver.  To define a new device, add elements to the pvr2_device_table and
pvr2_device_desc structures.

*/

#include "pvrusb2-devattr.h"
#include <linux/usb.h>
#include <linux/module.h>
/* This is needed in order to pull in tuner type ids... */
#include <linux/i2c.h>
#include <media/tuner.h>
#ifdef CONFIG_VIDEO_PVRUSB2_DVB
#include "pvrusb2-hdw-internal.h"
#include "lgdt330x.h"
#include "s5h1409.h"
#include "s5h1411.h"
#include "tda10048.h"
#include "tda18271.h"
#include "tda8290.h"
#include "tuner-simple.h"
#include "si2157.h"
#include "lgdt3306a.h"
#include "si2168.h"
#endif


/*------------------------------------------------------------------------*/
/* Hauppauge PVR-USB2 Model 29xxx */

static const struct pvr2_device_client_desc pvr2_cli_29xxx[] = {
	{ .module_id = PVR2_CLIENT_ID_SAA7115 },
	{ .module_id = PVR2_CLIENT_ID_MSP3400 },
	{ .module_id = PVR2_CLIENT_ID_TUNER },
	{ .module_id = PVR2_CLIENT_ID_DEMOD },
};

#define PVR2_FIRMWARE_29xxx "v4l-pvrusb2-29xxx-01.fw"
static const char *pvr2_fw1_names_29xxx[] = {
		PVR2_FIRMWARE_29xxx,
};

static const struct pvr2_device_desc pvr2_device_29xxx = {
		.description = "WinTV PVR USB2 Model 29xxx",
		.shortname = "29xxx",
		.client_table.lst = pvr2_cli_29xxx,
		.client_table.cnt = ARRAY_SIZE(pvr2_cli_29xxx),
		.fx2_firmware.lst = pvr2_fw1_names_29xxx,
		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
		.flag_has_hauppauge_rom = !0,
		.flag_has_analogtuner = !0,
		.flag_has_fmradio = !0,
		.flag_has_composite = !0,
		.flag_has_svideo = !0,
		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
		.led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
		.ir_scheme = PVR2_IR_SCHEME_29XXX,
};



/*------------------------------------------------------------------------*/
/* Hauppauge PVR-USB2 Model 24xxx */

static const struct pvr2_device_client_desc pvr2_cli_24xxx[] = {
	{ .module_id = PVR2_CLIENT_ID_CX25840 },
	{ .module_id = PVR2_CLIENT_ID_TUNER },
	{ .module_id = PVR2_CLIENT_ID_WM8775 },
	{ .module_id = PVR2_CLIENT_ID_DEMOD },
};

#define PVR2_FIRMWARE_24xxx "v4l-pvrusb2-24xxx-01.fw"
static const char *pvr2_fw1_names_24xxx[] = {
		PVR2_FIRMWARE_24xxx,
};

static const struct pvr2_device_desc pvr2_device_24xxx = {
		.description = "WinTV PVR USB2 Model 24xxx",
		.shortname = "24xxx",
		.client_table.lst = pvr2_cli_24xxx,
		.client_table.cnt = ARRAY_SIZE(pvr2_cli_24xxx),
		.fx2_firmware.lst = pvr2_fw1_names_24xxx,

Annotation

Implementation Notes