linux/drivers/staging/comedi/drivers/addi_apci_3501.c
<<
alue3.1/spalue 3.1/formue 3.1a alue3. href="../linux+v alue3.1img src="../.static/gfx/right.png" alt=">>">al1/spalueal1spal class="lxr_search">aluealue3.1input typ vhidden" nam vnavtarget" > v">alue3.1input typ vtext" nam vsearch" id vsearch">alue3.1butt" typ vsubmit">Searchalue3.Prefse 3.1/a>al1/spalueue3. .1/divueue3. .1form ac val="ajax+*" method="post" onsubmit="return false;">al1input typ vhidden" nam vajax_lookup" id vajax_lookup" > v">aue3. .1/formueaue3. .1div class="headingbott"m">e 1div id vfile_contents"u
. .11/a>1spal class="comment">/*1/spalue. .21/a>1spal class="comment"> * addi_apci_3501.c1/spalue. .31/a>1spal class="comment"> * Copyright (C) 2004,2005  ADDI-DATA GmbH for the source code of this module.1/spalue. .41/a>1spal class="comment"> * Project manager: Eric Stolz1/spalue. .51/a>1spal class="comment"> *1/spalue. .61/a>1spal class="comment"> *      ADDI-DATA GmbH1/spalue. .71/a>1spal class="comment"> *      Dieselstrasse.31/spalue. .81/a>1spal class="comment"> *      D-77833 Ottersweier1/spalue. .91/a>1spal class="comment"> *      Tel: +19(0)7223/9493-01/spalue. optia>1spal class="comment"> *      Fax: +49(0)7223/9493-921/spalue. 111/a>1spal class="comment"> *      http://www.addi-data.com1/spalue. 121/a>1spal class="comment"> *      info@addi-data.com1/spalue. 131/a>1spal class="comment"> *1/spalue. 141/a>1spal class="comment"> * This program is free software; you cal redistribute it and/or modify it1/spalue. 151/a>1spal class="comment"> * under the terms of the GNU General Public License.as published by the1/spalue. 161/a>1spal class="comment"> * Free Software Founda val; either vers0"
	2 of the License, or (at your1/spalue. 171/a>1spal class="comment"> * on val) any later vers0"
.1/spalue. 181/a>1spal class="comment"> *1/spalue. 191/a>1spal class="comment"> * This program is distributed in the hope that it will be useful, but WITHOUT1/spalue. 2ptia>1spal class="comment"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or1/spalue. 211/a>1spal class="comment"> * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License.for1/spalue. 221/a>1spal class="comment"> * more details.1/spalue. 231/a>1spal class="comment"> */1/spalue. 241/a>e. 251/a>1spal class="comment">/*1/spalue. 261/a>1spal class="comment"> * Driver: addi_apci_35011/spalue. 271/a>1spal class="comment"> * Descrin val: ADDI-DATA APCI-3501 Analog output board1/spalue. 281/a>1spal class="comment"> * Devices: [ADDI-DATA] APCI-3501 (addi_apci_3501)1/spalue. 291/a>1spal class="comment"> * Author: H Hartley Sweeten <hsweeten@vis0"
engravers.com>1/spalue. 3ptia>1spal class="comment"> * Upda ed: Mon, 2p Ju
	2016 op:57:01 -07001/spalue. 311/a>1spal class="comment"> * Status: untes ed1/spalue. 321/a>1spal class="comment"> *1/spalue. 331/a>1spal class="comment"> * Configura val On vals: not applicable, uses comedi PCI auto config1/spalue. 341/a>1spal class="comment"> *1/spalue. 351/a>1spal class="comment"> * This board has the following features:1/spalue. 361/a>1spal class="comment"> *   - 4 or 8 analog output channels1/spalue. 371/a>1spal class="comment"> *   -	2 on vcally isolated digital inputs1/spalue. 381/a>1spal class="comment"> *   -	2 on vcally isolated digital outputs1/spalue. 391/a>1spal class="comment"> *   - 1 12-bit watchdog/timer1/spalue. 4ptia>1spal class="comment"> *1/spalue. 411/a>1spal class="comment"> * There are 2 vers0"
s of the APCI-3501:1/spalue. 421/a>1spal class="comment"> *   - APCI-3501-4. 4 analog output channels1/spalue. 431/a>1spal class="comment"> *   - APCI-3501-8  8 analog output channels1/spalue. 441/a>1spal class="comment"> *1/spalue. 451/a>1spal class="comment"> * These.boards use the sam  PCI Vendor/Device IDs. The number of output1/spalue. 461/a>1spal class="comment"> * channels used by this driver is determined by reading the EEPROM on1/spalue. 471/a>1spal class="comment"> * the board.1/spalue. 481/a>1spal class="comment"> *1/spalue. 491/a>1spal class="comment"> * The watchdog/timer subdevice is not currently supported.1/spalue. 5ptia>1spal class="comment"> */1/spalue. 511/a>e. 521/a>#include <linux/module.h1/a>>e. 531/a>e. 541/a>#include "../comedi_pci.h1/a>"e. 551/a>#include "amcc_s5933.h1/a>"e. 561/a>e. 571/a>1spal class="comment">/*1/spalue. 581/a>1spal class="comment"> * PCI bar 1 register I/O map1/spalue. 591/a>1spal class="comment"> */1/spalue. 6ptia>#define.1a href="+code=APCI3501_AO_CTRL_STATUS_REG" class="sref">APCI3501_AO_CTRL_STATUS_REGtia>             0x00e. 61tia>#define.1a href="+code=APCI3501_AO_CTRL_BIPOLAR" class="sref">APCI3501_AO_CTRL_BIPOLARtia>               .1a href="+code=BIT" class="sref">BITtia>(0)e. 62tia>#define.1a href="+code=APCI3501_AO_STATUS_READY" class="sref">APCI3501_AO_STATUS_READYtia>               .1a href="+code=BIT" class="sref">BITtia>(8)e. 63tia>#define.1a href="+code=APCI3501_AO_DATA_REG" class="sref">APCI3501_AO_DATA_REGtia>               .    0x04e. 64tia>#define.1a href="+code=APCI3501_AO_DATA_CHAN" class="sref">APCI3501_AO_DATA_CHANtia>(1a href="+code=x" class="sref">xtia>)           .    ((1a href="+code=x" class="sref">xtia>) << 0)e. 65tia>#define.1a href="+code=APCI3501_AO_DATA_VAL" class="sref">APCI3501_AO_DATA_VALtia>(1a href="+code=x" class="sref">xtia>)           .     ((1a href="+code=x" class="sref">xtia>) << 8)e. 66tia>#define.1a href="+code=APCI3501_AO_DATA_BIPOLAR" class="sref">APCI3501_AO_DATA_BIPOLARtia>               .1a href="+code=BIT" class="sref">BITtia>(31)e. 67tia>#define.1a href="+code=APCI3501_AO_TRIG_SCS_REG" class="sref">APCI3501_AO_TRIG_SCS_REGtia>               .0x08e. 68tia>#define.1a href="+code=APCI3501_TIMER_BASE" class="sref">APCI3501_TIMER_BASEtia>               .    .0x20e. 69tia>#define.1a href="+code=APCI3501_DO_REG" class="sref">APCI3501_DO_REGtia>               .    .   .0x40e. 7ptia>#define.1a href="+code=APCI3501_DI_REG" class="sref">APCI3501_DI_REGtia>               .    .   .0x50e. 711/a>e. 721/a>1spal class="comment">/*1/spalue. 731/a>1spal class="comment"> * AMCC S5933 NVRAM1/spalue. 741/a>1spal class="comment"> */1/spalue. 75tia>#define.1a href="+code=NVRAM_USER_DATA_START" class="sref">NVRAM_USER_DATA_STARTtia>   0x100e. 761/a>e. 77tia>#define.1a href="+code=NVCMD_BEGIN_READ" class="sref">NVCMD_BEGIN_READtia>        (0x7 << 5)e. 78tia>#define.1a href="+code=NVCMD_LOAD_LOW" class="sref">NVCMD_LOAD_LOWtia>          (0x4 << 5)e. 79tia>#define.1a href="+code=NVCMD_LOAD_HIGH" class="sref">NVCMD_LOAD_HIGHtia>         (0x5 << 5)e. 801/a>e. 811/a>1spal class="comment">/*1/spalue. 821/a>1spal class="comment"> * Func val typ s stored in the eeprom1/spalue. 831/a>1spal class="comment"> */1/spalue. 84tia>#define.1a href="+code=EEPROM_DIGITALINPUT" class="sref">EEPROM_DIGITALINPUTtia>             0e. 85tia>#define.1a href="+code=EEPROM_DIGITALOUTPUT" class="sref">EEPROM_DIGITALOUTPUTtia>            1e. 86tia>#define.1a href="+code=EEPROM_ANALOGINPUT" class="sref">EEPROM_ANALOGINPUTtia>              2e. 87tia>#define.1a href="+code=EEPROM_ANALOGOUTPUT" class="sref">EEPROM_ANALOGOUTPUTtia>             3e. 88tia>#define.1a href="+code=EEPROM_TIMER" class="sref">EEPROM_TIMERtia>               .    4e. 89tia>#define.1a href="+code=EEPROM_WATCHDOG" class="sref">EEPROM_WATCHDOGtia>               . 5e. 9ptia>#define.1a href="+code=EEPROM_TIMER_WATCHDOG_COUNTER" class="sref">EEPROM_TIMER_WATCHDOG_COUNTERtia>   10e. 911/a>e. 921/a>struct.1a href="+code=apci3501_private" class="sref">apci3501_privatetia> {e. 93tia>        unsigned long.1a href="+code=amcc" class="sref">amcctia>;e. 94tia>        unsigned char.1a href="+code=timer_mode" class="sref">timer_modetia>;e. 95tia>};e. 961/a>e. 971/a>static struct.1a href="+code=comedi_lrange" class="sref">comedi_lrangetia> 1a href="+code=apci3501_ao_range" class="sref">apci3501_ao_rangetia> = {e. 98tia>        2, {e. 99tia>               .1a href="+code=BIP_RANGE" class="sref">BIP_RANGEtia>(10),e.100tia>               .1a href="+code=UNI_RANGE" class="sref">UNI_RANGEtia>(10)e.101tia>        }e.102tia>};e.1031/a>e.1041/a>static int.1a href="+code=apci3501_wait_for_dac" class="sref">apci3501_wait_for_dactia>(struct.1a href="+code=comedi_device" class="sref">comedi_devicetia> *1a href="+code=dev" class="sref">devtia>)e.105tia>{e.106tia>        unsigned int.1a href="+code=status" class="sref">statustia>;e.1071/a>e.108tia>        do {e.109tia>               .1a href="+code=status" class="sref">statustia> = 1a href="+code=inl" class="sref">inltia>(1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_AO_CTRL_STATUS_REG" class="sref">APCI3501_AO_CTRL_STATUS_REGtia>);e.110tia>        } while (!(1a href="+code=status" class="sref">statustia> &.1a href="+code=APCI3501_AO_STATUS_READY" class="sref">APCI3501_AO_STATUS_READYtia>));e.1111/a>e.1121/a>        return 0;e.1131/a>}e.1141/a>e.1151/a>static int.1a href="+code=apci3501_ao_insn_write" class="sref">apci3501_ao_insn_writetia>(struct.1a href="+code=comedi_device" class="sref">comedi_devicetia> *1a href="+code=dev" class="sref">devtia>,e.116tia>               ...................struct.1a href="+code=comedi_subdevice" class="sref">comedi_subdevicetia> *1a href="+code=s" class="sref">stia>,e.1171/a>               ...................struct.1a href="+code=comedi_insn" class="sref">comedi_insntia> *1a href="+code=insn" class="sref">insntia>,e.1181/a>               ...................unsigned int.*1a href="+code=data" class="sref">datatia>)e.1191/a>{e.120tia>        unsigned int.1a href="+code=chan" class="sref">chantia> = 1a href="+code=CR_CHAN" class="sref">CR_CHANtia>(1a href="+code=insn" class="sref">insntia>->1a href="+code=chanspec" class="sref">chanspectia>);e.121tia>        unsigned int.1a href="+code=range" class="sref">rangetia> = 1a href="+code=CR_RANGE" class="sref">CR_RANGEtia>(1a href="+code=insn" class="sref">insntia>->1a href="+code=chanspec" class="sref">chanspectia>);e.122tia>        unsigned int.1a href="+code=cfg" class="sref">cfgtia> = 1a href="+code=APCI3501_AO_DATA_CHAN" class="sref">APCI3501_AO_DATA_CHANtia>(1a href="+code=chan" class="sref">chantia>);e.123tia>        int.1a href="+code=ret" class="sref">rettia>;e.124tia>        int.1a href="+code=i" class="sref">itia>;e.1251/a>e.126tia>        1spal class="comment">/*1/spalue.1271/a>1spal class="comment">         * All analog output channels have the sam  output range.1/spalue.1281/a>1spal class="comment">         *      14-bit bipolar: 0-10V1/spalue.1291/a>1spal class="comment">         *      13-bit unipolar: +/-10V1/spalue.13ptia>1spal class="comment">         * Changing the range of one channel changes all of them!1/spalue.1311/a>1spal class="comment">         */1/spalue.132tia>        if (1a href="+code=range" class="sref">rangetia>) {e.1331/a>               .1a href="+code=outl" class="sref">outltia>(0,.1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_AO_CTRL_STATUS_REG" class="sref">APCI3501_AO_CTRL_STATUS_REGtia>);e.134tia>        } else {e.1351/a>               .1a href="+code=cfg" class="sref">cfgtia> |= 1a href="+code=APCI3501_AO_DATA_BIPOLAR" class="sref">APCI3501_AO_DATA_BIPOLARtia>;e.136tia>               .1a href="+code=outl" class="sref">outltia>(1a href="+code=APCI3501_AO_CTRL_BIPOLAR" class="sref">APCI3501_AO_CTRL_BIPOLARtia>,e.1371/a>               ......1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_AO_CTRL_STATUS_REG" class="sref">APCI3501_AO_CTRL_STATUS_REGtia>);e.1381/a>        }e.1391/a>e.140tia>        for (1a href="+code=i" class="sref">itia> = 0;.1a href="+code=i" class="sref">itia> < 1a href="+code=insn" class="sref">insntia>->1a href="+code=n" class="sref">ntia>;.1a href="+code=i" class="sref">itia>++) {e.1411/a>               .unsigned int.1a href="+code=val" class="sref">valtia> = 1a href="+code=data" class="sref">datatia>[1a href="+code=i" class="sref">itia>];e.1421/a>e.1431/a>               .if (1a href="+code=range" class="sref">rangetia> == 1) {e.1441/a>               ......  .if (1a href="+code=data" class="sref">datatia>[1a href="+code=i" class="sref">itia>] > 0x1fff) {e.1451/a>               .          ......1a href="+code=dev_err" class="sref">dev_errtia>(1a href="+code=dev" class="sref">devtia>->1a href="+code=class_dev" class="sref">class_devtia>,e.146tia>               .........................1spal class="string">"Unipolar resolu val is only 13-bits\n".1471/a>               .................return -1a href="+code=EINVAL" class="sref">EINVALtia>;e.1481/a>               .........}e.149tia>               .}e.1501/a>e.1511/a>               .1a href="+code=ret" class="sref">rettia> = 1a href="+code=apci3501_wait_for_dac" class="sref">apci3501_wait_for_dactia>(1a href="+code=dev" class="sref">devtia>);e.1521/a>               .if (1a href="+code=ret" class="sref">rettia>)e.1531/a>               .........return 1a href="+code=ret" class="sref">rettia>;e.1541/a>e.1551/a>               .1a href="+code=outl" class="sref">outltia>(1a href="+code=cfg" class="sref">cfgtia> |.1a href="+code=APCI3501_AO_DATA_VAL" class="sref">APCI3501_AO_DATA_VALtia>(1a href="+code=val" class="sref">valtia>),e.156tia>               ......1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_AO_DATA_REG" class="sref">APCI3501_AO_DATA_REGtia>);e.1571/a>e.1581/a>               .1a href="+code=s" class="sref">stia>->1a href="+code=readback" class="sref">readbacktia>[1a href="+code=chan" class="sref">chantia>] = 1a href="+code=val" class="sref">valtia>;e.159tia>        }e.1601/a>e.1611/a>        return 1a href="+code=insn" class="sref">insntia>->1a href="+code=n" class="sref">ntia>;e.162tia>}e.1631/a>e.1641/a>static int.1a href="+code=apci3501_di_insn_bits" class="sref">apci3501_di_insn_bitstia>(struct.1a href="+code=comedi_device" class="sref">comedi_devicetia> *1a href="+code=dev" class="sref">devtia>,e.1651/a>               .          .......struct.1a href="+code=comedi_subdevice" class="sref">comedi_subdevicetia> *1a href="+code=s" class="sref">stia>,e.166tia>               ..................struct.1a href="+code=comedi_insn" class="sref">comedi_insntia> *1a href="+code=insn" class="sref">insntia>,e.1671/a>               ..................unsigned int.*1a href="+code=data" class="sref">datatia>)e.168tia>{e.169tia>        1a href="+code=data" class="sref">datatia>[1] = 1a href="+code=inl" class="sref">inltia>(1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_DI_REG" class="sref">APCI3501_DI_REGtia>) &.0x3;e.1701/a>e.1711/a>        return 1a href="+code=insn" class="sref">insntia>->1a href="+code=n" class="sref">ntia>;e.172tia>}e.1731/a>e.1741/a>static int.1a href="+code=apci3501_do_insn_bits" class="sref">apci3501_do_insn_bitstia>(struct.1a href="+code=comedi_device" class="sref">comedi_devicetia> *1a href="+code=dev" class="sref">devtia>,e.1751/a>               .          .......struct.1a href="+code=comedi_subdevice" class="sref">comedi_subdevicetia> *1a href="+code=s" class="sref">stia>,e.176tia>               ..................struct.1a href="+code=comedi_insn" class="sref">comedi_insntia> *1a href="+code=insn" class="sref">insntia>,e.1771/a>               ..................unsigned int.*1a href="+code=data" class="sref">datatia>)e.178tia>{e.179tia>        1a href="+code=s" class="sref">stia>->1a href="+code=state" class="sref">statetia> = 1a href="+code=inl" class="sref">inltia>(1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_DO_REG" class="sref">APCI3501_DO_REGtia>);e.1801/a>e.1811/a>        if (1a href="+code=comedi_dio_upda e_state" class="sref">comedi_dio_upda e_statetia>(1a href="+code=s" class="sref">stia>, 1a href="+code=data" class="sref">datatia>))e.1821/a>               .1a href="+code=outl" class="sref">outltia>(1a href="+code=s" class="sref">stia>->1a href="+code=state" class="sref">statetia>,.1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_DO_REG" class="sref">APCI3501_DO_REGtia>);e.1831/a>e.184tia>        1a href="+code=data" class="sref">datatia>[1] = 1a href="+code=s" class="sref">stia>->1a href="+code=state" class="sref">statetia>;e.1851/a>e.186tia>        return 1a href="+code=insn" class="sref">insntia>->1a href="+code=n" class="sref">ntia>;e.187tia>}e.188tia>e.189tia>static void.1a href="+code=apci3501_eeprom_wait" class="sref">apci3501_eeprom_waittia>(unsigned long.1a href="+code=iobase" class="sref">iobasetia>)e.19ptia>{e.191tia>        unsigned char.1a href="+code=val" class="sref">valtia>;e.1921/a>e.193tia>        do {e.1941/a>               .1a href="+code=val" class="sref">valtia> = 1a href="+code=inb" class="sref">inbtia>(1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=AMCC_OP_REG_MCSR_NVCMD" class="sref">AMCC_OP_REG_MCSR_NVCMDtia>);e.1951/a>        } while (1a href="+code=val" class="sref">valtia> &.0x80);e.1961/a>}e.1971/a>e.198tia>static unsigned short.1a href="+code=apci3501_eeprom_readw" class="sref">apci3501_eeprom_readwtia>(unsigned long.1a href="+code=iobase" class="sref">iobasetia>,e.199tia>               .          ..................unsigned short.1a href="+code=addr" class="sref">addrtia>)e.20ptia>{e.201tia>        unsigned short.1a href="+code=val" class="sref">valtia> = 0;e.202tia>        unsigned char.1a href="+code=tmp" class="sref">tmptia>;e.203tia>        unsigned char.1a href="+code=i" class="sref">itia>;e.2041/a>e.2051/a>        1spal class="comment">/* Add the offset to the start.of the user data */1/spalue.206tia>        1a href="+code=addr" class="sref">addrtia> += 1a href="+code=NVRAM_USER_DATA_START" class="sref">NVRAM_USER_DATA_STARTtia>;e.2071/a>e.208tia>        for (1a href="+code=i" class="sref">itia> = 0;.1a href="+code=i" class="sref">itia> < 2;.1a href="+code=i" class="sref">itia>++) {e.209tia>               .1spal class="comment">/* Load the low 8 bit address */1/spalue.210tia>               .1a href="+code=outb" class="sref">outbtia>(1a href="+code=NVCMD_LOAD_LOW" class="sref">NVCMD_LOAD_LOWtia>,.1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=AMCC_OP_REG_MCSR_NVCMD" class="sref">AMCC_OP_REG_MCSR_NVCMDtia>);e.2111/a>               .1a href="+code=apci3501_eeprom_wait" class="sref">apci3501_eeprom_waittia>(1a href="+code=iobase" class="sref">iobasetia>);e.2121/a>               .1a href="+code=outb" class="sref">outbtia>((1a href="+code=addr" class="sref">addrtia> +.1a href="+code=i" class="sref">itia>) &.0xff,.1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=AMCC_OP_REG_MCSR_NVDATA" class="sref">AMCC_OP_REG_MCSR_NVDATAtia>);e.2131/a>               .1a href="+code=apci3501_eeprom_wait" class="sref">apci3501_eeprom_waittia>(1a href="+code=iobase" class="sref">iobasetia>);e.2141/a>e.2151/a>               .1spal class="comment">/* Load the high 8 bit address */1/spalue.216tia>               .1a href="+code=outb" class="sref">outbtia>(1a href="+code=NVCMD_LOAD_HIGH" class="sref">NVCMD_LOAD_HIGHtia>,.1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=AMCC_OP_REG_MCSR_NVCMD" class="sref">AMCC_OP_REG_MCSR_NVCMDtia>);e.2171/a>               .1a href="+code=apci3501_eeprom_wait" class="sref">apci3501_eeprom_waittia>(1a href="+code=iobase" class="sref">iobasetia>);e.2181/a>               .1a href="+code=outb" class="sref">outbtia>(((1a href="+code=addr" class="sref">addrtia> +.1a href="+code=i" class="sref">itia>) >> 8) &.0xff,e.219tia>               .     1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=AMCC_OP_REG_MCSR_NVDATA" class="sref">AMCC_OP_REG_MCSR_NVDATAtia>);e.220tia>               .1a href="+code=apci3501_eeprom_wait" class="sref">apci3501_eeprom_waittia>(1a href="+code=iobase" class="sref">iobasetia>);e.2211/a>e.2221/a>               .1spal class="comment">/* Read the eeprom data byte */1/spalue.2231/a>               .1a href="+code=outb" class="sref">outbtia>(1a href="+code=NVCMD_BEGIN_READ" class="sref">NVCMD_BEGIN_READtia>,.1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=AMCC_OP_REG_MCSR_NVCMD" class="sref">AMCC_OP_REG_MCSR_NVCMDtia>);e.2241/a>               .1a href="+code=apci3501_eeprom_wait" class="sref">apci3501_eeprom_waittia>(1a href="+code=iobase" class="sref">iobasetia>);e.2251/a>               .1a href="+code=tmp" class="sref">tmptia> = 1a href="+code=inb" class="sref">inbtia>(1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=AMCC_OP_REG_MCSR_NVDATA" class="sref">AMCC_OP_REG_MCSR_NVDATAtia>);e.226tia>               .1a href="+code=apci3501_eeprom_wait" class="sref">apci3501_eeprom_waittia>(1a href="+code=iobase" class="sref">iobasetia>);e.2271/a>e.2281/a>               .if (1a href="+code=i" class="sref">itia> == 0)e.229tia>               .        1a href="+code=val" class="sref">valtia> |= 1a href="+code=tmp" class="sref">tmptia>;e.230tia>               .elsee.2311/a>               .        1a href="+code=val" class="sref">valtia> |= (1a href="+code=tmp" class="sref">tmptia> << 8);e.232tia>        }e.2331/a>e.234tia>        return 1a href="+code=val" class="sref">valtia>;e.2351/a>}e.2361/a>e.2371/a>static int.1a href="+code=apci3501_eeprom_get_ao_n_chan" class="sref">apci3501_eeprom_get_ao_n_chantia>(struct.1a href="+code=comedi_device" class="sref">comedi_devicetia> *1a href="+code=dev" class="sref">devtia>)e.238tia>{e.239tia>        struct.1a href="+code=apci3501_private" class="sref">apci3501_privatetia> *1a href="+code=devpriv" class="sref">devprivtia> = 1a href="+code=dev" class="sref">devtia>->1a href="+code=private" class="sref">privatetia>;e.240tia>        unsigned char.1a href="+code=nfuncs" class="sref">nfuncstia>;e.2411/a>        int.1a href="+code=i" class="sref">itia>;e.2421/a>e.2431/a>        1a href="+code=nfuncs" class="sref">nfuncstia> = 1a href="+code=apci3501_eeprom_readw" class="sref">apci3501_eeprom_readwtia>(1a href="+code=devpriv" class="sref">devprivtia>->1a href="+code=amcc" class="sref">amcctia>, 10) &.0xff;e.2441/a>e.2451/a>        1spal class="comment">/* Read func valality details */1/spalue.246tia>        for (1a href="+code=i" class="sref">itia> = 0;.1a href="+code=i" class="sref">itia> < 1a href="+code=nfuncs" class="sref">nfuncstia>;.1a href="+code=i" class="sref">itia>++) {e.2471/a>               .unsigned short.1a href="+code=offset" class="sref">offsettia> = 1a href="+code=i" class="sref">itia> * 4;e.2481/a>               .unsigned short.1a href="+code=addr" class="sref">addrtia>;e.249tia>               .unsigned char.1a href="+code=func" class="sref">functia>;e.250tia>               .unsigned short.1a href="+code=val" class="sref">valtia>;e.2511/a>e.2521/a>               .1a href="+code=func" class="sref">functia> = 1a href="+code=apci3501_eeprom_readw" class="sref">apci3501_eeprom_readwtia>(1a href="+code=devpriv" class="sref">devprivtia>->1a href="+code=amcc" class="sref">amcctia>, 12 +.1a href="+code=offset" class="sref">offsettia>) &.0x3f;e.2531/a>               .1a href="+code=addr" class="sref">addrtia> = 1a href="+code=apci3501_eeprom_readw" class="sref">apci3501_eeprom_readwtia>(1a href="+code=devpriv" class="sref">devprivtia>->1a href="+code=amcc" class="sref">amcctia>, 14 +.1a href="+code=offset" class="sref">offsettia>);e.2541/a>e.2551/a>               .if (1a href="+code=func" class="sref">functia> == 1a href="+code=EEPROM_ANALOGOUTPUT" class="sref">EEPROM_ANALOGOUTPUTtia>) {e.256tia>               ......  .1a href="+code=val" class="sref">valtia> = 1a href="+code=apci3501_eeprom_readw" class="sref">apci3501_eeprom_readwtia>(1a href="+code=devpriv" class="sref">devprivtia>->1a href="+code=amcc" class="sref">amcctia>, 1a href="+code=addr" class="sref">addrtia> +.10);e.2571/a>               .........return (1a href="+code=val" class="sref">valtia> >> 4) &.0x3ff;e.2581/a>               .}e.259tia>        }e.260tia>        return 0;e.2611/a>}e.2621/a>e.2631/a>static int.1a href="+code=apci3501_eeprom_insn_read" class="sref">apci3501_eeprom_insn_readtia>(struct.1a href="+code=comedi_device" class="sref">comedi_devicetia> *1a href="+code=dev" class="sref">devtia>,e.2641/a>               ......  ..............struct.1a href="+code=comedi_subdevice" class="sref">comedi_subdevicetia> *1a href="+code=s" class="sref">stia>,e.2651/a>               .          ...........struct.1a href="+code=comedi_insn" class="sref">comedi_insntia> *1a href="+code=insn" class="sref">insntia>,e.266tia>               ......................unsigned int.*1a href="+code=data" class="sref">datatia>)e.2671/a>{e.2681/a>        struct.1a href="+code=apci3501_private" class="sref">apci3501_privatetia> *1a href="+code=devpriv" class="sref">devprivtia> = 1a href="+code=dev" class="sref">devtia>->1a href="+code=private" class="sref">privatetia>;e.269tia>        unsigned short.1a href="+code=addr" class="sref">addrtia> = 1a href="+code=CR_CHAN" class="sref">CR_CHANtia>(1a href="+code=insn" class="sref">insntia>->1a href="+code=chanspec" class="sref">chanspectia>);e.2701/a>e.2711/a>        1a href="+code=data" class="sref">datatia>[0] = 1a href="+code=apci3501_eeprom_readw" class="sref">apci3501_eeprom_readwtia>(1a href="+code=devpriv" class="sref">devprivtia>->1a href="+code=amcc" class="sref">amcctia>, 2 *.1a href="+code=addr" class="sref">addrtia>);e.2721/a>e.2731/a>        return 1a href="+code=insn" class="sref">insntia>->1a href="+code=n" class="sref">ntia>;e.2741/a>}e.2751/a>e.276tia>static int.1a href="+code=apci3501_reset" class="sref">apci3501_resettia>(struct.1a href="+code=comedi_device" class="sref">comedi_devicetia> *1a href="+code=dev" class="sref">devtia>)e.2771/a>{e.278tia>        unsigned int.1a href="+code=val" class="sref">valtia>;e.279tia>        int.1a href="+code=chan" class="sref">chantia>;e.280tia>        int.1a href="+code=ret" class="sref">rettia>;e.2811/a>e.2821/a>        1spal class="comment">/* Reset all digital outputs to "0" */1/spalue.2831/a>        1a href="+code=outl" class="sref">outltia>(0x0,.1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_DO_REG" class="sref">APCI3501_DO_REGtia>);e.2841/a>e.2851/a>        1spal class="comment">/* Default all analog outputs to 0V (bipolar) */1/spalue.286tia>        1a href="+code=outl" class="sref">outltia>(1a href="+code=APCI3501_AO_CTRL_BIPOLAR" class="sref">APCI3501_AO_CTRL_BIPOLARtia>,e.2871/a>             1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_AO_CTRL_STATUS_REG" class="sref">APCI3501_AO_CTRL_STATUS_REGtia>);e.288tia>        1a href="+code=val" class="sref">valtia> = 1a href="+code=APCI3501_AO_DATA_BIPOLAR" class="sref">APCI3501_AO_DATA_BIPOLARtia> |.1a href="+code=APCI3501_AO_DATA_VAL" class="sref">APCI3501_AO_DATA_VALtia>(0);e.2891/a>e.2901/a>        1spal class="comment">/* Set all analog output channels */1/spalue.291tia>        for (1a href="+code=chan" class="sref">chantia> = 0;.1a href="+code=chan" class="sref">chantia> < 8;.1a href="+code=chan" class="sref">chantia>++) {e.2921/a>               .1a href="+code=ret" class="sref">rettia> = 1a href="+code=apci3501_wait_for_dac" class="sref">apci3501_wait_for_dactia>(1a href="+code=dev" class="sref">devtia>);e.2931/a>               .if (1a href="+code=ret" class="sref">rettia>) {e.2941/a>               .        1a href="+code=dev_warn" class="sref">dev_warntia>(1a href="+code=dev" class="sref">devtia>->1a href="+code=class_dev" class="sref">class_devtia>,e.2951/a>               .          .......1spal class="string">"%s: DAC not-ready for channel %i\n".296tia>               ..................1a href="+code=__func__" class="sref">__func__tia>, 1a href="+code=chan" class="sref">chantia>);e.2971/a>               .}.else {e.2981/a>               .........1a href="+code=outl" class="sref">outltia>(1a href="+code=val" class="sref">valtia> |.1a href="+code=APCI3501_AO_DATA_CHAN" class="sref">APCI3501_AO_DATA_CHANtia>(1a href="+code=chan" class="sref">chantia>),e.299tia>               .          ...1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> +.1a href="+code=APCI3501_AO_DATA_REG" class="sref">APCI3501_AO_DATA_REGtia>);e.300tia>               .}e.301tia>        }e.3021/a>e.3031/a>        return 0;e.3041/a>}e.3051/a>e.306tia>static int.1a href="+code=apci3501_auto_attach" class="sref">apci3501_auto_attachtia>(struct.1a href="+code=comedi_device" class="sref">comedi_devicetia> *1a href="+code=dev" class="sref">devtia>,e.3071/a>               .................unsigned long.1a href="+code=context_unused" class="sref">context_unusedtia>)e.308tia>{e.309tia>        struct.1a href="+code=pci_dev" class="sref">pci_devtia> *1a href="+code=pcidev" class="sref">pcidevtia> = 1a href="+code=comedi_to_pci_dev" class="sref">comedi_to_pci_devtia>(1a href="+code=dev" class="sref">devtia>);e.310tia>        struct.1a href="+code=apci3501_private" class="sref">apci3501_privatetia> *1a href="+code=devpriv" class="sref">devprivtia>;e.3111/a>        struct.1a href="+code=comedi_subdevice" class="sref">comedi_subdevicetia> *1a href="+code=s" class="sref">stia>;e.3121/a>        int.1a href="+code=ao_n_chan" class="sref">ao_n_chantia>;e.3131/a>        int.1a href="+code=ret" class="sref">rettia>;e.3141/a>e.3151/a>        1a href="+code=devpriv" class="sref">devprivtia> = 1a href="+code=comedi_alloc_devpriv" class="sref">comedi_alloc_devprivtia>(1a href="+code=dev" class="sref">devtia>, sizeof(*1a href="+code=devpriv" class="sref">devprivtia>));e.316tia>        if (!1a href="+code=devpriv" class="sref">devprivtia>)e.3171/a>               .return -1a href="+code=ENOMEM" class="sref">ENOMEMtia>;e.318tia>e.319tia>        1a href="+code=ret" class="sref">rettia> = 1a href="+code=comedi_pci_enable" class="sref">comedi_pci_enabletia>(1a href="+code=dev" class="sref">devtia>);e.320tia>        if (1a href="+code=ret" class="sref">rettia>)e.3211/a>               .return 1a href="+code=ret" class="sref">rettia>;e.3221/a>e.3231/a>        1a href="+code=devpriv" class="sref">devprivtia>->1a href="+code=amcc" class="sref">amcctia> = 1a href="+code=pci_resource_start" class="sref">pci_resource_starttia>(1a href="+code=pcidev" class="sref">pcidevtia>, 0);e.3241/a>        1a href="+code=dev" class="sref">devtia>->1a href="+code=iobase" class="sref">iobasetia> = 1a href="+code=pci_resource_start" class="sref">pci_resource_starttia>(1a href="+code=pcidev" class="sref">pcidevtia>, 1);e.3251/a>e.326tia>        1a href="+code=ao_n_chan" class="sref">ao_n_chantia> = 1a href="+code=apci3501_eeprom_get_ao_n_chan" class="sref">apci3501_eeprom_get_ao_n_chantia>(1a href="+code=dev" class="sref">devtia>);e.3271/a>e.328tia>        1a href="+code=ret" class="sref">rettia> = 1a href="+code=comedi_alloc_subdevices" class="sref">comedi_alloc_subdevicestia>(1a href="+code=dev" class="sref">devtia>, 5);e.329tia>        if (1a href="+code=ret" class="sref">rettia>)e.330tia>               .return 1a href="+code=ret" class="sref">rettia>;e.3311/a>e.3321/a>        1spal class="comment">/* Initialize the analog output subdevice */1/spalue.3331/a>        1a href="+code=s" class="sref">stia> = &1a href="+code=dev" class="sref">devtia>->1a href="+code=subdevices" class="sref">subdevicestia>[0];e.334tia>        if (1a href="+code=ao_n_chan" class="sref">ao_n_chantia>) {e.3351/a>               .1a href="+code=s" class="sref">stia>->1a href="+code=type" class="sref">type1/a>         = 1a href="+code=COMEDI_SUBD_AO" class="sref">COMEDI_SUBD_AOtia>;e.336tia>               .1a href="+code=s" class="sref">stia>->1a href="+code=subdev_flags" class="sref">subdev_flagstia> = 1a href="+code=SDF_WRITABLE" class="sref">SDF_WRITABLEtia> |.1a href="+code=SDF_GROUND" class="sref">SDF_GROUNDtia> |.1a href="+code=SDF_COMMON" class="sref">SDF_COMMONtia>;e.3371/a>               .1a href="+code=s" class="sref">stia>->1a href="+code=n_chan" class="sref">n_chantia>       = 1a href="+code=ao_n_chan" class="sref">ao_n_chantia>;e.3381/a>               .1a href="+code=s" class="sref">stia>->1a href="+code=maxdata" class="sref">maxdata1/a>      =.0x3fff;e.339tia>               .1a href="+code=s" class="sref">stia>->1a href="+code=range_table" class="sref">range_tabletia>  = &1a href="+code=apci3501_ao_range" class="sref">apci3501_ao_rangetia>;e.340tia>               .1a href="+code=s" class="sref">stia>->1a href="+code=insn_write" class="sref">insn_writetia>   = 1a href="+code=apci3501_ao_insn_write" class="sref">apci3501_ao_insn_writetia>;e.3411/a>e.3421/a>               .1a href="+code=ret" class="sref">rettia> = 1a href="+code=comedi_alloc_subdev_readback" class="sref">comedi_alloc_subdev_readbacktia>(1a href="+code=s" class="sref">stia>);e.3431/a>               .if (1a href="+code=ret" class="sref">rettia>)e.3441/a>               .        return 1a href="+code=ret" class="sref">rettia>;e.3451/a>        }.else {e.3441/a>               . 1a href="ia>;.1a href="+code=i" c3ass="3ref">itia>++) return 0;eoffsett3a> = 1a href="+code=i" c3ass="34f">ENOMEMtia>;eaddrtia>>e.3321/a>        1spal class="commnsigned c3ar.1a href="+code=func" 3lass=3sref">functia>ue.3331/a>        1a href="+code=s" class="sre1">stia> = &1a href="+code=dev" class="sref">devtia>->1aunsigned 3hort.1a href="+code=val"3class35L270">.2701/a>e.3441/a>               .3501.c#L231" id vL251" class="line3 nam 3vL251">.2511/af="drivers/staging/comedi/drivers/addi_apci_3501.c#L336" id vL336" class="line" nam  vL336">.336tia>               .1a hr    +code=s" class="sref">s    +codL344" id vL344" class="line" nam  vL344">.3441/a>               .3dev_readbe=offset" class="sref">o3fsett35vice */1/spalue.3372" id vL344" class="line" nam  vL344">.3441/a>               .3          href="+code=offset" cla3s="sr35cidevtia>, 0);e.33811" id vL344" class="line" nam  vL344">.3441/a>               .3       re4" id vL254" class="line3 nam 35L314">.3141/a>e.339tia>               .1a hrm  vL3rivers/class="line" nam  vL3rivers/L344" id vL344" class="line" nam  vL344">.3441/a>               .3L345" claUTPUT" class="sref">EEPR3M_ANA35L325">.3251/a>e.32a>               .1a href="line" vbiting/comedi/drive.1a href="line" vbitiL344" id vL344" class="line" nam  vL344">.3441/a>               .31a href="href="+code=addr" class=3sref"35ref">devtia>);evaltia> &g3;>34) &.0x3ff>e.3321/a>        1spal class="commL258" cla3s="line" nam  vL258">.2531/a> 35L318">.318tia>e.3331/a>        1a href="+code=s" class="sre2">stia> = &1a href="+code=dev" class="sref">devtia>->1a59" id vL359" class="line" nam  vL359">.36ref">functia>uestiD>->1a href="+code=type" class="sref">type1/a>         = 1a hrefL260" cla3s="line" nam  vL260">.263tia> 36L270">.2701/a>e.336tia>               .1a href="+code=s" class="sref">stia>->1a ;1a href="+code=type" class="sref">type1/a>         = 1a hrefL501.c#L23" id vL261" class="line"3nam  36L251">.2511/af="drivers/staging/comedi/drivers/addi_apci_3501.c#L336" id vL337" class="line" nam  vL337">.3372" id vL344" class="line" nam  vL344">.3441/a>               .3501.c#L232" id vL262" class="line3 nam 36vice */1/spalue.33811" id vL344" class="line" nam  vL344">.3441/a>               .di_device3ia> *1a href="+code=dev"3class36cidevtia>, 0);e.339tia>               .1a hrm  vL3rivers/class="line" nam  vL3rivers/L344" id vL344" class="line" nam  vL344">.3441/a>               .edi_subde3icetia> *1a href="+code=3" cla36L314">.3141/a>e.32a>               .1a href="oine" vbiting/comedi/drive.1a href="oine" vbitiL344" id vL344" class="line" nam  vL344">.3441/a>               .di_insnti3> *1a href="+code=insn" 3lass=36235">.2351/a>}ee.3321/a>        1spal class="comm501.c#L263" id vL267" class="line"3nam  36L327">.3271/a>e.3331/a>        1a href="+code=s" class="sre3">stia> = &1a href="+code=dev" class="sref">devtia>->1a5258" cla3href="+code=private" cla3s="sr36L318">.318tia>e.3441/a>               .>1a hr3f="+code=chanspec" class3"sref3>chanspectia>);e.2701/a>e.3321/a>        1spal class="commcctia>, 23*.1a href="+code=addr" c3ass="37L251">.2511/af="drivers/staging/comedi/drivers/adivers/addi_apci_3501.c#L333" id vL333" class="line" nam  vL333">.3331/a>        1a href="+code=s" class="sre4">stia> = &1a href="+code=dev" class="sref">devtia>->1a3501.c#L232" id vL272" class="line3 nam 37vice */1/spalue.3441/a>               .&i_device3tia>->1a href="+code=3" cla37cidevtia>, 0);e.336tia>               .1a hr    +code=s" class="sref">s    +codL344 1a href="+code=SDF_WRINTERN href="+code=APCIF_WRINTERN hL344" id vL344" class="line" nam  vL344">.3441/a>               .&di_subde3" id vL274" class="line"3nam  37L314">.3141/a>e.337256" id vL344" class="line" nam  vL344">.3441/a>               .&i_insnti35" id vL275" class="line3 nam 37L325">.3251/a>e.3381/af               .1a href="+code=s" class="sref">stia>->1a hrefdi_device3ia> *1a href="+code=dev"3class377325">.3251/a>e.32a>               .1a href=comedi/drivers/addi_apci_3501.c#L263" id vL263" class="line"            .1a href="+code=s" class="sref">stia>->1a hrefd01.c#L263" id vL277" class="line"3nam  37f">ENOMEMtia>;e.318tia>ecomedi_alloc_su>        3nt.1a href="+code=chan" 3lass=389tia>        }e      3 int.1a href="+code=ret"3class38     return 0;erettia>;e.2621/void>               .1a href="edrivers/addi_apci_3501.c#L30"edriv76" id vL276" class="line" nam  vL276">.276tia>static int.1a href="+code=apci3501_reset" class="sref">apci3501_resettia>(struct.1a href="+code=comedi_device" class="sref">com3code=APCI3501_DO_REG" class="sref"3APCI3301_DO_ef="drivers/staging/comedi/drivers/addi_apci_3501.c#L345" id 3501.c#L234" id vL284" class="line3 nam 3vL284">.2841/af="drivers/staging/ers/staging/comedi/drivers/addi_apci_3501.c#L324" id vL324" class="line" namettia>(struct.1a href="+code=comedi_device" class="sref">com3ci_insnti3t all analog outputs to 3V (bi38      }.else {ecomedi_alloc_su>i_device3AR" class="sref">APCI3503_AO_C387325">.3251/a>e."edrivers/addi_apci_3m  vL319">."edriv76" idi_apci_3501.c#L333" id vL333" class="liode=comedi_alloc_subdev_readback" class="sref">comedi_alloc_su>01.c#L263class="sref">APCI3501_AO3CTRL_3TATUS_return 0;eAPCI3531_AO_3ATA_VALtia>(0);e.2621/d vL276" class="line" nam  vL2/come276tia>static int.1a hr/come325">               .1a href="/come276tia>static i.1a href="/come6tia>  ef="drivers/staging/comedi/drivers/addi_apci_3501.c#L345" id ss="comme3t">/* Set all analog out3ut ch3nnels */1/spal.di_apci_3501.c#Laddi__log 3" id vL333" claaddi__log ine">.32a> /comedi/drivers/addi_apci_ci_3501.c#L345L295">.2951/a>               .          .......1spal class="string">"3 < 8;.3a href="+code=chan" clas3="sre3">chantia>++) .di_apci_3501.c#modu" class="line" namodu"  nam  vL3="+co    .if (1a hrlaTHIS_MODUode=s" class="sreTHIS_MODUod nam>               .          .......1spal class="string">"3 /* Reset3ia>(1a href="+code=dev" 3lass=3sref">devtia>).di_apci_3501.c#comedi/drivers/addi_apci_35" id vL306" cl>.32a>               .1a href=comedi/drivers/addi_apci_3501.c#L306" id vL306" cl>               .          .......1spal class="string">"3 ode=APCI3f (1a href="+code=ret" c3ass="3ref">rettia>) .di_apci_3501.c#Ledrivers/addi_apci_3"edriv76"   vL3="+co    .if (1a hrla.1a href="edrivers/addi_apci_3501.c#L30"edriv76" >               .          .......1spal class="string">"3 501.c#L23="+code=class_dev" class3"sref3>class}de=comedi_alloc_subdev_readback" class="sref">comedi_alloc_su%s: D3C not-ready for channel 3#37;i39235">.2351/a>}ec>.3051/a>estia>->1a hrs/aL26ba76" id vL276" class="line" ping/comedi/drivers/addi_apci_3501.c#L309" id vL30"sref">apci3501_auto_attachtia>(struct.1a href="+code=comedi_device" class="sref">comelass="lin3" nam  vL297">.2971/a>  3     3      .}.else {e.3071/a>               .................unsigned long.1a hrefTA_CHANti3>(1a href="+code=chan" c3ass="3ref">cef="drivers/staging/comedi/drivers/addi_apci_3501.c#L345" id4501_AO_DA4A_REG" class="sref">APCI4501_A409tia>        }ee.6" idconfigers/addi_apci_3m  vL319">.6" idconfig76" idi_apci_3501.c#L333" id vL333" class="li,               .1a href="+code"/come276tia>static i.1a href="/come6tiaclass="line" nam iaddi_apci_3501.ci307">s/addi_apci_3501.c#Laaddi__ers/staging/comedi/daddi__ers/="liode=comedi_alloc_subdev_readback" class="sref">comedi_alloc_s4L300" cla4s="line" nam  vL300">.304tia> 40     return 0;e.401tia>        }e.2621/const>{e.3041/a> 40ef">rettia>) {1a href="driversPCI_DEVICde=s" class="srePCI_DEVICd76" idi_apci_3501.c#PCI_VENDOR_ID_ADDI->e=s" class="srePCI_VENDOR_ID_ADDI->6tiacl0x3001) }chtia>(struct.1a href="+code=comedi_device" class="sref">com4501.c#L304" id vL304" class="line"4nam  405f">rettia>) {10 return 0;ecomedi_alloc_s4di_device4ia> *1a href="+code=dev"4class4"sref"di_apci_3501.c#MODUod_DEVICd_"+code=s" class="sreMODUod_DEVICd_"+cod76" idi_apci_3501.c#medddi_apci_3501.cgin6tiaclass="line" nam /staging/rs/a339" class="line" na/staging/rs/a339" ="srode=comedi_alloc_subdev_readback" class="sref">comedi_alloc_s4L8_device4i nam  vL297">.2971/a>  4">con40f">ENOMEMtia>;e>.2621/d vL276" class="line" ging//come276tia>static iging//come_3501a href="drivers/staging/rs/a"/come276tia>static i.1a href=ging//come_3501  ef="drivers/staging/comedi/drivers/addi_apci_3501.c#L345" id4o_pci_dev4ia>(1a href="+code=dev" 4lass=4sref">devtia>).di_apci_3501.c#log 3" id vL333" cllog ine">.32vL3="+co  /comedi/drivers/addi_apci_ci_3501.c#L345L295">.2951/a>               .          .......1spal class="string">"4etia> *1a4href="+code=devpriv" cla4s="sr41nels */1/spal.di_apci_3501.c#ida339" class="line" naida339"   vL337">.337ass="line" nam /staging/rs/a339" class="line" na/staging/rs/a339" ="sr>               .          .......1spal class="string">"4e1" id vL4icetia> *1a href="+code=4" cla41>chantia>++) .di_apci_3501.c#L26bass="sref">stia>L26ba76" .32vL3="+co   href="drivers/staging/rs/aL26bass="sref">stia>->1a hrs/aL26ba76" >               .          .......1spal class="string">"4e501.c#L34="+code=ao_n_chan" class4"sref41ref">devtia>).di_apci_3501.c#remov class="line" namemov 76"   vL3="+co    .if (1a hrlam  vL319">.6" idunconfigers/addi_apci_3m  vL319">.6" idunconfig76" >               .          .......1spal class="string">"4e303" cla4 int.1a href="+code=ret"4class4"sref"}de=comedi_alloc_subdev_readback" class="sref">comedi_alloc_s43501.c#L344" id vL314" class="line4 nam 4vL314"di_apci_3501.c#modu" _m  vL319">."/come276tia>static imodu" _m  vL319">."/come76" idi_apci_3501.c#ef="+code"/come276tia>static i.1a href="/come6tiaclass="line" nam /staging/rs/a"/come276tia>static i.1a href=ging//come_350ode=comedi_alloc_subdev_readback" class="sref">comedi_alloc_s4eof(*1a h4ef="+code=devpriv" class4"sref41235">.2351/a>}eMODUod_DESCRIPTILE76" id/comedi/drivers/addi_apci_ADDI--> ref"-ddi_ A/addi_apci_35boardL295">.2951/aode=comedi_alloc_subdev_readback" class="sref">comedi_alloc_s4e8_device4a href="+code=ENOMEM" cl4ss="s4ef">ENdi_apci_3501.c#MODUod_AUTHO"line" nam  vL28MODUod_AUTHO"76" id/comedi/drivers/addi_apci_Cack"  http://www.back" .orgL295">.2951/aode=comedi_alloc_subdev_readback" class="sref">comedi_alloc_s4e01.c#L3048" id vL318" class="line4 nam 4vL318"di_apci_3501.c#MODUod_LICdNSde=s" class="sreMODUod_LICdNSd76" id/comedi/drivers/addi_apci_GPLL295">.2951/aode=comedi_alloc_subdev_readback" class="sref">comedi_alloc_s4ci_enable4ia>(1a href="+code=dev" 4lass=4sref">
The ori_real LXR software byriver=comedi_ahttp://>devtiforge.net/projects/lxe2>LXR iverunity6tiaclthis experirs/sal s="sion byr=comedi_amailto:lxe@="+ux.no">lxe@="+ux.no6tia. lxe.="+ux.no kindly hosted byr=comedi_ahttp://www.redpill-="+pro.no">Redpill L"+pro AS6tiaclprovider of L"+ux/consultrea and oper262ons serclass since 1995.