staging: comedi: s626: make CRA and CRB setup conversions more readable
authorIan Abbott <abbotti@mev.co.uk>
Mon, 21 Oct 2013 09:10:36 +0000 (10:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2013 16:09:54 +0000 (09:09 -0700)
commit0830ada537ae50db3b2184df423e886b538989fa
treebaeeec0be8874ede9eb604e7e2585cda575ce5a5
parent2eaaccdeabf34ad70ecb7eb9c4aafa08b13a0e66
staging: comedi: s626: make CRA and CRB setup conversions more readable

Use the new macros defined in "s626.h" for constructing and decomposing
'CRA', 'CRB' and standardized encoder setup values to make the
conversions between standardized encoder setup values, and CRA/CRB
register values easier to follow.

There is some messing about with the 'IndxSrc' values which are 1-bit
wide in the standardized encoder setup, and 2-bit wide in the 'CRA' and
'CRB' register values.  This will be addressed by a later patch.

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