linux/drivers/media/pci/ddbridge/ddbridge.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * ddbridge.h: Digital Devices PCIe bridge driver
 *
 * Copyright (C) 2010-2017 Digital Devices GmbH
 *                         Ralph Metzler <[email protected]>
 */

#ifndef _DDBRIDGE_H_
#define _DDBRIDGE_H_

#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/dvb/ca.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/poll.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/socket.h>
#include <linux/spi/spi.h>
#include <linux/swab.h>
#include <linux/timer.h>
#include <linux/types.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
#include <linux/workqueue.h>

#include <asm/dma.h>
#include <asm/irq.h>

#include <media/dmxdev.h>
#include <media/dvb_ca_en50221.h>
#include <media/dvb_demux.h>
#include <media/dvbdev.h>
#include <media/dvb_frontend.h>
#include <media/dvb_net.h>
#include <media/dvb_ringbuffer.h>

#define DDBRIDGE_VERSION

#define DDB_MAX_I2C
#define DDB_MAX_PORT
#define DDB_MAX_INPUT
#define DDB_MAX_OUTPUT
#define DDB_MAX_LINK
#define DDB_LINK_SHIFT

#define DDB_LINK_TAG(_x)

struct ddb_regset {};

struct ddb_regmap {};

struct ddb_ids {};

struct ddb_info {};

#define DMA_MAX_BUFS

struct ddb;
struct ddb_port;

struct ddb_dma {};

struct ddb_dvb {};

struct ddb_ci {};

struct ddb_io {};

#define ddb_output
#define ddb_input

struct ddb_i2c {};

struct ddb_port {};

#define CM_STARTUP_DELAY
#define CM_AVERAGE
#define CM_GAIN

#define HW_LSB_SHIFT
#define HW_LSB_MASK

#define CM_IDLE
#define CM_STARTUP
#define CM_ADJUST

#define TS_CAPTURE_LEN

struct ddb_lnb {};

struct ddb_irq {};

struct ddb_link {};

struct ddb {};

/****************************************************************************/
/****************************************************************************/
/****************************************************************************/

int ddbridge_flashread(struct ddb *dev, u32 link, u8 *buf, u32 addr, u32 len);

/****************************************************************************/

/* ddbridge-core.c */
struct ddb_irq *ddb_irq_set(struct ddb *dev, u32 link, u32 nr,
			    void (*handler)(void *), void *data);
void ddb_ports_detach(struct ddb *dev);
void ddb_ports_release(struct ddb *dev);
void ddb_buffers_free(struct ddb *dev);
void ddb_device_destroy(struct ddb *dev);
irqreturn_t ddb_irq_handler0(int irq, void *dev_id);
irqreturn_t ddb_irq_handler1(int irq, void *dev_id);
irqreturn_t ddb_irq_handler(int irq, void *dev_id);
void ddb_ports_init(struct ddb *dev);
int ddb_buffers_alloc(struct ddb *dev);
int ddb_ports_attach(struct ddb *dev);
int ddb_device_create(struct ddb *dev);
int ddb_init(struct ddb *dev);
void ddb_unmap(struct ddb *dev);
int ddb_exit_ddbridge(int stage, int error);
int ddb_init_ddbridge(void);

#endif /* _DDBRIDGE_H_ */