linux/drivers/comedi/drivers/addi_apci_3501.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * addi_apci_3501.c
 * Copyright (C) 2004,2005  ADDI-DATA GmbH for the source code of this module.
 * Project manager: Eric Stolz
 *
 *	ADDI-DATA GmbH
 *	Dieselstrasse 3
 *	D-77833 Ottersweier
 *	Tel: +19(0)7223/9493-0
 *	Fax: +49(0)7223/9493-92
 *	http://www.addi-data.com
 *	[email protected]
 */

/*
 * Driver: addi_apci_3501
 * Description: ADDI-DATA APCI-3501 Analog output board
 * Devices: [ADDI-DATA] APCI-3501 (addi_apci_3501)
 * Author: H Hartley Sweeten <[email protected]>
 * Updated: Mon, 20 Jun 2016 10:57:01 -0700
 * Status: untested
 *
 * Configuration Options: not applicable, uses comedi PCI auto config
 *
 * This board has the following features:
 *   - 4 or 8 analog output channels
 *   - 2 optically isolated digital inputs
 *   - 2 optically isolated digital outputs
 *   - 1 12-bit watchdog/timer
 *
 * There are 2 versions of the APCI-3501:
 *   - APCI-3501-4  4 analog output channels
 *   - APCI-3501-8  8 analog output channels
 *
 * These boards use the same PCI Vendor/Device IDs. The number of output
 * channels used by this driver is determined by reading the EEPROM on
 * the board.
 *
 * The watchdog/timer subdevice is not currently supported.
 */

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

#include "amcc_s5933.h"

/*
 * PCI bar 1 register I/O map
 */
#define APCI3501_AO_CTRL_STATUS_REG
#define APCI3501_AO_CTRL_BIPOLAR
#define APCI3501_AO_STATUS_READY
#define APCI3501_AO_DATA_REG
#define APCI3501_AO_DATA_CHAN(x)
#define APCI3501_AO_DATA_VAL(x)
#define APCI3501_AO_DATA_BIPOLAR
#define APCI3501_AO_TRIG_SCS_REG
#define APCI3501_TIMER_BASE
#define APCI3501_DO_REG
#define APCI3501_DI_REG

/*
 * AMCC S5933 NVRAM
 */
#define NVRAM_USER_DATA_START

#define NVCMD_BEGIN_READ
#define NVCMD_LOAD_LOW
#define NVCMD_LOAD_HIGH

/*
 * Function types stored in the eeprom
 */
#define EEPROM_DIGITALINPUT
#define EEPROM_DIGITALOUTPUT
#define EEPROM_ANALOGINPUT
#define EEPROM_ANALOGOUTPUT
#define EEPROM_TIMER
#define EEPROM_WATCHDOG
#define EEPROM_TIMER_WATCHDOG_COUNTER

struct apci3501_private {};

static const struct comedi_lrange apci3501_ao_range =;

static int apci3501_wait_for_dac(struct comedi_device *dev)
{}

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

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

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

static void apci3501_eeprom_wait(unsigned long iobase)
{}

static unsigned short apci3501_eeprom_readw(unsigned long iobase,
					    unsigned short addr)
{}

static int apci3501_eeprom_get_ao_n_chan(struct comedi_device *dev)
{}

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

static int apci3501_reset(struct comedi_device *dev)
{}

static int apci3501_auto_attach(struct comedi_device *dev,
				unsigned long context_unused)
{}

static void apci3501_detach(struct comedi_device *dev)
{}

static struct comedi_driver apci3501_driver =;

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

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

static struct pci_driver apci3501_pci_driver =;
module_comedi_pci_driver();

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