linux/drivers/comedi/drivers/adl_pci7x3x.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * COMEDI driver for the ADLINK PCI-723x/743x series boards.
 * Copyright (C) 2012 H Hartley Sweeten <[email protected]>
 *
 * Based on the adl_pci7230 driver written by:
 *	David Fernandez <[email protected]>
 * and the adl_pci7432 driver written by:
 *	Michel Lachaine <[email protected]>
 *
 * COMEDI - Linux Control and Measurement Device Interface
 * Copyright (C) 2000 David A. Schleef <[email protected]>
 */

/*
 * Driver: adl_pci7x3x
 * Description: 32/64-Channel Isolated Digital I/O Boards
 * Devices: [ADLink] PCI-7230 (adl_pci7230), PCI-7233 (adl_pci7233),
 *   PCI-7234 (adl_pci7234), PCI-7432 (adl_pci7432), PCI-7433 (adl_pci7433),
 *   PCI-7434 (adl_pci7434)
 * Author: H Hartley Sweeten <[email protected]>
 * Updated: Fri, 20 Nov 2020 14:49:36 +0000
 * Status: works (tested on PCI-7230)
 *
 * One or two subdevices are setup by this driver depending on
 * the number of digital inputs and/or outputs provided by the
 * board. Each subdevice has a maximum of 32 channels.
 *
 *	PCI-7230 - 4 subdevices: 0 - 16 input, 1 - 16 output,
 *	                         2 - IRQ_IDI0, 3 - IRQ_IDI1
 *	PCI-7233 - 1 subdevice: 0 - 32 input
 *	PCI-7234 - 1 subdevice: 0 - 32 output
 *	PCI-7432 - 2 subdevices: 0 - 32 input, 1 - 32 output
 *	PCI-7433 - 2 subdevices: 0 - 32 input, 1 - 32 input
 *	PCI-7434 - 2 subdevices: 0 - 32 output, 1 - 32 output
 *
 * The PCI-7230, PCI-7432 and PCI-7433 boards also support external
 * interrupt signals on digital input channels 0 and 1. The PCI-7233
 * has dual-interrupt sources for change-of-state (COS) on any 16
 * digital input channels of LSB and for COS on any 16 digital input
 * lines of MSB.
 *
 * Currently, this driver only supports interrupts for PCI-7230.
 *
 * Configuration Options: not applicable, uses comedi PCI auto config
 */

#include <linux/module.h>
#include <linux/comedi/comedi_pci.h>

#include "plx9052.h"

/*
 * Register I/O map (32-bit access only)
 */
#define PCI7X3X_DIO_REG
#define PCI743X_DIO_REG

#define ADL_PT_CLRIRQ

#define LINTI1_EN_ACT_IDI0
#define LINTI2_EN_ACT_IDI1
#define EN_PCI_LINT2H_LINT1H

enum adl_pci7x3x_boardid {};

struct adl_pci7x3x_boardinfo {};

static const struct adl_pci7x3x_boardinfo adl_pci7x3x_boards[] =;

struct adl_pci7x3x_dev_private_data {};

struct adl_pci7x3x_sd_private_data {};

static void process_irq(struct comedi_device *dev, unsigned int subdev,
			unsigned short intcsr)
{}

static irqreturn_t adl_pci7x3x_interrupt(int irq, void *p_device)
{}

static int adl_pci7x3x_asy_cmdtest(struct comedi_device *dev,
				   struct comedi_subdevice *s,
				   struct comedi_cmd *cmd)
{}

static int adl_pci7x3x_asy_cmd(struct comedi_device *dev,
			       struct comedi_subdevice *s)
{}

static int adl_pci7x3x_asy_cancel(struct comedi_device *dev,
				  struct comedi_subdevice *s)
{}

/* same as _di_insn_bits because the IRQ-pins are the DI-ports  */
static int adl_pci7x3x_dirq_insn_bits(struct comedi_device *dev,
				      struct comedi_subdevice *s,
				      struct comedi_insn *insn,
				      unsigned int *data)
{}

static int adl_pci7x3x_do_insn_bits(struct comedi_device *dev,
				    struct comedi_subdevice *s,
				    struct comedi_insn *insn,
				    unsigned int *data)
{}

static int adl_pci7x3x_di_insn_bits(struct comedi_device *dev,
				    struct comedi_subdevice *s,
				    struct comedi_insn *insn,
				    unsigned int *data)
{}

static int adl_pci7x3x_reset(struct comedi_device *dev)
{}

static int adl_pci7x3x_auto_attach(struct comedi_device *dev,
				   unsigned long context)
{}

static void adl_pci7x3x_detach(struct comedi_device *dev)
{}

static struct comedi_driver adl_pci7x3x_driver =;

static int adl_pci7x3x_pci_probe(struct pci_dev *dev,
				 const struct pci_device_id *id)
{}

static const struct pci_device_id adl_pci7x3x_pci_table[] =;
MODULE_DEVICE_TABLE(pci, adl_pci7x3x_pci_table);

static struct pci_driver adl_pci7x3x_pci_driver =;
module_comedi_pci_driver();

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