[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1463478773-5916-12-git-send-email-abbotti@mev.co.uk>
Date: Tue, 17 May 2016 10:52:50 +0100
From: Ian Abbott <abbotti@....co.uk>
To: devel@...verdev.osuosl.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 11/14] staging: comedi: daqboard2000: rename trigger control register macros
Rename the macros that define values for the trigger control register to
avoid CamelCase, and to make it clearer which register they are
associated with.
Signed-off-by: Ian Abbott <abbotti@....co.uk>
---
drivers/staging/comedi/drivers/daqboard2000.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index b292e70..b6b4ee4 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -232,16 +232,16 @@ static const struct comedi_lrange range_daqboard2000_ai = {
#define DAQBOARD2000_DAC_CONTROL_PATTERN_ENABLE 0x0061
/* Trigger Control */
-#define DAQBOARD2000_TrigAnalog 0x0000
-#define DAQBOARD2000_TrigTTL 0x0010
-#define DAQBOARD2000_TrigTransHiLo 0x0004
-#define DAQBOARD2000_TrigTransLoHi 0x0000
-#define DAQBOARD2000_TrigAbove 0x0000
-#define DAQBOARD2000_TrigBelow 0x0004
-#define DAQBOARD2000_TrigLevelSense 0x0002
-#define DAQBOARD2000_TrigEdgeSense 0x0000
-#define DAQBOARD2000_TrigEnable 0x0001
-#define DAQBOARD2000_TrigDisable 0x0000
+#define DAQBOARD2000_TRIG_CONTROL_TYPE_ANALOG 0x0000
+#define DAQBOARD2000_TRIG_CONTROL_TYPE_TTL 0x0010
+#define DAQBOARD2000_TRIG_CONTROL_EDGE_HI_LO 0x0004
+#define DAQBOARD2000_TRIG_CONTROL_EDGE_LO_HI 0x0000
+#define DAQBOARD2000_TRIG_CONTROL_LEVEL_ABOVE 0x0000
+#define DAQBOARD2000_TRIG_CONTROL_LEVEL_BELOW 0x0004
+#define DAQBOARD2000_TRIG_CONTROL_SENSE_LEVEL 0x0002
+#define DAQBOARD2000_TRIG_CONTROL_SENSE_EDGE 0x0000
+#define DAQBOARD2000_TRIG_CONTROL_ENABLE 0x0001
+#define DAQBOARD2000_TRIG_CONTROL_DISABLE 0x0000
/* Reference Dac Selection */
#define DAQBOARD2000_PosRefDacSelect 0x0100
@@ -543,10 +543,12 @@ static void daqboard2000_adcDisarm(struct comedi_device *dev)
{
/* Disable hardware triggers */
udelay(2);
- writew(DAQBOARD2000_TrigAnalog | DAQBOARD2000_TrigDisable,
+ writew(DAQBOARD2000_TRIG_CONTROL_TYPE_ANALOG |
+ DAQBOARD2000_TRIG_CONTROL_DISABLE,
dev->mmio + DAQBOARD2000_REG_TRIG_CONTROL);
udelay(2);
- writew(DAQBOARD2000_TrigTTL | DAQBOARD2000_TrigDisable,
+ writew(DAQBOARD2000_TRIG_CONTROL_TYPE_TTL |
+ DAQBOARD2000_TRIG_CONTROL_DISABLE,
dev->mmio + DAQBOARD2000_REG_TRIG_CONTROL);
/* Stop the scan list FIFO from loading the configuration pipe */
--
2.8.1
Powered by blists - more mailing lists