Re: [PATCH] staging: comedi: aio_iiro_16: return input state in async command sample

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/01/15 19:00, H Hartley Sweeten wrote:
Modify the sample data returned by the async command to include the current
state of the digital inputs. Otherwise the command needs to be canceled in
order for the user to do an (*insn_bits) operation to check the digital
inputs.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
  drivers/staging/comedi/drivers/aio_iiro_16.c | 33 ++++++++++++++++++++--------
  1 file changed, 24 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/comedi/drivers/aio_iiro_16.c b/drivers/staging/comedi/drivers/aio_iiro_16.c
index d8884a3..1c7b325 100644
--- a/drivers/staging/comedi/drivers/aio_iiro_16.c
+++ b/drivers/staging/comedi/drivers/aio_iiro_16.c
@@ -27,11 +27,14 @@
   *
   * The board supports interrupts on change of state of the digital inputs.
   * The sample data returned by the async command indicates which inputs
- * changed state:
+ * changed state and the current state of the inputs:
   *
- *	Bit 7 - IRQ Enable (1) / Disable (0)
- *	Bit 1 - Input 8-15 Changed State (1 = Changed, 0 = No Change)
- *	Bit 0 - Input 0-7 Changed State (1 = Changed, 0 = No Change)
+ *	Bit 23 - IRQ Enable (1) / Disable (0)
+ *	Bit 17 - Input 8-15 Changed State (1 = Changed, 0 = No Change)
+ *	Bit 16 - Input 0-7 Changed State (1 = Changed, 0 = No Change)
+ *	Bit 15 - Digital input 15
+ *	...
+ *	Bit 0  - Digital input 0

I'm wondering whether it should just indicate the state of the digital inputs and not bother with the other stuff. Any thoughts?

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux