#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kmod.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-vmalloc.h>
#include "netup_unidvb.h"
#include "cxd2841er.h"
#include "horus3a.h"
#include "ascot2e.h"
#include "helene.h"
#include "lnbh25.h"
static int spi_enable;
module_param(spi_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_VERSION(…);
MODULE_LICENSE(…) …;
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
#define AVL_PCIE_IENR …
#define AVL_PCIE_ISR …
#define AVL_IRQ_ENABLE …
#define AVL_IRQ_ASSERTED …
#define GPIO_REG_IO …
#define GPIO_REG_IO_TOGGLE …
#define GPIO_REG_IO_SET …
#define GPIO_REG_IO_CLEAR …
#define GPIO_FEA_RESET …
#define GPIO_FEB_RESET …
#define GPIO_RFA_CTL …
#define GPIO_RFB_CTL …
#define GPIO_FEA_TU_RESET …
#define GPIO_FEB_TU_RESET …
#define NETUP_DMA0_ADDR …
#define NETUP_DMA1_ADDR …
#define NETUP_DMA_BLOCKS_COUNT …
#define NETUP_DMA_PACKETS_COUNT …
#define BIT_DMA_RUN …
#define BIT_DMA_ERROR …
#define BIT_DMA_IRQ …
struct netup_dma_regs { … } __packed __aligned(…);
struct netup_unidvb_buffer { … };
static int netup_unidvb_tuner_ctrl(void *priv, int is_dvb_tc);
static void netup_unidvb_queue_cleanup(struct netup_dma *dma);
static struct cxd2841er_config demod_config = …;
static struct horus3a_config horus3a_conf = …;
static struct ascot2e_config ascot2e_conf = …;
static struct helene_config helene_conf = …;
static struct lnbh25_config lnbh25_conf = …;
static int netup_unidvb_tuner_ctrl(void *priv, int is_dvb_tc)
{ … }
static void netup_unidvb_dev_enable(struct netup_unidvb_dev *ndev)
{ … }
static void netup_unidvb_dma_enable(struct netup_dma *dma, int enable)
{ … }
static irqreturn_t netup_dma_interrupt(struct netup_dma *dma)
{ … }
static irqreturn_t netup_unidvb_isr(int irq, void *dev_id)
{ … }
static int netup_unidvb_queue_setup(struct vb2_queue *vq,
unsigned int *nbuffers,
unsigned int *nplanes,
unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static int netup_unidvb_buf_prepare(struct vb2_buffer *vb)
{ … }
static void netup_unidvb_buf_queue(struct vb2_buffer *vb)
{ … }
static int netup_unidvb_start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static void netup_unidvb_stop_streaming(struct vb2_queue *q)
{ … }
static const struct vb2_ops dvb_qops = …;
static int netup_unidvb_queue_init(struct netup_dma *dma,
struct vb2_queue *vb_queue)
{ … }
static int netup_unidvb_dvb_init(struct netup_unidvb_dev *ndev,
int num)
{ … }
static void netup_unidvb_dvb_fini(struct netup_unidvb_dev *ndev, int num)
{ … }
static int netup_unidvb_dvb_setup(struct netup_unidvb_dev *ndev)
{ … }
static int netup_unidvb_ring_copy(struct netup_dma *dma,
struct netup_unidvb_buffer *buf)
{ … }
static void netup_unidvb_dma_worker(struct work_struct *work)
{ … }
static void netup_unidvb_queue_cleanup(struct netup_dma *dma)
{ … }
static void netup_unidvb_dma_timeout(struct timer_list *t)
{ … }
static int netup_unidvb_dma_init(struct netup_unidvb_dev *ndev, int num)
{ … }
static void netup_unidvb_dma_fini(struct netup_unidvb_dev *ndev, int num)
{ … }
static int netup_unidvb_dma_setup(struct netup_unidvb_dev *ndev)
{ … }
static int netup_unidvb_ci_setup(struct netup_unidvb_dev *ndev,
struct pci_dev *pci_dev)
{ … }
static int netup_unidvb_request_mmio(struct pci_dev *pci_dev)
{ … }
static int netup_unidvb_request_modules(struct device *dev)
{ … }
static int netup_unidvb_initdev(struct pci_dev *pci_dev,
const struct pci_device_id *pci_id)
{ … }
static void netup_unidvb_finidev(struct pci_dev *pci_dev)
{ … }
static const struct pci_device_id netup_unidvb_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, netup_unidvb_pci_tbl);
static struct pci_driver netup_unidvb_pci_driver = …;
module_pci_driver(…) …;