1 /* SPDX-License-Identifier: GPL-2.0+ */
5 * Header for common DAS08 support (used by ISA/PCI/PCMCIA drivers)
7 * Copyright (C) 2003 Frank Mori Hess <fmhess@users.sourceforge.net>
13 #include <linux/types.h>
17 /* different ways ai data is encoded in first two registers */
18 enum das08_ai_encoding { das08_encode12, das08_encode16, das08_pcm_encode12 };
19 /* types of ai range table used by different boards */
21 das08_pg_none, das08_bipolar5, das08_pgh, das08_pgl, das08_pgm
24 struct das08_board_struct {
26 bool is_jr; /* true for 'JR' boards */
27 unsigned int ai_nbits;
28 enum das08_lrange ai_pg;
29 enum das08_ai_encoding ai_encoding;
30 unsigned int ao_nbits;
31 unsigned int di_nchan;
32 unsigned int do_nchan;
33 unsigned int i8255_offset;
34 unsigned int i8254_offset;
35 unsigned int iosize; /* number of ioports used */
38 struct das08_private_struct {
39 /* bits for do/mux register on boards without separate do register */
40 unsigned int do_mux_bits;
41 const unsigned int *pg_gainlist;
44 int das08_common_attach(struct comedi_device *dev, unsigned long iobase);