]> Pileus Git - ~andy/linux/commit
staging: comedi: s626: bitfield manipulation macros for CRA, CRB and setup
authorIan Abbott <abbotti@mev.co.uk>
Fri, 18 Oct 2013 13:40:55 +0000 (14:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Oct 2013 20:47:23 +0000 (13:47 -0700)
commit03c1a0b89076fac46766b06a3f15ce89663c30fd
treea6e3f8a76d82fe770ad702f27b241be1d7c80d8b
parente0b07b797c8aa820e96f533a9dab33d2e012f563
staging: comedi: s626: bitfield manipulation macros for CRA, CRB and setup

Some bits of the 'CRB' register have different functions when read or
written, so add macros to define the read-only parts.

Add macros to define the widths of the bitfields in the 'CRA' and 'CRB'
registers and the standard encoder setup value.

Add macros to construct and extract parts of the 'CRA' and 'CRB'
register values and the standard encoder setup value, along with a
couple of general helper macros for the above.

Redefine the bitfield mask macros for 'CRA', 'CRB' and standard encoder
setup using the above.

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.h