From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754309AbcESJ6V (ORCPT ); Thu, 19 May 2016 05:58:21 -0400 Received: from smtp73.ord1c.emailsrvr.com ([108.166.43.73]:50616 "EHLO smtp73.ord1c.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753849AbcESJ6U (ORCPT ); Thu, 19 May 2016 05:58:20 -0400 X-Auth-ID: abbotti@mev.co.uk X-Sender-Id: abbotti@mev.co.uk From: Ian Abbott To: devel@driverdev.osuosl.org Cc: Greg Kroah-Hartman , Ian Abbott , H Hartley Sweeten , linux-kernel@vger.kernel.org Subject: [PATCH v3 12/14] staging: comedi: daqboard2000: rename reference DACs register macros Date: Thu, 19 May 2016 10:58:09 +0100 Message-Id: <1463651889-7297-1-git-send-email-abbotti@mev.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1463575029-12089-13-git-send-email-abbotti@mev.co.uk> References: <1463575029-12089-13-git-send-email-abbotti@mev.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename the macros that define values for the reference DACs register to avoid CamelCase, and to make it clearer which register they are associated with. Add a macro `DAQBOARD2000_REF_DACS_SET` for the value `0x0080` that triggers setting one of the references. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten --- v2: Shortened prefix from `DAQBOARD2000_` to `DB2K_`. v3: Corrected typo in commit: 0x80 --> 0x0080. --- drivers/staging/comedi/drivers/daqboard2000.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index e9efdbc..15f2b8a5 100644 --- a/drivers/staging/comedi/drivers/daqboard2000.c +++ b/drivers/staging/comedi/drivers/daqboard2000.c @@ -244,8 +244,9 @@ static const struct comedi_lrange range_daqboard2000_ai = { #define DB2K_TRIG_CONTROL_DISABLE 0x0000 /* Reference Dac Selection */ -#define DAQBOARD2000_PosRefDacSelect 0x0100 -#define DAQBOARD2000_NegRefDacSelect 0x0000 +#define DB2K_REF_DACS_SET 0x0080 +#define DB2K_REF_DACS_SELECT_POS_REF 0x0100 +#define DB2K_REF_DACS_SELECT_NEG_REF 0x0000 struct daq200_boardtype { const char *name; @@ -569,7 +570,7 @@ static void daqboard2000_activateReferenceDacs(struct comedi_device *dev) int timeout; /* Set the + reference dac value in the FPGA */ - writew(0x80 | DAQBOARD2000_PosRefDacSelect, + writew(DB2K_REF_DACS_SET | DB2K_REF_DACS_SELECT_POS_REF, dev->mmio + DB2K_REG_REF_DACS); for (timeout = 0; timeout < 20; timeout++) { val = readw(dev->mmio + DB2K_REG_DAC_STATUS); @@ -579,7 +580,7 @@ static void daqboard2000_activateReferenceDacs(struct comedi_device *dev) } /* Set the - reference dac value in the FPGA */ - writew(0x80 | DAQBOARD2000_NegRefDacSelect, + writew(DB2K_REF_DACS_SET | DB2K_REF_DACS_SELECT_NEG_REF, dev->mmio + DB2K_REG_REF_DACS); for (timeout = 0; timeout < 20; timeout++) { val = readw(dev->mmio + DB2K_REG_DAC_STATUS); -- 2.8.1