staging: comedi: ni_labpc_isadma: new module for ISA DMA support
authorIan Abbott <abbotti@mev.co.uk>
Fri, 28 Jun 2013 16:09:19 +0000 (17:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 21:27:51 +0000 (14:27 -0700)
It's just an empty module at the moment, selected by COMEDI_NI_LABPC_ISA
&& ISA_DMA_API && VIRT_TO_BUS, but will be populated by later patches to
migrate ISA DMA support for NI Lab-PC cards out of the "ni_labpc"
module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/Kconfig
drivers/staging/comedi/drivers/Makefile
drivers/staging/comedi/drivers/ni_labpc.c
drivers/staging/comedi/drivers/ni_labpc_isadma.c [new file with mode: 0644]
drivers/staging/comedi/drivers/ni_labpc_isadma.h [new file with mode: 0644]

index b9dc94a..b6e8faa 100644 (file)
@@ -492,6 +492,7 @@ config COMEDI_NI_ATMIO16D
 config COMEDI_NI_LABPC_ISA
        tristate "NI Lab-PC and compatibles ISA support"
        select COMEDI_NI_LABPC
+       select COMEDI_NI_LABPC_ISADMA if ISA_DMA_API && VIRT_TO_BUS
        depends on VIRT_TO_BUS
        ---help---
          Enable support for National Instruments Lab-PC and compatibles
@@ -1272,6 +1273,9 @@ config COMEDI_NI_LABPC
        select COMEDI_8255
        select COMEDI_FC
 
+config COMEDI_NI_LABPC_ISADMA
+       tristate
+
 config COMEDI_NI_TIO
        tristate
 
index 643e551..94cbd26 100644 (file)
@@ -132,6 +132,7 @@ obj-$(CONFIG_COMEDI_MITE)           += mite.o
 obj-$(CONFIG_COMEDI_NI_TIO)            += ni_tio.o
 obj-$(CONFIG_COMEDI_NI_TIOCMD)         += ni_tiocmd.o
 obj-$(CONFIG_COMEDI_NI_LABPC)          += ni_labpc.o
+obj-$(CONFIG_COMEDI_NI_LABPC_ISADMA)   += ni_labpc_isadma.o
 
 obj-$(CONFIG_COMEDI_8255)              += 8255.o
 obj-$(CONFIG_COMEDI_AMPLC_DIO200)      += amplc_dio200_common.o
index 65ab8f6..d1d22a1 100644 (file)
@@ -71,6 +71,7 @@
 #include "8255.h"
 #include "comedi_fc.h"
 #include "ni_labpc.h"
+#include "ni_labpc_isadma.h"
 
 /*
  * Register map (all registers are 8-bit)
diff --git a/drivers/staging/comedi/drivers/ni_labpc_isadma.c b/drivers/staging/comedi/drivers/ni_labpc_isadma.c
new file mode 100644 (file)
index 0000000..586ea54
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * comedi/drivers/ni_labpc_isadma.c
+ * ISA DMA support for National Instruments Lab-PC series boards and
+ * compatibles.
+ *
+ * Extracted from ni_labpc.c:
+ * Copyright (C) 2001-2003 Frank Mori Hess <fmhess@users.sourceforge.net>
+ *
+ * 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.
+ */
+
+#include <linux/module.h>
+
+#include "ni_labpc_isadma.h"
+
+static int __init ni_labpc_isadma_init_module(void)
+{
+       return 0;
+}
+module_init(ni_labpc_isadma_init_module);
+
+static void __exit ni_labpc_isadma_cleanup_module(void)
+{
+}
+module_exit(ni_labpc_isadma_cleanup_module);
+
+MODULE_AUTHOR("Comedi http://www.comedi.org");
+MODULE_DESCRIPTION("Comedi NI Lab-PC ISA DMA support");
+MODULE_LICENSE("GPL");
diff --git a/drivers/staging/comedi/drivers/ni_labpc_isadma.h b/drivers/staging/comedi/drivers/ni_labpc_isadma.h
new file mode 100644 (file)
index 0000000..ac644f0
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * ni_labpc ISA DMA support.
+*/
+
+#ifndef _NI_LABPC_ISADMA_H
+#define _NI_LABPC_ISADMA_H
+
+#define NI_LABPC_HAVE_ISA_DMA  IS_ENABLED(CONFIG_COMEDI_NI_LABPC_ISADMA)
+
+#if NI_LABPC_HAVE_ISA_DMA
+
+#else
+
+#endif
+
+#endif /* _NI_LABPC_ISADMA_H */