Skip to contentSkip to conversation

Driver for GE PIO2 VME Card

PATCH New Martyn Welch 1 participant 1 message Nov 8, 2011 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Driver for GE PIO2 VME Card

This patch implements a driver for the GE PIO2 VME Parallel I/O Card. This card is a 6U VME Card, implementing 32 solid-state relay switched IO lines, in 4 groups of 8. Each bank of IO lines is built to function as input, output or both depending on the variant of the card.

---

This patch provides basic support for the GPIO on the PIO-2 at this point it does not provide support for IRQs generated by GPIO or the 6 counters also provided by the board. However, it does provide a good example of how to write a VME driver for real hardware.

[v2] : Corrections as suggested by Paul Bolle.
[v3] : Fixed missed correction in Kconfig entry.

 drivers/staging/vme/devices/Kconfig         |   12 +
 drivers/staging/vme/devices/Makefile        |    3 
 drivers/staging/vme/devices/vme_pio2.h      |  249 +++++++++++++
 drivers/staging/vme/devices/vme_pio2_cntr.c |   71 ++++
 drivers/staging/vme/devices/vme_pio2_core.c |  524 +++++++++++++++++++++++++++
 drivers/staging/vme/devices/vme_pio2_gpio.c |  227 ++++++++++++
 6 files changed, 1086 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/vme/devices/vme_pio2.h
 create mode 100644 drivers/staging/vme/devices/vme_pio2_cntr.c
 create mode 100644 drivers/staging/vme/devices/vme_pio2_core.c
 create mode 100644 drivers/staging/vme/devices/vme_pio2_gpio.c
drivers/staging/vme/devices/Kconfig +12 -0
index ca5ba89..8f5d286 100644
@@ -6,3 +6,15 @@ config VME_USER
 	  If you say Y here you want to be able to access a limited number of
 	  VME windows in a manner at least semi-compatible with the interface
 	  provided with the original driver at http://vmelinux.org/.
+
+config VME_PIO2
+	tristate "GE PIO2 VME"
+	help
+	  Say Y here to include support for the GE PIO2. The PIO2 is a 6U VME
+	  slave card, implementing 32 solid-state relay switched IO lines, in
+	  4 groups of 8. Each bank of IO lines is built to function as input,
+	  output or both depending on the variant of the card.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called vme_pio2. If unsure, say N.
+
drivers/staging/vme/devices/Makefile +3 -0
index 459742a..172512c 100644
@@ -3,3 +3,6 @@
 #
 
 obj-$(CONFIG_VME_USER)		+= vme_user.o
+
+vme_pio2-objs	:= vme_pio2_cntr.o vme_pio2_gpio.o vme_pio2_core.o
+obj-$(CONFIG_VME_PIO2)         += vme_pio2.o
drivers/staging/vme/devices/vme_pio2.h new file +249 -0

249 lines not on this page · raw message

drivers/staging/vme/devices/vme_pio2_cntr.c new file +71 -0

71 lines not on this page · raw message

drivers/staging/vme/devices/vme_pio2_core.c new file +524 -0

524 lines not on this page · raw message

drivers/staging/vme/devices/vme_pio2_gpio.c new file +227 -0

227 lines not on this page · raw message

--

Martyn Welch (Principal Software Engineer)   |   Registered in England and
GE Intelligent Platforms                     |   Wales (3828642) at 100
T +44(0)127322748                            |   Barbirolli Square, Manchester,
E [email protected]                        |   M2 3AB  VAT:GB 927559189