int i;
int board_index;
- dev_info(dev->hw_dev, "comedi%d: adv_pci1710:\n", dev->minor);
+ dev_info(dev->class_dev, DRV_NAME ": attach\n");
opt_bus = it->options[0];
opt_slot = it->options[1];
if (!pcidev) {
if (opt_bus || opt_slot) {
- dev_err(dev->hw_dev, "- Card at b:s %d:%d %s\n",
+ dev_err(dev->class_dev, "- Card at b:s %d:%d %s\n",
opt_bus, opt_slot, errstr);
} else {
- dev_err(dev->hw_dev, "- Card %s\n", errstr);
+ dev_err(dev->class_dev, "- Card %s\n", errstr);
}
return -EIO;
}
irq = pcidev->irq;
iobase = pci_resource_start(pcidev, 2);
- dev_dbg(dev->hw_dev, "b:s:f=%d:%d:%d, io=0x%4lx\n", pci_bus, pci_slot,
- pci_func, iobase);
+ dev_dbg(dev->class_dev, "b:s:f=%d:%d:%d, io=0x%4lx\n",
+ pci_bus, pci_slot, pci_func, iobase);
dev->iobase = iobase;
if (request_irq(irq, interrupt_service_pci1710,
IRQF_SHARED, "Advantech PCI-1710",
dev)) {
- dev_dbg(dev->hw_dev, "unable to allocate IRQ %d, DISABLING IT",
+ dev_dbg(dev->class_dev,
+ "unable to allocate IRQ %d, DISABLING IT",
irq);
irq = 0; /* Can't use IRQ */
} else {
- dev_dbg(dev->hw_dev, "irq=%u", irq);
+ dev_dbg(dev->class_dev, "irq=%u", irq);
}
} else {
- dev_dbg(dev->hw_dev, "IRQ disabled");
+ dev_dbg(dev->class_dev, "IRQ disabled");
}
} else {
irq = 0;
}
if (!dev->board_ptr) {
- dev_err(dev->hw_dev, "Error: Requested type of the card was not found!\n");
+ dev_err(dev->class_dev,
+ "Error: Requested type of the card was not found!\n");
return -EIO;
}
if (comedi_pci_enable(pcidev, dev->driver->driver_name)) {
- dev_err(dev->hw_dev, "Error: Can't enable PCI device and request regions!\n");
+ dev_err(dev->class_dev,
+ "Error: Can't enable PCI device and request regions!\n");
return -EIO;
}
iobase = pci_resource_start(pcidev, this_board->main_pci_region);
- dev_dbg(dev->hw_dev, "b:s:f=%d:%d:%d, io=0x%4lx\n",
+ dev_dbg(dev->class_dev, "b:s:f=%d:%d:%d, io=0x%4lx\n",
pcidev->bus->number, PCI_SLOT(pcidev->devfn),
PCI_FUNC(pcidev->devfn), iobase);
return das16cs_boards + i;
}
- dev_dbg(dev->hw_dev, "unknown board!\n");
+ dev_dbg(dev->class_dev, "unknown board!\n");
return NULL;
}
int ret;
int i;
- dev_dbg(dev->hw_dev, "comedi%d: cb_das16_cs: attached\n", dev->minor);
+ dev_dbg(dev->class_dev, "cb_das16_cs: attach\n");
link = cur_dev; /* XXX hack */
if (!link)
return -EIO;
dev->iobase = link->resource[0]->start;
- dev_dbg(dev->hw_dev, "I/O base=0x%04lx\n", dev->iobase);
+ dev_dbg(dev->class_dev, "I/O base=0x%04lx\n", dev->iobase);
- dev_dbg(dev->hw_dev, "fingerprint:\n");
+ dev_dbg(dev->class_dev, "fingerprint:\n");
for (i = 0; i < 48; i += 2)
- dev_dbg(dev->hw_dev, "%04x\n", inw(dev->iobase + i));
+ dev_dbg(dev->class_dev, "%04x\n", inw(dev->iobase + i));
ret = request_irq(link->irq, das16cs_interrupt,
dev->irq = link->irq;
- dev_dbg(dev->hw_dev, "irq=%u\n", dev->irq);
+ dev_dbg(dev->class_dev, "irq=%u\n", dev->irq);
dev->board_ptr = das16cs_probe(dev, link);
if (!dev->board_ptr)
break;
}
if (to == TIMEOUT) {
- dev_dbg(dev->hw_dev, "cb_das16_cs: ai timeout\n");
+ dev_dbg(dev->class_dev, "cb_das16_cs: ai timeout\n");
return -ETIME;
}
data[i] = (unsigned short)inw(dev->iobase + 0);
}
}
- dev_err(dev->hw_dev, "No supported ComputerBoards/MeasurementComputing card found on requested position\n");
+ dev_err(dev->class_dev,
+ "No supported ComputerBoards/MeasurementComputing card found on requested position\n");
return -EIO;
found:
- dev_dbg(dev->hw_dev, "Found %s on bus %i, slot %i\n",
+ dev_dbg(dev->class_dev, "Found %s on bus %i, slot %i\n",
cb_pcidas_boards[index].name, pcidev->bus->number,
PCI_SLOT(pcidev->devfn));
* Enable PCI device and reserve I/O ports.
*/
if (comedi_pci_enable(pcidev, "cb_pcidas")) {
- dev_err(dev->hw_dev, "Failed to enable PCI device and request regions\n");
+ dev_err(dev->class_dev,
+ "Failed to enable PCI device and request regions\n");
return -EIO;
}
/*
/* get irq */
if (request_irq(devpriv->pci_dev->irq, cb_pcidas_interrupt,
IRQF_SHARED, "cb_pcidas", dev)) {
- dev_dbg(dev->hw_dev, "unable to allocate irq %d\n",
+ dev_dbg(dev->class_dev, "unable to allocate irq %d\n",
devpriv->pci_dev->irq);
return -EINVAL;
}
unsigned int source = data[1];
if (source >= num_calibration_sources) {
- dev_err(dev->hw_dev, "invalid calibration source: %i\n",
+ dev_err(dev->class_dev, "invalid calibration source: %i\n",
source);
return -EINVAL;
}
outw(bits, devpriv->control_status + ADCMUX_CONT);
#ifdef CB_PCIDAS_DEBUG
- dev_dbg(dev->hw_dev, "comedi: sent 0x%x to adcmux control\n", bits);
+ dev_dbg(dev->class_dev, "sent 0x%x to adcmux control\n", bits);
#endif
/* load counters */
devpriv->adc_fifo_bits |= INT_FHF; /* interrupt fifo half full */
}
#ifdef CB_PCIDAS_DEBUG
- dev_dbg(dev->hw_dev, "comedi: adc_fifo_bits are 0x%x\n",
+ dev_dbg(dev->class_dev, "adc_fifo_bits are 0x%x\n",
devpriv->adc_fifo_bits);
#endif
/* enable (and clear) interrupts */
bits |= BURSTE;
outw(bits, devpriv->control_status + TRIG_CONTSTAT);
#ifdef CB_PCIDAS_DEBUG
- dev_dbg(dev->hw_dev, "comedi: sent 0x%x to trig control\n", bits);
+ dev_dbg(dev->class_dev, "sent 0x%x to trig control\n", bits);
#endif
return 0;
spin_lock_irqsave(&dev->spinlock, flags);
devpriv->adc_fifo_bits |= DAEMIE | DAHFIE;
#ifdef CB_PCIDAS_DEBUG
- dev_dbg(dev->hw_dev, "comedi: adc_fifo_bits are 0x%x\n",
+ dev_dbg(dev->class_dev, "adc_fifo_bits are 0x%x\n",
devpriv->adc_fifo_bits);
#endif
/* enable and clear interrupts */
devpriv->ao_control_bits |= DAC_START | DACEN | DAC_EMPTY;
outw(devpriv->ao_control_bits, devpriv->control_status + DAC_CSR);
#ifdef CB_PCIDAS_DEBUG
- dev_dbg(dev->hw_dev, "comedi: sent 0x%x to dac control\n",
+ dev_dbg(dev->class_dev, "sent 0x%x to dac control\n",
devpriv->ao_control_bits);
#endif
spin_unlock_irqrestore(&dev->spinlock, flags);
s5933_status = inl(devpriv->s5933_config + AMCC_OP_REG_INTCSR);
#ifdef CB_PCIDAS_DEBUG
- dev_dbg(dev->hw_dev, "intcsr 0x%x\n", s5933_status);
- dev_dbg(dev->hw_dev, "mbef 0x%x\n",
+ dev_dbg(dev->class_dev, "intcsr 0x%x\n", s5933_status);
+ dev_dbg(dev->class_dev, "mbef 0x%x\n",
inl(devpriv->s5933_config + AMCC_OP_REG_MBEF));
#endif
return -EIO;
}
- dev_dbg(dev->hw_dev, "Found %s on bus %i, slot %i\n", board(dev)->name,
- pcidev->bus->number, PCI_SLOT(pcidev->devfn));
+ dev_dbg(dev->class_dev, "Found %s on bus %i, slot %i\n",
+ board(dev)->name, pcidev->bus->number, PCI_SLOT(pcidev->devfn));
if (comedi_pci_enable(pcidev, dev->driver->driver_name)) {
- dev_warn(dev->hw_dev, "failed to enable PCI device and request regions\n");
+ dev_warn(dev->class_dev,
+ "failed to enable PCI device and request regions\n");
return -EIO;
}
pci_set_master(pcidev);
if (!priv(dev)->plx9080_iobase || !priv(dev)->main_iobase
|| !priv(dev)->dio_counter_iobase) {
- dev_warn(dev->hw_dev, "failed to remap io memory\n");
+ dev_warn(dev->class_dev, "failed to remap io memory\n");
return -ENOMEM;
}
priv(dev)->hw_revision =
hw_revision(dev, readw(priv(dev)->main_iobase + HW_STATUS_REG));
- dev_dbg(dev->hw_dev, "stc hardware revision %i\n",
+ dev_dbg(dev->class_dev, "stc hardware revision %i\n",
priv(dev)->hw_revision);
init_plx9080(dev);
init_stc_registers(dev);
/* get irq */
if (request_irq(pcidev->irq, handle_interrupt, IRQF_SHARED,
"cb_pcidas64", dev)) {
- dev_dbg(dev->hw_dev, "unable to allocate irq %u\n",
+ dev_dbg(dev->class_dev, "unable to allocate irq %u\n",
pcidev->irq);
return -EINVAL;
}
dev->irq = pcidev->irq;
- dev_dbg(dev->hw_dev, "irq %u\n", dev->irq);
+ dev_dbg(dev->class_dev, "irq %u\n", dev->irq);
retval = setup_subdevices(dev);
if (retval < 0)
else
num_calibration_sources = 8;
if (source >= num_calibration_sources) {
- dev_dbg(dev->hw_dev, "invalid calibration source: %i\n",
+ dev_dbg(dev->class_dev, "invalid calibration source: %i\n",
source);
return -EINVAL;
}
}
if (num_samples < 0) {
- dev_err(dev->hw_dev, "cb_pcidas64: bug! num_samples < 0\n");
+ dev_err(dev->class_dev,
+ "cb_pcidas64: bug! num_samples < 0\n");
break;
}
}
}
if (!pcidev) {
- dev_err(dev->hw_dev, "Not a ComputerBoards/MeasurementComputing card on requested position\n");
+ dev_err(dev->class_dev,
+ "Not a ComputerBoards/MeasurementComputing card on requested position\n");
return -EIO;
}
found:
devpriv->pci_dev = pcidev;
dev->board_ptr = cb_pcidda_boards + index;
/* "thisboard" macro can be used from here. */
- dev_dbg(dev->hw_dev, "Found %s at requested position\n",
+ dev_dbg(dev->class_dev, "Found %s at requested position\n",
thisboard->name);
/*
* Enable PCI device and request regions.
*/
if (comedi_pci_enable(pcidev, thisboard->name)) {
- dev_err(dev->hw_dev, "cb_pcidda: failed to enable PCI device and request regions\n");
+ dev_err(dev->class_dev,
+ "cb_pcidda: failed to enable PCI device and request regions\n");
return -EIO;
}
s = dev->subdevices + 2;
subdev_8255_init(dev, s, NULL, devpriv->digitalio + PORT2A);
- dev_dbg(dev->hw_dev, "eeprom:\n");
+ dev_dbg(dev->class_dev, "eeprom:\n");
for (index = 0; index < EEPROM_SIZE; index++) {
devpriv->eeprom_data[index] = cb_pcidda_read_eeprom(dev, index);
- dev_dbg(dev->hw_dev, "%i:0x%x\n", index,
+ dev_dbg(dev->class_dev, "%i:0x%x\n", index,
devpriv->eeprom_data[index]);
}
}
}
- dev_err(dev->hw_dev, "No supported ComputerBoards/MeasurementComputing card found on requested position\n");
+ dev_err(dev->class_dev,
+ "No supported ComputerBoards/MeasurementComputing card found on requested position\n");
return -EIO;
found:
dev->board_name = thisboard->name;
devpriv->pci_dev = pcidev;
- dev_dbg(dev->hw_dev, "Found %s on bus %i, slot %i\n", thisboard->name,
- devpriv->pci_dev->bus->number,
+ dev_dbg(dev->class_dev, "Found %s on bus %i, slot %i\n",
+ thisboard->name, devpriv->pci_dev->bus->number,
PCI_SLOT(devpriv->pci_dev->devfn));
if (comedi_pci_enable(pcidev, thisboard->name))
return -EIO;
for (i = 0; i < thisboard->n_8255; i++) {
subdev_8255_init(dev, dev->subdevices + i,
NULL, devpriv->dio_reg_base + i * 4);
- dev_dbg(dev->hw_dev, "subdev %d: base = 0x%lx\n", i,
+ dev_dbg(dev->class_dev, "subdev %d: base = 0x%lx\n", i,
devpriv->dio_reg_base + i * 4);
}
}
}
- dev_err(dev->hw_dev, "No supported ComputerBoards/MeasurementComputing card found on requested position\n");
+ dev_err(dev->class_dev,
+ "No supported ComputerBoards/MeasurementComputing card found on requested position\n");
return -EIO;
found:
- dev_dbg(dev->hw_dev, "Found %s on bus %i, slot %i\n",
+ dev_dbg(dev->class_dev, "Found %s on bus %i, slot %i\n",
cb_pcimdas_boards[index].name, pcidev->bus->number,
PCI_SLOT(pcidev->devfn));
case 0x56:
break;
default:
- dev_dbg(dev->hw_dev, "THIS CARD IS UNSUPPORTED.\n"
+ dev_dbg(dev->class_dev, "THIS CARD IS UNSUPPORTED.\n");
+ dev_dbg(dev->class_dev,
"PLEASE REPORT USAGE TO <mocelet@sucs.org>\n");
}
if (comedi_pci_enable(pcidev, "cb_pcimdas")) {
- dev_err(dev->hw_dev, "Failed to enable PCI device and request regions\n");
+ dev_err(dev->class_dev,
+ "Failed to enable PCI device and request regions\n");
return -EIO;
}
devpriv->BADR3 = pci_resource_start(devpriv->pci_dev, 3);
devpriv->BADR4 = pci_resource_start(devpriv->pci_dev, 4);
- dev_dbg(dev->hw_dev, "devpriv->BADR0 = 0x%lx\n", devpriv->BADR0);
- dev_dbg(dev->hw_dev, "devpriv->BADR1 = 0x%lx\n", devpriv->BADR1);
- dev_dbg(dev->hw_dev, "devpriv->BADR2 = 0x%lx\n", devpriv->BADR2);
- dev_dbg(dev->hw_dev, "devpriv->BADR3 = 0x%lx\n", devpriv->BADR3);
- dev_dbg(dev->hw_dev, "devpriv->BADR4 = 0x%lx\n", devpriv->BADR4);
+ dev_dbg(dev->class_dev, "devpriv->BADR0 = 0x%lx\n", devpriv->BADR0);
+ dev_dbg(dev->class_dev, "devpriv->BADR1 = 0x%lx\n", devpriv->BADR1);
+ dev_dbg(dev->class_dev, "devpriv->BADR2 = 0x%lx\n", devpriv->BADR2);
+ dev_dbg(dev->class_dev, "devpriv->BADR3 = 0x%lx\n", devpriv->BADR3);
+ dev_dbg(dev->class_dev, "devpriv->BADR4 = 0x%lx\n", devpriv->BADR4);
/* Dont support IRQ yet */
/* get irq */
struct comedi_insn *insn, unsigned int *data)
{
- dev_dbg(dev->hw_dev, "contec_do_insn_bits called\n");
- dev_dbg(dev->hw_dev, "data: %d %d\n", data[0], data[1]);
+ dev_dbg(dev->class_dev, "contec_do_insn_bits called\n");
+ dev_dbg(dev->class_dev, "data: %d %d\n", data[0], data[1]);
if (insn->n != 2)
return -EINVAL;
if (data[0]) {
s->state &= ~data[0];
s->state |= data[0] & data[1];
- dev_dbg(dev->hw_dev, "out: %d on %lx\n", s->state,
+ dev_dbg(dev->class_dev, "out: %d on %lx\n", s->state,
dev->iobase + thisboard->out_offs);
outw(s->state, dev->iobase + thisboard->out_offs);
}
struct comedi_insn *insn, unsigned int *data)
{
- dev_dbg(dev->hw_dev, "contec_di_insn_bits called\n");
- dev_dbg(dev->hw_dev, "data: %d %d\n", data[0], data[1]);
+ dev_dbg(dev->class_dev, "contec_di_insn_bits called\n");
+ dev_dbg(dev->class_dev, "data: %d %d\n", data[0], data[1]);
if (insn->n != 2)
return -EINVAL;
static void daqboard2000_resetLocalBus(struct comedi_device *dev)
{
- dev_dbg(dev->hw_dev, "daqboard2000_resetLocalBus\n");
+ dev_dbg(dev->class_dev, "daqboard2000_resetLocalBus\n");
writel(DAQBOARD2000_SECRLocalBusHi, devpriv->plx + 0x6c);
udelay(10000);
writel(DAQBOARD2000_SECRLocalBusLo, devpriv->plx + 0x6c);
static void daqboard2000_reloadPLX(struct comedi_device *dev)
{
- dev_dbg(dev->hw_dev, "daqboard2000_reloadPLX\n");
+ dev_dbg(dev->class_dev, "daqboard2000_reloadPLX\n");
writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c);
udelay(10000);
writel(DAQBOARD2000_SECRReloadHi, devpriv->plx + 0x6c);
static void daqboard2000_pulseProgPin(struct comedi_device *dev)
{
- dev_dbg(dev->hw_dev, "daqboard2000_pulseProgPin 1\n");
+ dev_dbg(dev->class_dev, "daqboard2000_pulseProgPin 1\n");
writel(DAQBOARD2000_SECRProgPinHi, devpriv->plx + 0x6c);
udelay(10000);
writel(DAQBOARD2000_SECRProgPinLo, devpriv->plx + 0x6c);
secr = readl(devpriv->plx + 0x6c);
if (!(secr & DAQBOARD2000_EEPROM_PRESENT)) {
#ifdef DEBUG_EEPROM
- dev_dbg(dev->hw_dev, "no serial eeprom\n");
+ dev_dbg(dev->class_dev, "no serial eeprom\n");
#endif
return -EIO;
}
for (retry = 0; retry < 3; retry++) {
#ifdef DEBUG_EEPROM
- dev_dbg(dev->hw_dev, "Programming EEPROM try %x\n", retry);
+ dev_dbg(dev->class_dev, "Programming EEPROM try %x\n", retry);
#endif
daqboard2000_resetLocalBus(dev);
if (cpld_array[i] == 0xff
&& cpld_array[i + 1] == 0x20) {
#ifdef DEBUG_EEPROM
- dev_dbg(dev->hw_dev, "Preamble found at %d\n",
- i);
+ dev_dbg(dev->class_dev,
+ "Preamble found at %d\n", i);
#endif
break;
}
}
if (i >= len) {
#ifdef DEBUG_EEPROM
- dev_dbg(dev->hw_dev, "Programmed\n");
+ dev_dbg(dev->class_dev, "Programmed\n");
#endif
daqboard2000_resetLocalBus(dev);
daqboard2000_reloadPLX(dev);
}
if (!card) {
if (bus || slot)
- dev_err(dev->hw_dev, "no daqboard2000 found at bus/slot: %d/%d\n",
+ dev_err(dev->class_dev,
+ "no daqboard2000 found at bus/slot: %d/%d\n",
bus, slot);
else
- dev_err(dev->hw_dev, "no daqboard2000 found\n");
+ dev_err(dev->class_dev, "no daqboard2000 found\n");
return -EIO;
} else {
u32 id;
subsystem_device << 16) | card->subsystem_vendor;
for (i = 0; i < ARRAY_SIZE(boardtypes); i++) {
if (boardtypes[i].id == id) {
- dev_dbg(dev->hw_dev, "%s\n",
+ dev_dbg(dev->class_dev, "%s\n",
boardtypes[i].name);
dev->board_ptr = boardtypes + i;
}
result = comedi_pci_enable(card, "daqboard2000");
if (result < 0) {
- dev_err(dev->hw_dev, "failed to enable PCI device and request regions\n");
+ dev_err(dev->class_dev,
+ "failed to enable PCI device and request regions\n");
return -EIO;
}
devpriv->got_regions = 1;
if (aux_data && aux_len) {
result = initialize_daqboard2000(dev, aux_data, aux_len);
} else {
- dev_dbg(dev->hw_dev, "no FPGA initialization code, aborting\n");
+ dev_dbg(dev->class_dev,
+ "no FPGA initialization code, aborting\n");
result = -EIO;
}
if (result < 0)
if (ret < 0)
return ret;
- dev_info(dev->hw_dev, "comedi%d: das08_cs:\n", dev->minor);
+ dev_info(dev->class_dev, "das08_cs: attach\n");
/* deal with a pci board */
if (thisboard->bustype == pcmcia) {
if (link == NULL) {
- dev_err(dev->hw_dev, "no pcmcia cards found\n");
+ dev_err(dev->class_dev, "no pcmcia cards found\n");
return -EIO;
}
iobase = link->resource[0]->start;
} else {
- dev_err(dev->hw_dev, "bug! board does not have PCMCIA bustype\n");
+ dev_err(dev->class_dev,
+ "bug! board does not have PCMCIA bustype\n");
return -EINVAL;
}
devpriv->dma_bits |= DMA_CH7_CH5;
break;
default:
- dev_err(dev->hw_dev, " only supports dma channels 5 through 7\n"
- " Dual dma only allows the following combinations:\n"
- " dma 5,6 / 6,7 / or 7,5\n");
+ dev_err(dev->class_dev,
+ "only supports dma channels 5 through 7\n");
+ dev_err(dev->class_dev,
+ "Dual dma only allows the following combinations:\n");
+ dev_err(dev->class_dev,
+ "dma 5,6 / 6,7 / or 7,5\n");
return -EINVAL;
break;
}
if (request_dma(dma0, dev->driver->driver_name)) {
- dev_err(dev->hw_dev, "failed to allocate dma channel %i\n",
- dma0);
+ dev_err(dev->class_dev,
+ "failed to allocate dma channel %i\n", dma0);
return -EINVAL;
}
devpriv->dma0 = dma0;
devpriv->dma_current = dma0;
if (dma1) {
if (request_dma(dma1, dev->driver->driver_name)) {
- dev_err(dev->hw_dev, "failed to allocate dma channel %i\n",
+ dev_err(dev->class_dev,
+ "failed to allocate dma channel %i\n",
dma1);
return -EINVAL;
}
case 0x3:
if (board == das1801st_da || board == das1802st_da ||
board == das1701st_da || board == das1702st_da) {
- dev_dbg(dev->hw_dev, "Board model: %s\n",
+ dev_dbg(dev->class_dev, "Board model: %s\n",
das1800_boards[board].name);
return board;
}
break;
case 0x4:
if (board == das1802hr_da || board == das1702hr_da) {
- dev_dbg(dev->hw_dev, "Board model: %s\n",
+ dev_dbg(dev->class_dev, "Board model: %s\n",
das1800_boards[board].name);
return board;
}
case 0x5:
if (board == das1801ao || board == das1802ao ||
board == das1701ao || board == das1702ao) {
- dev_dbg(dev->hw_dev, "Board model: %s\n",
+ dev_dbg(dev->class_dev, "Board model: %s\n",
das1800_boards[board].name);
return board;
}
break;
case 0x6:
if (board == das1802hr || board == das1702hr) {
- dev_dbg(dev->hw_dev, "Board model: %s\n",
+ dev_dbg(dev->class_dev, "Board model: %s\n",
das1800_boards[board].name);
return board;
}
case 0x7:
if (board == das1801st || board == das1802st ||
board == das1701st || board == das1702st) {
- dev_dbg(dev->hw_dev, "Board model: %s\n",
+ dev_dbg(dev->class_dev, "Board model: %s\n",
das1800_boards[board].name);
return board;
}
break;
case 0x8:
if (board == das1801hc || board == das1802hc) {
- dev_dbg(dev->hw_dev, "Board model: %s\n",
+ dev_dbg(dev->class_dev, "Board model: %s\n",
das1800_boards[board].name);
return board;
}
printk(KERN_CONT "\n");
if (iobase == 0) {
- dev_err(dev->hw_dev, "io base address required\n");
+ dev_err(dev->class_dev, "io base address required\n");
return -EINVAL;
}
board = das1800_probe(dev);
if (board < 0) {
- dev_err(dev->hw_dev, "unable to determine board type\n");
+ dev_err(dev->class_dev, "unable to determine board type\n");
return -ENODEV;
}
if (irq) {
if (request_irq(irq, das1800_interrupt, 0,
dev->driver->driver_name, dev)) {
- dev_dbg(dev->hw_dev, "unable to allocate irq %u\n",
+ dev_dbg(dev->class_dev, "unable to allocate irq %u\n",
irq);
return -EINVAL;
}
devpriv->irq_dma_bits |= 0x38;
break;
default:
- dev_err(dev->hw_dev, "irq out of range\n");
+ dev_err(dev->class_dev, "irq out of range\n");
return -EINVAL;
break;
}
struct comedi_subdevice *s = dev->subdevices;
if (!dev->attached || devpriv->das6402_ignoreirq) {
- dev_warn(dev->hw_dev, "BUG: spurious interrupt\n");
+ dev_warn(dev->class_dev, "BUG: spurious interrupt\n");
return IRQ_HANDLED;
}
#ifdef DEBUG
*/
devpriv->das6402_ignoreirq = 1;
- dev_dbg(dev->hw_dev, "Stopping acquisition\n");
+ dev_dbg(dev->class_dev, "Stopping acquisition\n");
devpriv->das6402_ignoreirq = 1;
outb_p(0x02, dev->iobase + 10); /* disable external trigging */
outw_p(SCANL, dev->iobase + 2); /* resets the card fifo */
struct comedi_subdevice *s, comedi_trig * it)
{
devpriv->das6402_ignoreirq = 1;
- dev_dbg(dev->hw_dev, "Starting acquisition\n");
+ dev_dbg(dev->class_dev, "Starting acquisition\n");
outb_p(0x03, dev->iobase + 10); /* enable external trigging */
outw_p(SCANL, dev->iobase + 2); /* resets the card fifo */
outb_p(IRQ | CONVSRC | BURSTEN | INTE, dev->iobase + 9);
iobase = 0x300;
if (!request_region(iobase, DAS6402_SIZE, "das6402")) {
- dev_err(dev->hw_dev, "I/O port conflict\n");
+ dev_err(dev->class_dev, "I/O port conflict\n");
return -EIO;
}
dev->iobase = iobase;
/* should do a probe here */
irq = it->options[0];
- dev_dbg(dev->hw_dev, "( irq = %u )\n", irq);
+ dev_dbg(dev->class_dev, "( irq = %u )\n", irq);
ret = request_irq(irq, intr_handler, 0, "das6402", dev);
if (ret < 0)
return ret;
switch (id_bits) {
case 0x0:
if (board == das800) {
- dev_dbg(dev->hw_dev, "Board model: DAS-800\n");
+ dev_dbg(dev->class_dev, "Board model: DAS-800\n");
return board;
}
if (board == ciodas800) {
- dev_dbg(dev->hw_dev, "Board model: CIO-DAS800\n");
+ dev_dbg(dev->class_dev, "Board model: CIO-DAS800\n");
return board;
}
- dev_dbg(dev->hw_dev, "Board model (probed): DAS-800\n");
+ dev_dbg(dev->class_dev, "Board model (probed): DAS-800\n");
return das800;
break;
case 0x2:
if (board == das801) {
- dev_dbg(dev->hw_dev, "Board model: DAS-801\n");
+ dev_dbg(dev->class_dev, "Board model: DAS-801\n");
return board;
}
if (board == ciodas801) {
- dev_dbg(dev->hw_dev, "Board model: CIO-DAS801\n");
+ dev_dbg(dev->class_dev, "Board model: CIO-DAS801\n");
return board;
}
- dev_dbg(dev->hw_dev, "Board model (probed): DAS-801\n");
+ dev_dbg(dev->class_dev, "Board model (probed): DAS-801\n");
return das801;
break;
case 0x3:
if (board == das802) {
- dev_dbg(dev->hw_dev, "Board model: DAS-802\n");
+ dev_dbg(dev->class_dev, "Board model: DAS-802\n");
return board;
}
if (board == ciodas802) {
- dev_dbg(dev->hw_dev, "Board model: CIO-DAS802\n");
+ dev_dbg(dev->class_dev, "Board model: CIO-DAS802\n");
return board;
}
if (board == ciodas80216) {
- dev_dbg(dev->hw_dev, "Board model: CIO-DAS802/16\n");
+ dev_dbg(dev->class_dev, "Board model: CIO-DAS802/16\n");
return board;
}
- dev_dbg(dev->hw_dev, "Board model (probed): DAS-802\n");
+ dev_dbg(dev->class_dev, "Board model (probed): DAS-802\n");
return das802;
break;
default:
- dev_dbg(dev->hw_dev, "Board model: probe returned 0x%x (unknown)\n",
+ dev_dbg(dev->class_dev,
+ "Board model: probe returned 0x%x (unknown)\n",
id_bits);
return board;
break;
int board;
int ret;
- dev_info(dev->hw_dev, "comedi%d: das800: io 0x%lx\n", dev->minor,
- iobase);
+ dev_info(dev->class_dev, "das800: io 0x%lx\n", iobase);
if (irq)
- dev_dbg(dev->hw_dev, "irq %u\n", irq);
+ dev_dbg(dev->class_dev, "irq %u\n", irq);
/* allocate and initialize dev->private */
if (alloc_private(dev, sizeof(struct das800_private)) < 0)
return -ENOMEM;
if (iobase == 0) {
- dev_err(dev->hw_dev, "io base address required for das800\n");
+ dev_err(dev->class_dev,
+ "io base address required for das800\n");
return -EINVAL;
}
/* check if io addresses are available */
if (!request_region(iobase, DAS800_SIZE, "das800")) {
- dev_err(dev->hw_dev, "I/O port conflict\n");
+ dev_err(dev->class_dev, "I/O port conflict\n");
return -EIO;
}
dev->iobase = iobase;
board = das800_probe(dev);
if (board < 0) {
- dev_dbg(dev->hw_dev, "unable to determine board type\n");
+ dev_dbg(dev->class_dev, "unable to determine board type\n");
return -ENODEV;
}
dev->board_ptr = das800_boards + board;
/* grab our IRQ */
if (irq == 1 || irq > 7) {
- dev_err(dev->hw_dev, "irq out of range\n");
+ dev_err(dev->class_dev, "irq out of range\n");
return -EINVAL;
}
if (irq) {
if (request_irq(irq, das800_interrupt, 0, "das800", dev)) {
- dev_err(dev->hw_dev, "unable to allocate irq %u\n",
+ dev_err(dev->class_dev, "unable to allocate irq %u\n",
irq);
return -EINVAL;
}
if ((status & DT3000_COMPLETION_MASK) == DT3000_NOERROR)
return 0;
- dev_dbg(dev->hw_dev, "dt3k_send_cmd() timeout/error status=0x%04x\n",
+ dev_dbg(dev->class_dev, "dt3k_send_cmd() timeout/error status=0x%04x\n",
status);
return -ETIME;
if (count < 0)
count += AI_FIFO_DEPTH;
- dev_dbg(dev->hw_dev, "reading %d samples\n", count);
+ dev_dbg(dev->class_dev, "reading %d samples\n", count);
rear = devpriv->ai_rear;
int ret;
unsigned int mode;
- dev_dbg(dev->hw_dev, "dt3k_ai_cmd:\n");
+ dev_dbg(dev->class_dev, "dt3k_ai_cmd:\n");
for (i = 0; i < cmd->chanlist_len; i++) {
chan = CR_CHAN(cmd->chanlist[i]);
range = CR_RANGE(cmd->chanlist[i]);
aref = CR_AREF(cmd->chanlist[0]);
writew(cmd->scan_end_arg, devpriv->io_addr + DPR_Params(0));
- dev_dbg(dev->hw_dev, "param[0]=0x%04x\n", cmd->scan_end_arg);
+ dev_dbg(dev->class_dev, "param[0]=0x%04x\n", cmd->scan_end_arg);
if (cmd->convert_src == TRIG_TIMER) {
divider = dt3k_ns_to_timer(50, &cmd->convert_arg,
cmd->flags & TRIG_ROUND_MASK);
writew((divider >> 16), devpriv->io_addr + DPR_Params(1));
- dev_dbg(dev->hw_dev, "param[1]=0x%04x\n", divider >> 16);
+ dev_dbg(dev->class_dev, "param[1]=0x%04x\n", divider >> 16);
writew((divider & 0xffff), devpriv->io_addr + DPR_Params(2));
- dev_dbg(dev->hw_dev, "param[2]=0x%04x\n", divider & 0xffff);
+ dev_dbg(dev->class_dev, "param[2]=0x%04x\n", divider & 0xffff);
} else {
/* not supported */
}
tscandiv = dt3k_ns_to_timer(100, &cmd->scan_begin_arg,
cmd->flags & TRIG_ROUND_MASK);
writew((tscandiv >> 16), devpriv->io_addr + DPR_Params(3));
- dev_dbg(dev->hw_dev, "param[3]=0x%04x\n", tscandiv >> 16);
+ dev_dbg(dev->class_dev, "param[3]=0x%04x\n", tscandiv >> 16);
writew((tscandiv & 0xffff), devpriv->io_addr + DPR_Params(4));
- dev_dbg(dev->hw_dev, "param[4]=0x%04x\n", tscandiv & 0xffff);
+ dev_dbg(dev->class_dev, "param[4]=0x%04x\n", tscandiv & 0xffff);
} else {
/* not supported */
}
mode = DT3000_AD_RETRIG_INTERNAL | 0 | 0;
writew(mode, devpriv->io_addr + DPR_Params(5));
- dev_dbg(dev->hw_dev, "param[5]=0x%04x\n", mode);
+ dev_dbg(dev->class_dev, "param[5]=0x%04x\n", mode);
writew(aref == AREF_DIFF, devpriv->io_addr + DPR_Params(6));
- dev_dbg(dev->hw_dev, "param[6]=0x%04x\n", aref == AREF_DIFF);
+ dev_dbg(dev->class_dev, "param[6]=0x%04x\n", aref == AREF_DIFF);
writew(AI_FIFO_DEPTH / 2, devpriv->io_addr + DPR_Params(7));
- dev_dbg(dev->hw_dev, "param[7]=0x%04x\n", AI_FIFO_DEPTH / 2);
+ dev_dbg(dev->class_dev, "param[7]=0x%04x\n", AI_FIFO_DEPTH / 2);
writew(SUBS_AI, devpriv->io_addr + DPR_SubSys);
ret = dt3k_send_cmd(dev, CMD_CONFIG);
int bus, slot;
int ret = 0;
- dev_dbg(dev->hw_dev, "dt3000:\n");
+ dev_dbg(dev->class_dev, "dt3000:\n");
bus = it->options[0];
slot = it->options[1];
if (ret < 0)
return ret;
if (ret == 0) {
- dev_warn(dev->hw_dev, "no DT board found\n");
+ dev_warn(dev->class_dev, "no DT board found\n");
return -ENODEV;
}
if (request_irq(devpriv->pci_dev->irq, dt3k_interrupt, IRQF_SHARED,
"dt3000", dev)) {
- dev_err(dev->hw_dev, "unable to allocate IRQ %u\n",
+ dev_err(dev->class_dev, "unable to allocate IRQ %u\n",
devpriv->pci_dev->irq);
return -EINVAL;
}
int i;
struct jr3_pci_dev_private *devpriv = dev->private;
- dev_dbg(dev->hw_dev, "jr3_pci_open\n");
+ dev_dbg(dev->class_dev, "jr3_pci_open\n");
for (i = 0; i < devpriv->n_channels; i++) {
struct jr3_pci_subdev_private *p;
p = dev->subdevices[i].private;
if (p) {
- dev_dbg(dev->hw_dev, "serial: %p %d (%d)\n", p,
+ dev_dbg(dev->class_dev, "serial: %p %d (%d)\n", p,
p->serial_no, p->channel_no);
}
}
break;
more = more
&& read_idm_word(data, size, &pos, &addr);
- dev_dbg(dev->hw_dev, "Loading#%d %4.4x bytes at %4.4x\n",
+ dev_dbg(dev->class_dev,
+ "Loading#%d %4.4x bytes at %4.4x\n",
i, count, addr);
while (more && count > 0) {
if (addr & 0x4000) {
opt_slot = it->options[1];
if (sizeof(struct jr3_channel) != 0xc00) {
- dev_err(dev->hw_dev, "sizeof(struct jr3_channel) = %x [expected %x]\n",
+ dev_err(dev->class_dev,
+ "sizeof(struct jr3_channel) = %x [expected %x]\n",
(unsigned)sizeof(struct jr3_channel), 0xc00);
return -EINVAL;
}
}
}
if (!card) {
- dev_err(dev->hw_dev, "no jr3_pci found\n");
+ dev_err(dev->class_dev, "no jr3_pci found\n");
return -EIO;
} else {
devpriv->pci_dev = card;
p = dev->subdevices[i].private;
p->channel = &devpriv->iobase->channel[i].data;
- dev_dbg(dev->hw_dev, "p->channel %p %p (%tx)\n",
+ dev_dbg(dev->class_dev, "p->channel %p %p (%tx)\n",
p->channel, devpriv->iobase,
((char *)(p->channel) -
(char *)(devpriv->iobase)));
devpriv->iobase->channel[0].reset = 0;
result = comedi_load_firmware(dev, "jr3pci.idm", jr3_download_firmware);
- dev_dbg(dev->hw_dev, "Firmare load %d\n", result);
+ dev_dbg(dev->class_dev, "Firmare load %d\n", result);
if (result < 0)
goto out;
*/
msleep_interruptible(25);
for (i = 0; i < 0x18; i++) {
- dev_dbg(dev->hw_dev, "%c\n",
+ dev_dbg(dev->class_dev, "%c\n",
get_u16(&devpriv->iobase->channel[0].
data.copyright[i]) >> 8);
}
{
int ret;
- dev_info(dev->hw_dev, "comedi%d: ni_pcimio:\n", dev->minor);
+ dev_info(dev->class_dev, "ni_pcimio: attach\n");
ret = ni_alloc_private(dev);
if (ret < 0)
if (ret < 0)
return ret;
- dev_dbg(dev->hw_dev, "%s\n", boardtype.name);
+ dev_dbg(dev->class_dev, "%s\n", boardtype.name);
dev->board_name = boardtype.name;
if (boardtype.reg_type & ni_reg_m_series_mask) {
int divisor1 = 0, divisor2 = 0;
unsigned int seglen;
- dev_dbg(dev->hw_dev, "pcl818_ai_cmd_mode()\n");
+ dev_dbg(dev->class_dev, "pcl818_ai_cmd_mode()\n");
if ((!dev->irq) && (!devpriv->dma_rtc)) {
comedi_error(dev, "IRQ not defined!");
return -EINVAL;
break;
}
#endif
- dev_dbg(dev->hw_dev, "pcl818_ai_cmd_mode() end\n");
+ dev_dbg(dev->class_dev, "pcl818_ai_cmd_mode() end\n");
return 0;
}
struct comedi_cmd *cmd = &s->async->cmd;
int retval;
- dev_dbg(dev->hw_dev, "pcl818_ai_cmd()\n");
+ dev_dbg(dev->class_dev, "pcl818_ai_cmd()\n");
devpriv->ai_n_chan = cmd->chanlist_len;
devpriv->ai_chanlist = cmd->chanlist;
devpriv->ai_flags = cmd->flags;
if (cmd->convert_src == TRIG_TIMER) { /* mode 1 */
devpriv->ai_timer1 = cmd->convert_arg;
retval = pcl818_ai_cmd_mode(1, dev, s);
- dev_dbg(dev->hw_dev, "pcl818_ai_cmd() end\n");
+ dev_dbg(dev->class_dev, "pcl818_ai_cmd() end\n");
return retval;
}
if (cmd->convert_src == TRIG_EXT) { /* mode 3 */
struct comedi_subdevice *s)
{
if (devpriv->irq_blocked > 0) {
- dev_dbg(dev->hw_dev, "pcl818_ai_cancel()\n");
+ dev_dbg(dev->class_dev, "pcl818_ai_cancel()\n");
devpriv->irq_was_now_closed = 1;
switch (devpriv->ai_mode) {
}
end:
- dev_dbg(dev->hw_dev, "pcl818_ai_cancel() end\n");
+ dev_dbg(dev->class_dev, "pcl818_ai_cancel() end\n");
return 0;
}
#ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
- dev_dbg(dev->hw_dev, "write mask: %08x data: %08x\n", data[0],
+ dev_dbg(dev->class_dev, "write mask: %08x data: %08x\n", data[0],
data[1]);
#endif
}
#ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
- dev_dbg(dev->hw_dev, "data_out_byte %02x\n", (unsigned)byte);
+ dev_dbg(dev->class_dev, "data_out_byte %02x\n", (unsigned)byte);
#endif
/* save the digital input lines for this byte.. */
s->state |= ((unsigned int)byte) << offset;
#ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
- dev_dbg(dev->hw_dev, "s->state %08x data_out %08x\n", s->state,
+ dev_dbg(dev->class_dev, "s->state %08x data_out %08x\n", s->state,
data[1]);
#endif
irq[0] = it->options[1];
irq[1] = it->options[2];
- dev_dbg(dev->hw_dev, "comedi%d: %s: io: %lx attached\n", dev->minor,
+ dev_dbg(dev->class_dev, "%s: io: %lx attach\n",
dev->driver->driver_name, iobase);
dev->iobase = iobase;
if (!iobase || !request_region(iobase,
board->num_asics * ASIC_IOSIZE,
dev->driver->driver_name)) {
- dev_err(dev->hw_dev, "I/O port conflict\n");
+ dev_err(dev->class_dev, "I/O port conflict\n");
return -EIO;
}
* convenient macro defined in comedidev.h.
*/
if (alloc_private(dev, sizeof(struct pcmuio_private)) < 0) {
- dev_warn(dev->hw_dev, "cannot allocate private data structure\n");
+ dev_warn(dev->class_dev,
+ "cannot allocate private data structure\n");
return -ENOMEM;
}
kcalloc(n_subdevs, sizeof(struct pcmuio_subdev_private),
GFP_KERNEL);
if (!devpriv->sprivs) {
- dev_warn(dev->hw_dev, "cannot allocate subdevice private data structures\n");
+ dev_warn(dev->class_dev,
+ "cannot allocate subdevice private data structures\n");
return -ENOMEM;
}
irqs.. */
if (irq[0]) {
- dev_dbg(dev->hw_dev, "irq: %u\n", irq[0]);
+ dev_dbg(dev->class_dev, "irq: %u\n", irq[0]);
if (irq[1] && board->num_asics == 2)
- dev_dbg(dev->hw_dev, "second ASIC irq: %u\n", irq[1]);
+ dev_dbg(dev->class_dev, "second ASIC irq: %u\n",
+ irq[1]);
} else {
- dev_dbg(dev->hw_dev, "(IRQ mode disabled)\n");
+ dev_dbg(dev->class_dev, "(IRQ mode disabled)\n");
}
struct comedi_subdevice *s;
int ret;
- dev_dbg(dev->hw_dev, "comedi%d: attached\n", dev->minor);
+ dev_dbg(dev->class_dev, "serial2002: attach\n");
dev->board_name = board->name;
if (alloc_private(dev, sizeof(struct serial2002_private)) < 0)
return -ENOMEM;
dev->close = serial_2002_close;
devpriv->port = it->options[0];
devpriv->speed = it->options[1];
- dev_dbg(dev->hw_dev, "/dev/ttyS%d @ %d\n", devpriv->port,
+ dev_dbg(dev->class_dev, "/dev/ttyS%d @ %d\n", devpriv->port,
devpriv->speed);
ret = comedi_alloc_subdevices(dev, 5);