2014-10-13 12:41:48

by Ian Abbott

[permalink] [raw]
Subject: [PATCH 0/3] staging: comedi: cb_pcimdas: support PCIe-DAS1602/16

Fix up the block comment style and add support for the PCIe-DAS1602/16.
This is the PCI-Express version of the PCIM-DAS1602/16 and is software
compatible with it, apart from a different PCI device ID.

1) staging: comedi: cb_pcimdas: use preferred block comment style
2) staging: comedi: cb_pcimdas: update driver comment
3) staging: comedi: cb_pcimdas: add support for PCIe-DAS1602/16

drivers/staging/comedi/Kconfig | 4 +-
drivers/staging/comedi/drivers/cb_pcimdas.c | 82 ++++++++++++++++-------------
2 files changed, 46 insertions(+), 40 deletions(-)


2014-10-13 12:41:49

by Ian Abbott

[permalink] [raw]
Subject: [PATCH 1/3] staging: comedi: cb_pcimdas: use preferred block comment style

Use the preferred block comment style for the copyright and Comedi
driver description header comments.

Signed-off-by: Ian Abbott <[email protected]>
---
drivers/staging/comedi/drivers/cb_pcimdas.c | 71 +++++++++++++++--------------
1 file changed, 36 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c
index fe4d254..804b3c3 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdas.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdas.c
@@ -1,40 +1,41 @@
/*
- comedi/drivers/cb_pcimdas.c
- Comedi driver for Computer Boards PCIM-DAS1602/16
-
- COMEDI - Linux Control and Measurement Device Interface
- Copyright (C) 2000 David A. Schleef <[email protected]>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-*/
+ * comedi/drivers/cb_pcimdas.c
+ * Comedi driver for Computer Boards PCIM-DAS1602/16
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 2000 David A. Schleef <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
/*
-Driver: cb_pcimdas
-Description: Measurement Computing PCI Migration series boards
-Devices: [ComputerBoards] PCIM-DAS1602/16 (cb_pcimdas)
-Author: Richard Bytheway
-Updated: Wed, 13 Nov 2002 12:34:56 +0000
-Status: experimental
-
-Written to support the PCIM-DAS1602/16 on a 2.4 series kernel.
-
-Configuration Options:
- [0] - PCI bus number
- [1] - PCI slot number
-
-Developed from cb_pcidas and skel by Richard Bytheway ([email protected]).
-Only supports DIO, AO and simple AI in it's present form.
-No interrupts, multi channel or FIFO AI,
-although the card looks like it could support this.
-See http://www.mccdaq.com/PDFs/Manuals/pcim-das1602-16.pdf for more details.
-*/
+ * Driver: cb_pcimdas
+ * Description: Measurement Computing PCI Migration series boards
+ * Devices: [ComputerBoards] PCIM-DAS1602/16 (cb_pcimdas)
+ * Author: Richard Bytheway
+ * Updated: Wed, 13 Nov 2002 12:34:56 +0000
+ * Status: experimental
+ *
+ * Written to support the PCIM-DAS1602/16 on a 2.4 series kernel.
+ *
+ * Configuration Options:
+ * [0] - PCI bus number
+ * [1] - PCI slot number
+ *
+ * Developed from cb_pcidas and skel by Richard Bytheway ([email protected]).
+ * Only supports DIO, AO and simple AI in it's present form.
+ * No interrupts, multi channel or FIFO AI,
+ * although the card looks like it could support this.
+ * See http://www.mccdaq.com/PDFs/Manuals/pcim-das1602-16.pdf for more details.
+ */

#include <linux/module.h>
#include <linux/pci.h>
--
2.1.1

2014-10-13 12:41:51

by Ian Abbott

[permalink] [raw]
Subject: [PATCH 3/3] staging: comedi: cb_pcimdas: add support for PCIe-DAS1602/16

The Measurement Computing PCIe-DAS1602/16 is a PCI-Express version of
the PCIM-DAS1602/16, but has a different PCI device ID. Add support
for this device and update the driver description, Kconfig description
and MODULE_DESCRIPTION.

Thanks to Christoph Langbein for supplying the PCI device ID.

Signed-off-by: Ian Abbott <[email protected]>
---
drivers/staging/comedi/Kconfig | 4 ++--
drivers/staging/comedi/drivers/cb_pcimdas.c | 21 ++++++++++++---------
2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index a8bc2b5..77c5013 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -939,11 +939,11 @@ config COMEDI_CB_PCIDDA
called cb_pcidda.

config COMEDI_CB_PCIMDAS
- tristate "MeasurementComputing PCIM-DAS1602/16 support"
+ tristate "MeasurementComputing PCIM-DAS1602/16, PCIe-DAS1602/16 support"
select COMEDI_8255
---help---
Enable support for ComputerBoards/MeasurementComputing PCI Migration
- series PCIM-DAS1602/16
+ series PCIM-DAS1602/16 and PCIe-DAS1602/16.

