lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1433525435-12986-23-git-send-email-abbotti@mev.co.uk>
Date:	Fri,  5 Jun 2015 18:30:25 +0100
From:	Ian Abbott <abbotti@....co.uk>
To:	<driverdev-devel@...uxdriverproject.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Ian Abbott <abbotti@....co.uk>,
	H Hartley Sweeten <hsweeten@...ionengravers.com>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH 22/32] staging: comedi: das08: rename DAS08AO_AO_UPDATE

"AOL", "AOM", and "AOH" boards have a jumper that controls whether
analog output channels are updated simultaneously or individually.  When
set to update individually, individual channels are updated when the
high byte register is written.  When set to update simultaneously,
channels are not updated until any of the analog output registers are
read.  The driver doesn't know the jumper setting and is not interested
in the simultaneous update feature, so it updates a channel by writing
the low byte register, the high byte register, and then reading channel
0's low byte register.

The `DAS08AO_AO_UPDATE` macro contains the offset to the low byte
register for analog output channel 0 on the "AOL", "AOM", and "AOH"
boards, which the driver reads to update the analog outputs.  Rename the
macro to `DAS08AOX_AO_UPDATE_REG` and add a comment.

Signed-off-by: Ian Abbott <abbotti@....co.uk>
---
 drivers/staging/comedi/drivers/das08.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c
index 005a7ef..837c968 100644
--- a/drivers/staging/comedi/drivers/das08.c
+++ b/drivers/staging/comedi/drivers/das08.c
@@ -138,7 +138,11 @@
 #define DAS08AOX_AO_LSB_REG(x)	((x) ? 0x0a : 0x08)
 /* (W) analog output m.s.b. registers for 2 channels ("AOx" boards) */
 #define DAS08AOX_AO_MSB_REG(x)	((x) ? 0x0b : 0x09)
-#define DAS08AO_AO_UPDATE	8
+/*
+ * (R) update analog outputs ("AOx" boards set for simultaneous output)
+ *     (any of the analog output registers could be used for this)
+ */
+#define DAS08AOX_AO_UPDATE_REG	0x08
 
 /* gainlist same as _pgx_ below */
 
@@ -374,7 +378,7 @@ static void das08_ao_set_data(struct comedi_device *dev,
 		outb(lsb, dev->iobase + DAS08AOX_AO_LSB_REG(chan));
 		outb(msb, dev->iobase + DAS08AOX_AO_MSB_REG(chan));
 		/* load DACs */
-		inb(dev->iobase + DAS08AO_AO_UPDATE);
+		inb(dev->iobase + DAS08AOX_AO_UPDATE_REG);
 	}
 }
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