]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: das08: replace DAS08AO_GAIN_CONTROL/STATUS
authorIan Abbott <abbotti@mev.co.uk>
Fri, 5 Jun 2015 17:30:23 +0000 (18:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Jun 2015 00:06:41 +0000 (17:06 -0700)
commit865706e852fa9f48280ef8e9428bdf29dc770e4d
tree4d78fac017aeb08b3daf649d15bb2e2bb0f24e44
parent38d293a2ece3feea7c41a32a5fb136d9aa2ab28a
staging: comedi: das08: replace DAS08AO_GAIN_CONTROL/STATUS

The `DAS08AO_GAIN_CONTROL` and `DAS08AO_GAIN_STATUS` macros hold the
offset to the "programmable gain" register on "PGL", "PGM", "PGH",
"AOL", "AOM" and "AOH" boards.  Writing a code to this register sets the
gain for the current analog input channel (selected in the main control
register).  The written value can be read back in bits 3..0 of the
register.  Other bits of the register are read-only and not used by the
driver.  Rename `DAS08AO_GAIN_CONTROL` to `DAS08_GAIN_REG` and add a
comment.  Remove `DAS08AO_GAIN_STATUS` as the driver does not use it and
the read-only parts of the register are documented in the comment.

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/das08.c