linux/drivers/media/pci/tw68/tw68-core.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  tw68-core.c
 *  Core functions for the Techwell 68xx driver
 *
 *  Much of this code is derived from the cx88 and sa7134 drivers, which
 *  were in turn derived from the bt87x driver.  The original work was by
 *  Gerd Knorr; more recently the code was enhanced by Mauro Carvalho Chehab,
 *  Hans Verkuil, Andy Walls and many others.  Their work is gratefully
 *  acknowledged.  Full credit goes to them - any problems within this code
 *  are mine.
 *
 *  Copyright (C) 2009  William M. Brack
 *
 *  Refactored and updated to the latest v4l core frameworks:
 *
 *  Copyright (C) 2014 Hans Verkuil <[email protected]>
 */

#include <linux/init.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/kmod.h>
#include <linux/sound.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/dma-mapping.h>
#include <linux/pci_ids.h>
#include <linux/pm.h>

#include <media/v4l2-dev.h>
#include "tw68.h"
#include "tw68-reg.h"

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_LICENSE();

static unsigned int latency =;
module_param(latency, int, 0444);
MODULE_PARM_DESC();

static unsigned int video_nr[] =;
module_param_array();
MODULE_PARM_DESC();

static unsigned int card[] =;
module_param_array();
MODULE_PARM_DESC();

static atomic_t tw68_instance =;

/* ------------------------------------------------------------------ */

/*
 * Please add any new PCI IDs to: https://pci-ids.ucw.cz.  This keeps
 * the PCI ID database up to date.  Note that the entries must be
 * added under vendor 0x1797 (Techwell Inc.) as subsystem IDs.
 */
static const struct pci_device_id tw68_pci_tbl[] =;

/* ------------------------------------------------------------------ */


/*
 * The device is given a "soft reset". According to the specifications,
 * after this "all register content remain unchanged", so we also write
 * to all specified registers manually as well (mostly to manufacturer's
 * specified reset values)
 */
static int tw68_hw_init1(struct tw68_dev *dev)
{}

static irqreturn_t tw68_irq(int irq, void *dev_id)
{}

static int tw68_initdev(struct pci_dev *pci_dev,
				     const struct pci_device_id *pci_id)
{}

static void tw68_finidev(struct pci_dev *pci_dev)
{}

static int __maybe_unused tw68_suspend(struct device *dev_d)
{}

static int __maybe_unused tw68_resume(struct device *dev_d)
{}

/* ----------------------------------------------------------- */

static SIMPLE_DEV_PM_OPS(tw68_pm_ops, tw68_suspend, tw68_resume);

static struct pci_driver tw68_pci_driver =;

module_pci_driver();