OSDN Git Service

staging: comedi: hwdrv_apci1500: introduce z8536_write()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 3 Dec 2014 18:25:33 +0000 (11:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Jan 2015 00:54:34 +0000 (16:54 -0800)
commit8dbaadb93117c8aec77c5e97fb06c125c1e345cc
tree7d1ab42c51c251625787e4c68633e23925e61f73
parent54c3ef46572015e05537526304b0d22095821a7f
staging: comedi: hwdrv_apci1500: introduce z8536_write()

The Z8536 CIO registers are indirectly written by writing the register offset
to the control register then writing the value to the control register.

Introduce a helper function to write the Z8536 CIO registers.

The registers are written from "normal" code and in the interrupt handler,
spinlock the sequence to protect the indirect register access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c