]> git.baikalelectronics.ru Git - kernel.git/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)
commit7edd6d65343eebba0c838a896ae43c0d3c12c813
treea6e3f8a76d82fe770ad702f27b241be1d7c80d8b
parent698045b88ae746f057a59b6f79c40154954a4c23
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