diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-29 17:42:22 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-18 21:41:25 (GMT) |
commit | 757c1fa9e1f18feaace0243ae590077e25d69cdd (patch) | |
tree | 7f808785355656c9136536d0a84249baaa835134 /drivers | |
parent | 952091f123008fbd0563a462c37f77fe0aa84b2d (diff) | |
download | linux-757c1fa9e1f18feaace0243ae590077e25d69cdd.tar.xz |
staging: comedi: pcl730: add support for Diamond Systems IR104-PBF module
The Diamond Systems IR104-PBF board is a PC/104 module with 20
optoisolated inputs and 20 relay outputs.
This board can be supported by the pcl730 driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregk@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/pcl730.c | 21 |
2 files changed, 21 insertions, 1 deletions
diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index 5d56428..0ce4fba 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -172,6 +172,7 @@ config COMEDI_PCL730 Advantech PCL-734 iso - 32 out Diamond Systems OPMM-1616-XT iso - 16 in/16 out Diamond Systems PEARL-MM-P iso - 16 out + Diamond Systems IR104-PBF iso - 20 in/20 out To compile this driver as a module, choose M here: the module will be called pcl730. diff --git a/drivers/staging/comedi/drivers/pcl730.c b/drivers/staging/comedi/drivers/pcl730.c index 7fb044c..4eef4b4 100644 --- a/drivers/staging/comedi/drivers/pcl730.c +++ b/drivers/staging/comedi/drivers/pcl730.c @@ -19,6 +19,7 @@ * (Advantech) PCL-734 [pcl734] * (Diamond Systems) OPMM-1616-XT [opmm-1616-xt] * (Diamond Systems) PEARL-MM-P [prearl-mm-p] + * (Diamond Systems) IR104-PBF [ir104-pbf] * Author: José Luis Sánchez (jsanchezv@teleline.es) * Status: untested * @@ -93,6 +94,15 @@ * * BASE+0 Isolated outputs 0-7 (write) * BASE+1 Isolated outputs 8-15 (write) + * + * The ir104-pbf board has this register mapping: + * + * BASE+0 Isolated outputs 0-7 (write) (read back) + * BASE+1 Isolated outputs 8-15 (write) (read back) + * BASE+2 Isolated outputs 16-19 (write) (read back) + * BASE+4 Isolated inputs 0-7 (read) + * BASE+5 Isolated inputs 8-15 (read) + * BASE+6 Isolated inputs 16-19 (read) */ struct pcl730_board { @@ -100,6 +110,7 @@ struct pcl730_board { unsigned int io_range; unsigned is_pcl725:1; unsigned is_acl7225b:1; + unsigned is_ir104:1; unsigned has_readback:1; unsigned has_ttl_io:1; int n_subdevs; @@ -194,6 +205,13 @@ static const struct pcl730_board pcl730_boards[] = { .io_range = 0x02, .n_subdevs = 1, .n_iso_out_chan = 16, + }, { + .name = "ir104-pbf", + .io_range = 0x08, + .is_ir104 = 1, + .has_readback = 1, + .n_iso_out_chan = 20, + .n_iso_in_chan = 20, }, }; @@ -292,7 +310,8 @@ static int pcl730_attach(struct comedi_device *dev, s->maxdata = 1; s->range_table = &range_digital; s->insn_bits = pcl730_di_insn_bits; - s->private = board->is_acl7225b ? (void *)2 : + s->private = board->is_ir104 ? (void*)4 : + board->is_acl7225b ? (void *)2 : board->is_pcl725 ? (void *)1 : (void *)0; } |