To compile this driver as a module, choose M here: the module will be
called cb_pcimdas.
diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c
index 433941a..73e5c96 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdas.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdas.c
@@ -1,6 +1,6 @@
/*
* comedi/drivers/cb_pcimdas.c
- * Comedi driver for Computer Boards PCIM-DAS1602/16
+ * Comedi driver for Computer Boards PCIM-DAS1602/16 and PCIe-DAS1602/16
*
* COMEDI - Linux Control and Measurement Device Interface
* Copyright (C) 2000 David A. Schleef <[email protected]>
@@ -19,24 +19,26 @@
/*
* Driver: cb_pcimdas
* Description: Measurement Computing PCI Migration series boards
- * Devices: [ComputerBoards] PCIM-DAS1602/16 (cb_pcimdas)
+ * Devices: [ComputerBoards] PCIM-DAS1602/16 (cb_pcimdas), PCIe-DAS1602/16
* Author: Richard Bytheway
- * Updated: Wed, 13 Nov 2002 12:34:56 +0000
+ * Updated: Mon, 13 Oct 2014 11:57:39 +0000
* Status: experimental
*
- * Written to support the PCIM-DAS1602/16 on a 2.4 series kernel.
+ * Written to support the PCIM-DAS1602/16 and PCIe-DAS1602/16.
*
* Configuration Options:
* none
*
- * Manual configuration of PCI cards is not supported; they are configured
+ * Manual configuration of PCI(e) cards is not supported; they are configured
* automatically.
*
* Developed from cb_pcidas and skel by Richard Bytheway ([email protected]).
* Only supports DIO, AO and simple AI in it's present form.
* No interrupts, multi channel or FIFO AI,
* although the card looks like it could support this.
- * See http://www.mccdaq.com/PDFs/Manuals/pcim-das1602-16.pdf for more details.
+ *
+ * http://www.mccdaq.com/PDFs/Manuals/pcim-das1602-16.pdf
+ * http://www.mccdaq.com/PDFs/Manuals/pcie-das1602-16.pdf
*/

#include <linux/module.h>
@@ -48,7 +50,7 @@
#include "plx9052.h"
#include "8255.h"

-/* Registers for the PCIM-DAS1602/16 */
+/* Registers for the PCIM-DAS1602/16 and PCIe-DAS1602/16 */

/* DAC Offsets */
#define ADC_TRIG 0
@@ -254,7 +256,8 @@ static int cb_pcimdas_pci_probe(struct pci_dev *dev,
}

static const struct pci_device_id cb_pcimdas_pci_table[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0056) },
+ { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0056) }, /* PCIM-DAS1602/16 */
+ { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0115) }, /* PCIe-DAS1602/16 */
{ 0 }
};
MODULE_DEVICE_TABLE(pci, cb_pcimdas_pci_table);
@@ -268,5 +271,5 @@ static struct pci_driver cb_pcimdas_pci_driver = {
module_comedi_pci_driver(cb_pcimdas_driver, cb_pcimdas_pci_driver);

MODULE_AUTHOR("Comedi http://www.comedi.org");
-MODULE_DESCRIPTION("Comedi low-level driver");
+MODULE_DESCRIPTION("Comedi driver for PCIM-DAS1602/16 and PCIe-DAS1602/16");
MODULE_LICENSE("GPL");
--
2.1.1

2014-10-13 12:42:28

by Ian Abbott

[permalink] [raw]
Subject: [PATCH 2/3] staging: comedi: cb_pcimdas: update driver comment

The Comedi driver comment mentions a couple of manual configuration
options, but manual configuration via the COMEDI_DEVCONFIG ioctl and
comedi "attach" handler is no longer supported by this driver. Update
the comment appropriately.

Signed-off-by: Ian Abbott <[email protected]>
---
drivers/staging/comedi/drivers/cb_pcimdas.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c
index 804b3c3..433941a 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdas.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdas.c
@@ -27,8 +27,10 @@
* Written to support the PCIM-DAS1602/16 on a 2.4 series kernel.
*
* Configuration Options:
- * [0] - PCI bus number
- * [1] - PCI slot number
+ * none
+ *
+ * Manual configuration of PCI cards is not supported; they are configured
+ * automatically.
*
* Developed from cb_pcidas and skel by Richard Bytheway ([email protected]).
* Only supports DIO, AO and simple AI in it's present form.
--
2.1.1

2014-10-14 17:05:22

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH 0/3] staging: comedi: cb_pcimdas: support PCIe-DAS1602/16

On Monday, October 13, 2014 5:41 AM, Ian Abbott wrote:
> Fix up the block comment style and add support for the PCIe-DAS1602/16.
> This is the PCI-Express version of the PCIM-DAS1602/16 and is software
> compatible with it, apart from a different PCI device ID.
>
> 1) staging: comedi: cb_pcimdas: use preferred block comment style
> 2) staging: comedi: cb_pcimdas: update driver comment
> 3) staging: comedi: cb_pcimdas: add support for PCIe-DAS1602/16
>
> drivers/staging/comedi/Kconfig | 4 +-
> drivers/staging/comedi/drivers/cb_pcimdas.c | 82 ++++++++++++++++-------------
> 2 files changed, 46 insertions(+), 40 deletions(-)

Reviewed-by: H Hartley Sweeten <[email protected]>