Skip to contentSkip to conversation

Driver for GE PIO2 VME Card

PATCH Superseded Martyn Welch 2 participants 3 messages Nov 7, 2011 – Nov 8, 2011 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Driver for GE PIO2 VME Card

From: Martyn Welch <[email protected]>

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.

 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..cdba609 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
+	  If you say Y here you have a GE PIO2. The PIO2 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.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called vme_pio2.
+
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
#1 lore raw

drivers/staging/vme/devices/Kconfig config VME_USER · line 13

Quoted 1 line · Martyn Welch
drivers/staging/vme/devices/Kconfig +1 -0
+	  If you say Y here you have a GE PIO2. The PIO2 is a 6U VME Card,

I've tried that about a dozen times and I still don't have a GE PIO2. But perhaps its very small, than I might have simply overlooked it...

Paul Bolle

#2 lore raw
Quoted 6 lines · Paul Bolle

drivers/staging/vme/devices/Kconfig config VME_USER · line 13

Quoted 1 line · Martyn Welch
drivers/staging/vme/devices/Kconfig +1 -0
+	  If you say Y here you have a GE PIO2. The PIO2 is a 6U VME Card,

I've tried that about a dozen times and I still don't have a GE PIO2. But perhaps its very small, than I might have simply overlooked it...

Agh! Sorry, don't know how I missed that one.

Martyn

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