Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289030
b: refs/heads/master
c: f3445c1
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Feb 9, 2012
1 parent 3dc42d4 commit a98d995
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8383def69b8629df052f917acb844381bdd6e000
refs/heads/master: f3445c1e5915bc554da1ee524b17c5d59e921ebc
12 changes: 9 additions & 3 deletions trunk/drivers/staging/comedi/drivers/me4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -2098,23 +2098,29 @@ static int me4000_dio_insn_config(struct comedi_device *dev,

CALL_PDEBUG("In me4000_dio_insn_config()\n");

if (data[0] == INSN_CONFIG_DIO_QUERY) {
switch (data[0]) {
default:
return -EINVAL;
case INSN_CONFIG_DIO_QUERY:
data[1] =
(s->io_bits & (1 << chan)) ? COMEDI_OUTPUT : COMEDI_INPUT;
return insn->n;
case INSN_CONFIG_DIO_INPUT:
case INSN_CONFIG_DIO_OUTPUT:
break;
}

/*
* The input or output configuration of each digital line is
* configured by a special insn_config instruction. chanspec
* contains the channel to be changed, and data[0] contains the
* value COMEDI_INPUT or COMEDI_OUTPUT.
* value INSN_CONFIG_DIO_INPUT or INSN_CONFIG_DIO_OUTPUT.
* On the ME-4000 it is only possible to switch port wise (8 bit)
*/

tmp = me4000_inl(dev, info->dio_context.ctrl_reg);

if (data[0] == COMEDI_OUTPUT) {
if (data[0] == INSN_CONFIG_DIO_OUTPUT) {
if (chan < 8) {
s->io_bits |= 0xFF;
tmp &= ~(ME4000_DIO_CTRL_BIT_MODE_0 |
Expand Down

0 comments on commit a98d995

Please sign in to comment.