Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1256971 > unrolled thread

[PATCH 13/16] staging: comedi: comedi_test: allow read-back of AO channels

Started byIan Abbott <abbotti@mev.co.uk>
First post2015-10-27 18:10 +0100
Last post2015-10-27 18:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 13/16] staging: comedi: comedi_test: allow read-back of AO channels Ian Abbott <abbotti@mev.co.uk> - 2015-10-27 18:10 +0100

#1256971 — [PATCH 13/16] staging: comedi: comedi_test: allow read-back of AO channels

FromIan Abbott <abbotti@mev.co.uk>
Date2015-10-27 18:10 +0100
Subject[PATCH 13/16] staging: comedi: comedi_test: allow read-back of AO channels
Message-ID<qofV0-7TL-37@gated-at.bofh.it>
COMEDI drivers often allow the last value written to a channel on an
analog output subdevice to be read back via the "insn_read" handler.
The "comedi_test" driver does not currently support that.  It is a bit
special because it loops back the last values written to the channel on
the analog output subdevice to be read back via corresponding channels
on the analog input subdevice.  The "insn_read" handler for the analog
input subdevice is `waveform_ai_insn_read()`.  Set that as the
"insn_read" handler for the analog output subdevice as well.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/drivers/comedi_test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c
index a750f84..468847a 100644
--- a/drivers/staging/comedi/drivers/comedi_test.c
+++ b/drivers/staging/comedi/drivers/comedi_test.c
@@ -457,6 +457,7 @@ static int waveform_attach(struct comedi_device *dev,
 	s->maxdata = 0xffff;
 	s->range_table = &waveform_ai_ranges;
 	s->insn_write = waveform_ao_insn_write;
+	s->insn_read = waveform_ai_insn_read;	/* do same as AI insn_read */
 
 	/* Our default loopback value is just a 0V flatline */
 	for (i = 0; i < s->n_chan; i++)
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web