linux/drivers/staging/comedi/drivers/ni_65xx.c
<<
>>
Prefs
   1/*
   2 * ni_65xx.c
   3 * Comedi driver for National Instruments PCI-65xx static dio boards
   4 *
   5 * Copyright (C) 2006 Jon Grierson <jd@renko.co.uk>
   6 * Copyright (C) 2006 Frank Mori Hess <fmhess@users.sourceforge.net>
   7 *
   8 * COMEDI - Linux Control and Measurement Device Interface
   9 * Copyright (C) 1999,2002,2003 David A. Schleef <ds@schleef.org>
  10 *
  11 * This program is free software; you can redistribute it and/or modify
  12 * it under the terms of the GNU General Public License as published by
  13 * the Free Software Foundation; either version 2 of the License, or
  14 * (at your option) any later version.
  15 *
  16 * This program is distributed in the hope that it will be useful,
  17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19 * GNU General Public License for more details.
  20 */
  21
  22/*
  23 * Driver: ni_65xx
  24 * Description: National Instruments 65xx static dio boards
  25 * Author: Jon Grierson <jd@renko.co.uk>,
  26 *         Frank Mori Hess <fmhess@users.sourceforge.net>
  27 * Status: testing
  28 * Devices: [National Instruments] PCI-6509 (pci-6509), PXI-6509 (pxi-6509),
  29 *   PCI-6510 (pci-6510), PCI-6511 (pci-6511), PXI-6511 (pxi-6511),
  30 *   PCI-6512 (pci-6512), PXI-6512 (pxi-6512), PCI-6513 (pci-6513),
  31 *   PXI-6513 (pxi-6513), PCI-6514 (pci-6514), PXI-6514 (pxi-6514),
  32 *   PCI-6515 (pxi-6515), PXI-6515 (pxi-6515), PCI-6516 (pci-6516),
  33 *   PCI-6517 (pci-6517), PCI-6518 (pci-6518), PCI-6519 (pci-6519),
  34 *   PCI-6520 (pci-6520), PCI-6521 (pci-6521), PXI-6521 (pxi-6521),
  35 *   PCI-6528 (pci-6528), PXI-6528 (pxi-6528)
  36 * Updated: Mon, 21 Jul 2014 12:49:58 +0000
  37 *
  38 * Configuration Options: not applicable, uses PCI auto config
  39 *
  40 * Based on the PCI-6527 driver by ds.
  41 * The interrupt subdevice (subdevice 3) is probably broken for all
  42 * boards except maybe the 6514.
  43 *
  44 * This driver previously inverted the outputs on PCI-6513 through to
  45 * PCI-6519 and on PXI-6513 through to PXI-6515.  It no longer inverts
  46 * outputs on those cards by default as it didn't make much sense.  If
  47 * you require the outputs to be inverted on those cards for legacy
  48 * reasons, set the module parameter "legacy_invert_outputs=true" when
  49 * loading the module, or set "ni_65xx.legacy_invert_outputs=true" on
  50 * the kernel command line if the driver is built in to the kernel.
  51 */
  52
  53/*
  54 * Manuals (available from ftp://ftp.natinst.com/support/manuals)
  55 *
  56 *      370106b.pdf     6514 Register Level Programmer Manual
  57 */
  58
  59#include <linux/module.h>
  60#include <linux/interrupt.h>
  61
  62#include "../comedi_pci.h"
  63
  64/*
  65 * PCI BAR1 Register Map
  66 */
  67
  68/* Non-recurring Registers (8-bit except where noted) */
  69#define NI_65XX_ID_REG                  0x00
  70#define NI_65XX_CLR_REG                 0x01
  71#define NI_65XX_CLR_WDOG_INT            BIT(6)
  72#define NI_65XX_CLR_WDOG_PING           BIT(5)
  73#define NI_65XX_CLR_WDOG_EXP            BIT(4)
  74#define NI_65XX_CLR_EDGE_INT            BIT(3)
  75#define NI_65XX_CLR_OVERFLOW_INT        BIT(2)
  76#define NI_65XX_STATUS_REG              0x02
  77#define NI_65XX_STATUS_WDOG_INT         BIT(5)
  78#define NI_65XX_STATUS_FALL_EDGE        BIT(4)
  79#define NI_65XX_STATUS_RISE_EDGE        BIT(3)
  80#define NI_65XX_STATUS_INT              BIT(2)
  81#define NI_65XX_STATUS_OVERFLOW_INT     BIT(1)
  82#define NI_65XX_STATUS_EDGE_INT         BIT(0)
  83#define NI_65XX_CTRL_REG                0x03
  84#define NI_65XX_CTRL_WDOG_ENA           BIT(5)
  85#define NI_65XX_CTRL_FALL_EDGE_ENA      BIT(4)
  86#define NI_65XX_CTRL_RISE_EDGE_ENA      BIT(3)
  87#define NI_65XX_CTRL_INT_ENA            BIT(2)
  88#define NI_65XX_CTRL_OVERFLOW_ENA       BIT(1)
  89#define NI_65XX_CTRL_EDGE_ENA           BIT(0)
  90#define NI_65XX_REV_REG                 0x04 /* 32-bit */
  91#define NI_65XX_FILTER_REG              0x08 /* 32-bit */
  92#define NI_65XX_RTSI_ROUTE_REG          0x0c /* 16-bit */
  93#define NI_65XX_RTSI_EDGE_REG           0x0e /* 16-bit */
  94#define NI_65XX_RTSI_WDOG_REG           0x10 /* 16-bit */
  95#define NI_65XX_RTSI_TRIG_REG           0x12 /* 16-bit */
  96#define NI_65XX_AUTO_CLK_SEL_REG        0x14 /* PXI-6528 only */
  97#define NI_65XX_AUTO_CLK_SEL_STATUS     BIT(1)
  98#define NI_65XX_AUTO_CLK_SEL_DISABLE    BIT(0)
  99#define NI_65XX_WDOG_CTRL_REG           0x15
 100#define NI_65XX_WDOG_CTRL_ENA           BIT(0)
 101#define NI_65XX_RTSI_CFG_REG            0x16
 102#define NI_65XX_RTSI_CFG_RISE_SENSE     BIT(2)
 103#define NI_65XX_RTSI_CFG_FALL_SENSE     BIT(1)
 104#define NI_65XX_RTSI_CFG_SYNC_DETECT    BIT(0)
 105#define NI_65XX_WDOG_STATUS_REG         0x17
 106#define NI_65XX_WDOG_STATUS_EXP         BIT(0)
 107#define NI_65XX_WDOG_INTERVAL_REG       0x18 /* 32-bit */
 108
 109/* Recurring port registers (8-bit) */
 110#define NI_65XX_PORT(x)                 ((x) * 0x10)
 111#define NI_65XX_IO_DATA_REG(x)          (0x40 + NI_65XX_PORT(x))
 112#define NI_65XX_IO_SEL_REG(x)           (0x41 + NI_65XX_PORT(x))
 113#define NI_65XX_IO_SEL_OUTPUT           0
 114#define NI_65XX_IO_SEL_INPUT            BIT(0)
 115#define NI_65XX_RISE_EDGE_ENA_REG(x)    (0x42 + NI_65XX_PORT(x))
 116#define NI_65XX_FALL_EDGE_ENA_REG(x)    (0x43 + NI_65XX_PORT(x))
 117#define NI_65XX_FILTER_ENA(x)           (0x44 + NI_65XX_PORT(x))
 118#define NI_65XX_WDOG_HIZ_REG(x)         (0x46 + NI_65XX_PORT(x))
 119#define NI_65XX_WDOG_ENA(x)             (0x47 + NI_65XX_PORT(x))
 120#define NI_65XX_WDOG_HI_LO_REG(x)       (0x48 + NI_65XX_PORT(x))
 121#define NI_65XX_RTSI_ENA(x)             (0x49 + NI_65XX_PORT(x))
 122
 123#define NI_65XX_PORT_TO_CHAN(x)         ((x) * 8)
 124#define NI_65XX_CHAN_TO_PORT(x)         ((x) / 8)
 125#define NI_65XX_CHAN_TO_MASK(x)         (1 << ((x) % 8))
 126
 127enum ni_65xx_boardid {
 128        BOARD_PCI6509,
 129        BOARD_PXI6509,
 130        BOARD_PCI6510,
 131        BOARD_PCI6511,
 132        BOARD_PXI6511,
 133        BOARD_PCI6512,
 134        BOARD_PXI6512,
 135        BOARD_PCI6513,
 136        BOARD_PXI6513,
 137        BOARD_PCI6514,
 138        BOARD_PXI6514,
 139        BOARD_PCI6515,
 140        BOARD_PXI6515,
 141        BOARD_PCI6516,
 142        BOARD_PCI6517,
 143        BOARD_PCI6518,
 144        BOARD_PCI6519,
 145        BOARD_PCI6520,
 146        BOARD_PCI6521,
 147        BOARD_PXI6521,
 148        BOARD_PCI6528,
 149        BOARD_PXI6528,
 150};
 151
 152struct ni_65xx_board {
 153        const char *name;
 154        unsigned int num_dio_ports;
 155        unsigned int num_di_ports;
 156        unsigned int num_do_ports;
 157        unsigned int legacy_invert:1;
 158};
 159
 160static const struct ni_65xx_board ni_65xx_boards[] = {
 161        [BOARD_PCI6509] = {
 162                .name           = "pci-6509",
 163                .num_dio_ports  = 12,
 164        },
 165        [BOARD_PXI6509] = {
 166                .name           = "pxi-6509",
 167                .num_dio_ports  = 12,
 168        },
 169        [BOARD_PCI6510] = {
 170                .name           = "pci-6510",
 171                .num_di_ports   = 4,
 172        },
 173        [BOARD_PCI6511] = {
 174                .name           = "pci-6511",
 175                .num_di_ports   = 8,
 176        },
 177        [BOARD_PXI6511] = {
 178                .name           = "pxi-6511",
 179                .num_di_ports   = 8,
 180        },
 181        [BOARD_PCI6512] = {
 182                .name           = "pci-6512",
 183                .num_do_ports   = 8,
 184        },
 185        [BOARD_PXI6512] = {
 186                .name           = "pxi-6512",
 187                .num_do_ports   = 8,
 188        },
 189        [BOARD_PCI6513] = {
 190                .name           = "pci-6513",
 191                .num_do_ports   = 8,
 192                .legacy_invert  = 1,
 193        },
 194        [BOARD_PXI6513] = {
 195                .name           = "pxi-6513",
 196                .num_do_ports   = 8,
 197                .legacy_invert  = 1,
 198        },
 199        [BOARD_PCI6514] = {
 200                .name           = "pci-6514",
 201                .num_di_ports   = 4,
 202                .num_do_ports   = 4,
 203                .legacy_invert  = 1,
 204        },
 205        [BOARD_PXI6514] = {
 206                .name           = "pxi-6514",
 207                .num_di_ports   = 4,
 208                .num_do_ports   = 4,
 209                .legacy_invert  = 1,
 210        },
 211        [BOARD_PCI6515] = {
 212                .name           = "pci-6515",
 213                .num_di_ports   = 4,
 214                .num_do_ports   = 4,
 215                .legacy_invert  = 1,
 216        },
 217        [BOARD_PXI6515] = {
 218                .name           = "pxi-6515",
 219                .num_di_ports   = 4,
 220                .num_do_ports   = 4,
 221                .legacy_invert  = 1,
 222        },
 223        [BOARD_PCI6516] = {
 224                .name           = "pci-6516",
 225                .num_do_ports   = 4,
 226                .legacy_invert  = 1,
 227        },
 228        [BOARD_PCI6517] = {
 229                .name           = "pci-6517",
 230                .num_do_ports   = 4,
 231                .legacy_invert  = 1,
 232        },
 233        [BOARD_PCI6518] = {
 234                .name           = "pci-6518",
 235                .num_di_ports   = 2,
 236                .num_do_ports   = 2,
 237                .legacy_invert  = 1,
 238        },
 239        [BOARD_PCI6519] = {
 240                .name           = "pci-6519",
 241                .num_di_ports   = 2,
 242                .num_do_ports   = 2,
 243                .legacy_invert  = 1,
 244        },
 245        [BOARD_PCI6520] = {
 246                .name           = "pci-6520",
 247                .num_di_ports   = 1,
 248                .num_do_ports   = 1,
 249        },
 250        [BOARD_PCI6521] = {
 251                .name           = "pci-6521",
 252                .num_di_ports   = 1,
 253                .num_do_ports   = 1,
 254        },
 255        [BOARD_PXI6521] = {
 256                .name           = "pxi-6521",
 257                .num_di_ports   = 1,
 258                .num_do_ports   = 1,
 259        },
 260        [BOARD_PCI6528] = {
 261                .name           = "pci-6528",
 262                .num_di_ports   = 3,
 263                .num_do_ports   = 3,
 264        },
 265        [BOARD_PXI6528] = {
 266                .name           = "pxi-6528",
 267                .num_di_ports   = 3,
 268                .num_do_ports   = 3,
 269        },
 270};
 271
 272static bool ni_65xx_legacy_invert_outputs;
 273module_param_named(legacy_invert_outputs, ni_65xx_legacy_invert_outputs,
 274                   bool, 0444);
 275MODULE_PARM_DESC(legacy_invert_outputs,
 276                 "invert outputs of PCI/PXI-6513/6514/6515/6516/6517/6518/6519 for compatibility with old user code");
 277
 278static unsigned int ni_65xx_num_ports(struct comedi_device *dev)
 279{
 280        const struct ni_65xx_board *board = dev->board_ptr;
 281
 282        return board->num_dio_ports + board->num_di_ports + board->num_do_ports;
 283}
 284
 285static void ni_65xx_disable_input_filters(struct comedi_device *dev)
 286{
 287        unsigned int num_ports = ni_65xx_num_ports(dev);
 288        int i;
 289
 290        /* disable input filtering on all ports */
 291        for (i = 0; i < num_ports; ++i)
 292                writeb(0x00, dev->mmio + NI_65XX_FILTER_ENA(i));
 293
 294        /* set filter interval to 0 (32bit reg) */
 295        writel(0x00000000, dev->mmio + NI_65XX_FILTER_REG);
 296}
 297
 298/* updates edge detection for base_chan to base_chan+31 */
 299static void ni_65xx_update_edge_detection(struct comedi_device *dev,
 300                                          unsigned int base_chan,
 301                                          unsigned int rising,
 302                                          unsigned int falling)
 303{
 304        unsigned int num_ports = ni_65xx_num_ports(dev);
 305        unsigned int port;
 306
 307        if (base_chan >= NI_65XX_PORT_TO_CHAN(num_ports))
 308                return;
 309
 310        for (port = NI_65XX_CHAN_TO_PORT(base_chan); port < num_ports; port++) {
 311                int bitshift = (int)(NI_65XX_PORT_TO_CHAN(port) - base_chan);
 312                unsigned int port_mask, port_rising, port_falling;
 313
 314                if (bitshift >= 32)
 315                        break;
 316
 317                if (bitshift >= 0) {
 318                        port_mask = ~0U >> bitshift;
 319                        port_rising = rising >> bitshift;
 320                        port_falling = falling >> bitshift;
 321                } else {
 322                        port_mask = ~0U << -bitshift;
 323                        port_rising = rising << -bitshift;
 324                        port_falling = falling << -bitshift;
 325                }
 326                if (port_mask & 0xff) {
 327                        if (~port_mask & 0xff) {
 328                                port_rising |=
 329                                    readb(dev->mmio +
 330                                          NI_65XX_RISE_EDGE_ENA_REG(port)) &
 331                                    ~port_mask;
 332                                port_falling |=
 333                                    readb(dev->mmio +
 334                                          NI_65XX_FALL_EDGE_ENA_REG(port)) &
 335                                    ~port_mask;
 336                        }
 337                        writeb(port_rising & 0xff,
 338                               dev->mmio + NI_65XX_RISE_EDGE_ENA_REG(port));
 339                        writeb(port_falling & 0xff,
 340                               dev->mmio + NI_65XX_FALL_EDGE_ENA_REG(port));
 341                }
 342        }
 343}
 344
 345static void ni_65xx_disable_edge_detection(struct comedi_device *dev)
 346{
 347        /* clear edge detection for channels 0 to 31 */
 348        ni_65xx_update_edge_detection(dev, 0, 0, 0);
 349        /* clear edge detection for channels 32 to 63 */
 350        ni_65xx_update_edge_detection(dev, 32, 0, 0);
 351        /* clear edge detection for channels 64 to 95 */
 352        ni_65xx_update_edge_detection(dev, 64, 0, 0);
 353}
 354
 355static int ni_65xx_dio_insn_config(struct comedi_device *dev,
 356                                   struct comedi_subdevice *s,
 357                                   struct comedi_insn *insn,
 358                                   unsigned int *data)
 359{
 360        unsigned long base_port = (unsigned long)s->private;
 361        unsigned int chan = CR_CHAN(insn->chanspec);
 362        unsigned int chan_mask = NI_65XX_CHAN_TO_MASK(chan);
 363        unsigned int port = base_port + NI_65XX_CHAN_TO_PORT(chan);
 364        unsigned int interval;
 365        unsigned int val;
 366
 367        switch (data[0]) {
 368        case INSN_CONFIG_FILTER:
 369                /*
 370                 * The deglitch filter interval is specified in nanoseconds.
 371                 * The hardware supports intervals in 200ns increments. Round
 372                 * the user values up and return the actual interval.
 373                 */
 374                interval = (data[1] + 100) / 200;
 375                if (interval > 0xfffff)
 376                        interval = 0xfffff;
 377                data[1] = interval * 200;
 378
 379                /*
 380                 * Enable/disable the channel for deglitch filtering. Note
 381                 * that the filter interval is never set to '0'. This is done
 382                 * because other channels might still be enabled for filtering.
 383                 */
 384                val = readb(dev->mmio + NI_65XX_FILTER_ENA(port));
 385                if (interval) {
 386                        writel(interval, dev->mmio + NI_65XX_FILTER_REG);
 387                        val |= chan_mask;
 388                } else {
 389                        val &= ~chan_mask;
 390                }
 391                writeb(val, dev->mmio + NI_65XX_FILTER_ENA(port));
 392                break;
 393
 394        case INSN_CONFIG_DIO_OUTPUT:
 395                if (s->type != COMEDI_SUBD_DIO)
 396                        return -EINVAL;
 397                writeb(NI_65XX_IO_SEL_OUTPUT,
 398                       dev->mmio + NI_65XX_IO_SEL_REG(port));
 399                break;
 400
 401        case INSN_CONFIG_DIO_INPUT:
 402                if (s->type != COMEDI_SUBD_DIO)
 403                        return -EINVAL;
 404                writeb(NI_65XX_IO_SEL_INPUT,
 405                       dev->mmio + NI_65XX_IO_SEL_REG(port));
 406                break;
 407
 408        case INSN_CONFIG_DIO_QUERY:
 409                if (s->type != COMEDI_SUBD_DIO)
 410                        return -EINVAL;
 411                val = readb(dev->mmio + NI_65XX_IO_SEL_REG(port));
 412                data[1] = (val == NI_65XX_IO_SEL_INPUT) ? COMEDI_INPUT
 413                                                        : COMEDI_OUTPUT;
 414                break;
 415
 416        default:
 417                return -EINVAL;
 418        }
 419
 420        return insn->n;
 421}
 422
 423static int ni_65xx_dio_insn_bits(struct comedi_device *dev,
 424                                 struct comedi_subdevice *s,
 425                                 struct comedi_insn *insn,
 426                                 unsigned int *data)
 427{
 428        unsigned long base_port = (unsigned long)s->private;
 429        unsigned int base_chan = CR_CHAN(insn->chanspec);
 430        int last_port_offset = NI_65XX_CHAN_TO_PORT(s->n_chan - 1);
 431        unsigned int read_bits = 0;
 432        int port_offset;
 433
 434        for (port_offset = NI_65XX_CHAN_TO_PORT(base_chan);
 435             port_offset <= last_port_offset; port_offset++) {
 436                unsigned int port = base_port + port_offset;
 437                int base_port_channel = NI_65XX_PORT_TO_CHAN(port_offset);
 438                unsigned int port_mask, port_data, bits;
 439                int bitshift = base_port_channel - base_chan;
 440
 441                if (bitshift >= 32)
 442                        break;
 443                port_mask = data[0];
 444                port_data = data[1];
 445                if (bitshift > 0) {
 446                        port_mask >>= bitshift;
 447                        port_data >>= bitshift;
 448                } else {
 449                        port_mask <<= -bitshift;
 450                        port_data <<= -bitshift;
 451                }
 452                port_mask &= 0xff;
 453                port_data &= 0xff;
 454
 455                /* update the outputs */
 456                if (port_mask) {
 457                        bits = readb(dev->mmio + NI_65XX_IO_DATA_REG(port));
 458                        bits ^= s->io_bits;     /* invert if necessary */
 459                        bits &= ~port_mask;
 460                        bits |= (port_data & port_mask);
 461                        bits ^= s->io_bits;     /* invert back */
 462                        writeb(bits, dev->mmio + NI_65XX_IO_DATA_REG(port));
 463                }
 464
 465                /* read back the actual state */
 466                bits = readb(dev->mmio + NI_65XX_IO_DATA_REG(port));
 467                bits ^= s->io_bits;     /* invert if necessary */
 468                if (bitshift > 0)
 469                        bits <<= bitshift;
 470                else
 471                        bits >>= -bitshift;
 472
 473                read_bits |= bits;
 474        }
 475        data[1] = read_bits;
 476        return insn->n;
 477}
 478
 479static irqreturn_t ni_65xx_interrupt(int irq, void *d)
 480{
 481        struct comedi_device *dev = d;
 482        struct comedi_subdevice *s = dev->read_subdev;
 483        unsigned int status;
 484
 485        status = readb(dev->mmio + NI_65XX_STATUS_REG);
 486        if ((status & NI_65XX_STATUS_INT) == 0)
 487                return IRQ_NONE;
 488        if ((status & NI_65XX_STATUS_EDGE_INT) == 0)
 489                return IRQ_NONE;
 490
 491        writeb(NI_65XX_CLR_EDGE_INT | NI_65XX_CLR_OVERFLOW_INT,
 492               dev->mmio + NI_65XX_CLR_REG);
 493
 494        comedi_buf_write_samples(s, &s->state, 1);
 495        comedi_handle_events(dev, s);
 496
 497        return IRQ_HANDLED;
 498}
 499
 500static int ni_65xx_intr_cmdtest(struct comedi_device *dev,
 501                                struct comedi_subdevice *s,
 502                                struct comedi_cmd *cmd)
 503{
 504        int err = 0;
 505
 506        /* Step 1 : check if triggers are trivially valid */
 507
 508        err |= comedi_check_trigger_src(&cmd->start_src, TRIG_NOW);
 509        err |= comedi_check_trigger_src(&cmd->scan_begin_src, TRIG_OTHER);
 510        err |= comedi_check_trigger_src(&cmd->convert_src, TRIG_FOLLOW);
 511        err |= comedi_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT);
 512        err |= comedi_check_trigger_src(&cmd->stop_src, TRIG_COUNT);
 513
 514        if (err)
 515                return 1;
 516
 517        /* Step 2a : make sure trigger sources are unique */
 518        /* Step 2b : and mutually compatible */
 519
 520        /* Step 3: check if arguments are trivially valid */
 521
 522        err |= comedi_check_trigger_arg_is(&cmd->start_arg, 0);
 523        err |= comedi_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
 524        err |= comedi_check_trigger_arg_is(&cmd->convert_arg, 0);
 525        err |= comedi_check_trigger_arg_is(&cmd->scan_end_arg,
 526                                           cmd->chanlist_len);
 527        err |= comedi_check_trigger_arg_is(&cmd->stop_arg, 0);
 528
 529        if (err)
 530                return 3;
 531
 532        /* Step 4: fix up any arguments */
 533
 534        /* Step 5: check channel list if it exists */
 535
 536        return 0;
 537}
 538
 539static int ni_65xx_intr_cmd(struct comedi_device *dev,
 540                            struct comedi_subdevice *s)
 541{
 542        writeb(NI_65XX_CLR_EDGE_INT | NI_65XX_CLR_OVERFLOW_INT,
 543               dev->mmio + NI_65XX_CLR_REG);
 544        writeb(NI_65XX_CTRL_FALL_EDGE_ENA | NI_65XX_CTRL_RISE_EDGE_ENA |
 545               NI_65XX_CTRL_INT_ENA | NI_65XX_CTRL_EDGE_ENA,
 546               dev->mmio + NI_65XX_CTRL_REG);
 547
 548        return 0;
 549}
 550
 551static int ni_65xx_intr_cancel(struct comedi_device *dev,
 552                               struct comedi_subdevice *s)
 553{
 554        writeb(0x00, dev->mmio + NI_65XX_CTRL_REG);
 555
 556        return 0;
 557}
 558
 559static int ni_65xx_intr_insn_bits(struct comedi_device *dev,
 560                                  struct comedi_subdevice *s,
 561                                  struct comedi_insn *insn,
 562                                  unsigned int *data)
 563{
 564        data[1] = 0;
 565        return insn->n;
 566}
 567
 568static int ni_65xx_intr_insn_config(struct comedi_device *dev,
 569                                    struct comedi_subdevice *s,
 570                                    struct comedi_insn *insn,
 571                                    unsigned int *data)
 572{
 573        switch (data[0]) {
 574        case INSN_CONFIG_CHANGE_NOTIFY:
 575                /* add instruction to check_insn_config_length() */
 576                if (insn->n != 3)
 577                        return -EINVAL;
 578
 579                /* update edge detection for channels 0 to 31 */
 580                ni_65xx_update_edge_detection(dev, 0, data[1], data[2]);
 581                /* clear edge detection for channels 32 to 63 */
 582                ni_65xx_update_edge_detection(dev, 32, 0, 0);
 583                /* clear edge detection for channels 64 to 95 */
 584                ni_65xx_update_edge_detection(dev, 64, 0, 0);
 585                break;
 586        case INSN_CONFIG_DIGITAL_TRIG:
 587                /* check trigger number */
 588                if (data[1] != 0)
 589                        return -EINVAL;
 590                /* check digital trigger operation */
 591                switch (data[2]) {
 592                case COMEDI_DIGITAL_TRIG_DISABLE:
 593                        ni_65xx_disable_edge_detection(dev);
 594                        break;
 595                case COMEDI_DIGITAL_TRIG_ENABLE_EDGES:
 596                        /*
 597                         * update edge detection for channels data[3]
 598                         * to (data[3] + 31)
 599                         */
 600                        ni_65xx_update_edge_detection(dev, data[3],
 601                                                      data[4], data[5]);
 602                        break;
 603                default:
 604                        return -EINVAL;
 605                }
 606                break;
 607        default:
 608                return -EINVAL;
 609        }
 610
 611        return insn->n;
 612}
 613
 614/* ripped from mite.h and mite_setup2() to avoid mite dependency */
 615#define MITE_IODWBSR    0xc0     /* IO Device Window Base Size Register */
 616#define WENAB                   BIT(7) /* window enable */
 617
 618static int ni_65xx_mite_init(struct pci_dev *pcidev)
 619{
 620        void __iomem *mite_base;
 621        u32 main_phys_addr;
 622
 623        /* ioremap the MITE registers (BAR 0) temporarily */
 624        mite_base = pci_ioremap_bar(pcidev, 0);
 625        if (!mite_base)
 626                return -ENOMEM;
 627
 628        /* set data window to main registers (BAR 1) */
 629        main_phys_addr = pci_resource_start(pcidev, 1);
 630        writel(main_phys_addr | WENAB, mite_base + MITE_IODWBSR);
 631
 632        /* finished with MITE registers */
 633        iounmap(mite_base);
 634        return 0;
 635}
 636
 637static int ni_65xx_auto_attach(struct comedi_device *dev,
 638                               unsigned long context)
 639{
 640        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 641        const struct ni_65xx_board *board = NULL;
 642        struct comedi_subdevice *s;
 643        unsigned int i;
 644        int ret;
 645
 646        if (context < ARRAY_SIZE(ni_65xx_boards))
 647                board = &ni_65xx_boards[context];
 648        if (!board)
 649                return -ENODEV;
 650        dev->board_ptr = board;
 651        dev->board_name = board->name;
 652
 653        ret = comedi_pci_enable(dev);
 654        if (ret)
 655                return ret;
 656
 657        ret = ni_65xx_mite_init(pcidev);
 658        if (ret)
 659                return ret;
 660
 661        dev->mmio = pci_ioremap_bar(pcidev, 1);
 662        if (!dev->mmio)
 663                return -ENOMEM;
 664
 665        writeb(NI_65XX_CLR_EDGE_INT | NI_65XX_CLR_OVERFLOW_INT,
 666               dev->mmio + NI_65XX_CLR_REG);
 667        writeb(0x00, dev->mmio + NI_65XX_CTRL_REG);
 668
 669        if (pcidev->irq) {
 670                ret = request_irq(pcidev->irq, ni_65xx_interrupt, IRQF_SHARED,
 671                                  dev->board_name, dev);
 672                if (ret == 0)
 673                        dev->irq = pcidev->irq;
 674        }
 675
 676        dev_info(dev->class_dev, "board: %s, ID=0x%02x", dev->board_name,
 677                 readb(dev->mmio + NI_65XX_ID_REG));
 678
 679        ret = comedi_alloc_subdevices(dev, 4);
 680        if (ret)
 681                return ret;
 682
 683        s = &dev->subdevices[0];
 684        if (board->num_di_ports) {
 685                s->type         = COMEDI_SUBD_DI;
 686                s->subdev_flags = SDF_READABLE;
 687                s->n_chan       = NI_65XX_PORT_TO_CHAN(board->num_di_ports);
 688                s->maxdata      = 1;
 689                s->range_table  = &range_digital;
 690                s->insn_bits    = ni_65xx_dio_insn_bits;
 691                s->insn_config  = ni_65xx_dio_insn_config;
 692
 693                /* the input ports always start at port 0 */
 694                s->private = (void *)0;
 695        } else {
 696                s->type         = COMEDI_SUBD_UNUSED;
 697        }
 698
 699        s = &dev->subdevices[1];
 700        if (board->num_do_ports) {
 701                s->type         = COMEDI_SUBD_DO;
 702                s->subdev_flags = SDF_WRITABLE;
 703                s->n_chan       = NI_65XX_PORT_TO_CHAN(board->num_do_ports);
 704                s->maxdata      = 1;
 705                s->range_table  = &range_digital;
 706                s->insn_bits    = ni_65xx_dio_insn_bits;
 707
 708                /* the output ports always start after the input ports */
 709                s->private = (void *)(unsigned long)board->num_di_ports;
 710
 711                /*
 712                 * Use the io_bits to handle the inverted outputs.  Inverted
 713                 * outputs are only supported if the "legacy_invert_outputs"
 714                 * module parameter is set to "true".
 715                 */
 716                if (ni_65xx_legacy_invert_outputs && board->legacy_invert)
 717                        s->io_bits = 0xff;
 718
 719                /* reset all output ports to comedi '0' */
 720                for (i = 0; i < board->num_do_ports; ++i) {
 721                        writeb(s->io_bits,      /* inverted if necessary */
 722                               dev->mmio +
 723                               NI_65XX_IO_DATA_REG(board->num_di_ports + i));
 724                }
 725        } else {
 726                s->type         = COMEDI_SUBD_UNUSED;
 727        }
 728
 729        s = &dev->subdevices[2];
 730        if (board->num_dio_ports) {
 731                s->type         = COMEDI_SUBD_DIO;
 732                s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
 733                s->n_chan       = NI_65XX_PORT_TO_CHAN(board->num_dio_ports);
 734                s->maxdata      = 1;
 735                s->range_table  = &range_digital;
 736                s->insn_bits    = ni_65xx_dio_insn_bits;
 737                s->insn_config  = ni_65xx_dio_insn_config;
 738
 739                /* the input/output ports always start at port 0 */
 740                s->private = (void *)0;
 741
 742                /* configure all 34U6s="comment">/* cx4e=num_ /* configure all 34U6s="comment">/* cx="line" name="L643"> 6437/a>  74            i = 0; i < board->num_dio_ports);
i) {
 6447/a>  74            writeb(NI_65XX_CLR_OVERFIO_SEL_INPU"   6457/a>
<74            dev->mmio + NI_65XX_IO_DATA_REGi));
 6467/a>  74             6477/a>  7             < 6487/a>  74            s->type         = COMEDI_SUBD_UNUSED;
 6497/a>  74    }
 6507/a>  75href="drivers/staging/comedi/drivers/ni_65xx.c#L711" id="L651" clas7="line" name="L651"> 6517/a>  7     s = &dev->subdevices[2];
 6527/a>
<752   s = &type         = COMEDI_SUBD_DI;
 6537/a>  7     s->subdev_flags = SDF_READABLE |  6547/a>  7     if (s->n_chan       =  6557/a>  75    s->maxdata      = 1;
 6567/a>
<75    s->range_table  = &range_digital;
 6577/a>  7     s->insn_bits    = ni_65xx_dio_insn_intrs" class="href="drivers/staging/comedi/drivers/ni_65xx.c#L736" id="L648" clas7="line" name="L658"> 6587/a>  7     if (dev->irq =  6597/a>  7             return dev->(sref">range_digi( href="+code=SDF_READA"sref">s;
 6607/a>
<76            s->subdev_flags =  sref">SDF_READABLE href="drivers/staging/comedi/drivers/ni_65xx.c#L643" id="7651" clas7="line" name="L661"> 6617/a>  76            s->     lis"sref">legacy_inve>     lis" href="f="drivers/staging/comedi/drivers/ni_65xx.c#L735" id="L662" clas7="line" name="L662"> 6627/a>  76            s->insn_config  = ni_65xx_dio_insn_intrs" clalass="href="drivers/staging/comedi/drivers/ni_65xx.c#L643" id="7653" clas7="line" name="L663"> 6637/a>  7             return -<+code=s" class="sref">s->legacy_indo_cmdtes"       ="+code=ni_65xx_dio_insn_intrscmdtes"sref">legacy_inio_insn_intrscmdtes"href="drivers/staging/comedi/drivers/ni_65xx.c#L643" id="7644" clas7="line" name="L664"> 6647/a>
<76            s->legacy_indo_cmd  = legacy_inio_insn_intrscmdhref="drivers/staging/comedi/drivers/ni_65xx.c#L643" id="7655" clas7="line" name="L665"> 6657/a>  76            s->writelwritel 6667/a>  7             6677/a>  76href="drivers/staging/comedi/drivers/ni_65xx.c#L708" id="L668" clas7="line" name="L668"> 6687/a>
<76    /* c_filspansref">ni_65xx_dio_insn_cos = &_>/* c_filspanref="+code=NI_65XX_Cs="sref">dev);
 6697/a>  76    n_chano_insn_cos = &_edldev);
 6707/a>  77href="drivers/staging/comedi/drivers/ni_65xx.c#L711" id="L671" clas7="line" name="L671"> 6717/a>  7              
 6727/a>  7      ="drivers/staging/comedi/drivers/ni_65xx.c#L610" id="7673" clas7="line" name="L673"> 6737/a>  7      "drivers/staging/comedi/drivers/ni_65xx.c#L610" id="7644" clas7="line" name="L674"> 6747/a>  7     }s ni_65xx_auto_attacess="ref=" href="+code=comedi_device" class="sref">comedi_device *dev,
 6757/a>
<7 href=="drivers/staging/comedi/drivers/ni_65xx.c#L721" id="L676" clas7="line" name="L676"> 6767/a>  7     dev->mmio)
 6777/a>  7              writeb(dev->mmio + NI_65XX_CTRL_REG);
 6787/a>
<77    (ni_65xx_avice(dev);
 6797/a>  7     <="drivers/staging/comedi/drivers/ni_65xx.c#L610" id="7680" clas7="line" name="L680"> 6807/a>  78href="drivers/staging/comedi/drivers/ni_65xx.c#L711" id="L681" clas7="line" name="L681"> 6817/a>  7      s comedi_device_65xx   comedi_deio_insn_c_65xx href="="drivers/staging/comedi/drivers/ni_65xx.c#L721" id="L682" clas7="line" name="L682"> 6827/a>
<78            <.+code=NI_65XX_Cs_65xxass="sref">board_nams_65xxass=" "board: &##L721" pan>,  6837/a>  7     mmio +amete    = SDF_READATHIS_MODU="   6847/a>  7     if (ni_65xx_ach(struct ni_65xx_auto_attach(struct  6857/a>  7             <.+code=NI_65XX_Cs ss="sref">ni_65xx_aa ss="ref== ni_65xx_auto_attacess="ref=p"drivers/staging/comedi/drivers/ni_65xx.c#L721" id="L676" clas7="line" name="L686"> 6867/a>  7      }="drivers/staging/comedi/drivers/ni_65xx.c#L672" id="7687" clas7="line" name="L687"> 6877/a>  78href="drivers/staging/comedi/drivers/ni_65xx.c#L708" id="L688" clas7="line" name="L688"> 6887/a>  7      s (mmio uto_attaa>(pci_dev *dev, 4);
 6897/a>  7             legacy_ina> *legacy_ini href="drivers/staging/comedi/drivers/ni_65xx.c#L649" id="7690" clas7="line" name="L690"> 6907/a>  7      ="drivers/staging/comedi/drivers/ni_65xx.c#L721" id="L691" clas7="line" name="L691"> 6917/a>  79             
(ni_65xx_dvice(dev);
comedi_deio_insn_c_65xx hre="+code=dev" clasidsref">legacy_ini hrefref="+code=maxdata" d_65xxass="sref">maxdata 6927/a>
<79     ="drivers/staging/comedi/drivers/ni_65xx.c#L610" id="7693" clas7="line" name="L693"> 6937/a>  79     "drivers/staging/comedi/drivers/ni_65xx.c#L610" id="7694" clas7="line" name="L694"> 6947/a>  79    }s legacy_ina> *(range_tabuto_attaa>( 6957/a>  7     } else {
{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x1710)="+code=dev" clasBOARD_PXI65="line" namEDI_SUBOARD_PXI65="   } }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="L696" clas7="line" name="L696"> 6967/a>  7             <{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x7085)="+code=dev" clasBOARD_PCI65="line" namEDI_SUBOARD_PCI65="   } }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="L687" clas7="line" name="L697"> 6977/a>  7     }
SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x7086)="+code=dev" clasBOARD_PXI65="line" namEDI_SUBOARD_PXI65 href= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="L688" clas7="line" name="L698"> 6987/a>
<798   }
SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x7087)="+code=dev" clasBOARD_PCI65="line" namEDI_SUBOARD_PCI65an cla }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="L669" clas7="line" name="L699"> 6997/a>  7     SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x7088)="+code=dev" clasBOARD_PCI65=4line" namEDI_SUBOARD_PCI65a4 cla }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8700" clas8="line" name="L700"> 7008/a>  8     if (SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x70a9)="+code=dev" clasBOARD_PCI65="line" namEDI_SUBOARD_PCI65 href= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8701" clas8="line" name="L701"> 7018/a>  8             <{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x70c3)="+code=dev" clasBOARD_PCI65=1line" namEDI_SUBOARD_PCI65a1ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8721" clas8="line" name="L692"> 6928/a>  8             <{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x70c8)="+code=dev" clasBOARD_PCI65=3line" namEDI_SUBOARD_PCI65a3ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8731" clas8="line" name="L693"> 6938/a>  8             <{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x70c9)="+code=dev" clasBOARD_PXI65="line" namEDI_SUBOARD_PXI65an cla }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8704" clas8="line" name="L704"> 7048/a>  8             <{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x70cc)="+code=dev" clasBOARD_PCI65=2line" namEDI_SUBOARD_PCI65a2 cla }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8754" clas8="line" name="L695"> 6958/a>  80    } else {
{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x70cd)="+code=dev" clasBOARD_PXI65=4line" namEDI_SUBOARD_PXI65a4 cla }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8764" clas8="line" name="L696"> 6968/a>  80            <{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x70d1)="+code=dev" clasBOARD_PXI65=3line" namEDI_SUBOARD_PXI65a3ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8774" clas8="line" name="L697"> 6978/a>
<80    }
SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x70d2)="+code=dev" clasBOARD_PXI65=2line" namEDI_SUBOARD_PXI65a2 cla }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8784" clas8="line" name="L698"> 6988/a>  808   }
SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x70d3)="+code=dev" clasBOARD_PXI65=1line" namEDI_SUBOARD_PXI65a1ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8794" clas8="line" name="L699"> 6998/a>  80    SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x7124)="+code=dev" clasBOARD_PCI65=0line" namEDI_SUBOARD_PCI65a0ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8710" clas8="line" name="L710"> 7108/a>
<81    if (SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x7125)="+code=dev" clasBOARD_PCI65="line" namEDI_SUBOARD_PCI65a6ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8701" clas8="line" name="L711"> 7118/a>  81            <{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x7126)="+code=dev" clasBOARD_PCI65a7line" namEDI_SUBOARD_PCI65a7ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8721" clas8="line" name="L712"> 7128/a>SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x7127)="+code=dev" clasBOARD_PCI65="line" namEDI_SUBOARD_PCI651href= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8713" clas8="line" name="L713"> 7138/a>SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x7128)="+code=dev" clasBOARD_PCI65="line" namEDI_SUBOARD_PCI651"   } }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8714" clas8="line" name="L714"> 7148/a>SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x718b)="+code=dev" clasBOARD_PCI65=1line" namEDI_SUBOARD_PCI6521ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8715" clas8="line" name="L715"> 7158/a>SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x718c)="+code=dev" clasBOARD_PXI65=1line" namEDI_SUBOARD_PXI6521ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8764" clas8="line" name="L716"> 7168/a>  81            <{=+code=ret" clasPCI_VDEVIC"sref">SDF_READAPCI_VDEVIC"ref="+code=NI_65XX_CN"sref">COMEDI_SUNI hre="0x71c5)="+code=dev" clasBOARD_PCI6520line" namEDI_SUBOARD_PCI6520ref= }h"drivers/staging/comedi/drivers/ni_65xx.c#L708" id="8774" clas8="line" name="L717"> 7178/a>  81    }
 7188/a>
<81href=}="drivers/staging/comedi/drivers/ni_65xx.c#L672" id="8719" clas8="line" name="L719"> 7198/a>  81"   }+code=dev" clasMODU="_DEVIC"_ass="sref">SDF_WRITAMODU="_DEVIC"_ass="ref="+code=NI_65XX_Cpc"sref">i));
pc" hre="+code=dev" clasuto_attaa>(range_tabuto_attaa>( 7208/a>  82href="drivers/staging/comedi/drivers/ni_65xx.c#L711" id="8721" clas8="line" name="L721"> 7218/a>  82     s comedi_dea> *<_65xxhref=+code=ret" clasuto_attaa>(comedi_deio_insn_a> *<_65xxhref=="="drivers/staging/comedi/drivers/ni_65xx.c#L721" id="8722" clas8="line" name="L722"> 7228/a>  82            <.+code=NI_65XX_Css="sref">board_nams_65xxasREADATHIS_MOOOOOOOO" clasPCI_VDE63x.c#tm="+coss=sn_a> *<_65xxhref=="="taging/comedi/drivet0=="="drivers/stagrivet0==65xxhref==""line" name="L685"> 6857/">SDF_WRITAMODU="_DEVIC"_ass="ref="+code=NI_6ode=NI_65XX_Css="sref">board_nams_65xxasREADATHIS_MOOOOARD_PCI65ode=i" class="sref">iboard_nams_65xxasREADATHIS_MOOOOARD_PCI654"> 724             8  }
<8 href="drivers/staging/comedi/remove="L656"> 6567/a>emove="L68722" cla8="ging/comedi/drne" name="L691">un" id="L691" clas7="line" name="L691">un" id="="L6ode=NI_65XX_Css="sref">board_nams_65xxasREADATHIS_MOOOOARD_PXI6525"> 725        } el8e {
<82ref=p"drivers/staging/comedi/drivers/ni_65xx.c#L721" id="L68" class="8ref">COMEDI_SUBD_UNUSED<8a>;
<8 href="ging/comedi/dr1" id=_8" clas7="li   s  7198">ni_65xx_dvice(de7218/a>  82     s i));
pc" hre="+code=dev" clasuto_attaane" name=ame="L727"> 727     8  }
<8 href="drivers/staging/comedi/drivers/ni_65xx.c#L728" id="8728" clas8="line" name="L728"> 7288/a>
<82ef=}="drivers/staging/comedAUTHOR_65xx.c#L672" id="8719AUTHORe" namline" name="L722"> 7228/a>Ce" namhttp://www.ivers/.org         <.+c5XX_Cpc"sref">i));
pc" hre="+code=dev" clasuto_attavices" cl8ss="sref">subdevices82];
<8 href="drivers/staging/comedi/SCRIPTIOt; 7228/a>Ce" namde=devment"NI ="+-suto "driverdio f">ii));
pc" hre="+code=dev" clasuto_attav20" clas8="sref">num_dio_ports 7228/a>GPL         <.+c5XX_Cpc"sref">i));
pc" hre="+code=dev" clasuto_attav_65xxsref="sref">COMEDI_SUBD_DIO<8a>;
<8 href=


COMfoots <> TL708ripc"al LXR softwd="Lbyc#L73_Cpc"srefhttp://sourceentge.net/projects/lx <>LXR rs/nunity=NI_65this experini_6al dev"ionLbyc_Cpc"srefmailto:lx @EDIux.no">lx @EDIux.no=NI_.
COMsubfoots <> lx .EDIux.no kindly hos>-&gbyc_Cpc"srefhttp://www.redpill-EDIpro.no">Redpill LDIpro AS=NI_65providevmof LDIuxrs/stultc" and opera6 lassr;