From: Ian Abbott <abbotti@mev.co.uk>
To: Hartley Sweeten <HartleyS@visionengravers.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 06/14] staging: comedi: daqboard2000: rename register offset macros
Date: Wed, 18 May 2016 11:27:46 +0100 [thread overview]
Message-ID: <573C43A2.8090206@mev.co.uk> (raw)
In-Reply-To: <CO2PR01MB20887607009ED0E519131623D0480@CO2PR01MB2088.prod.exchangelabs.com>
On 17/05/16 18:27, Hartley Sweeten wrote:
> On Tuesday, May 17, 2016 2:53 AM, Ian Abbott wrote:
>> Rename the macros defining register offsets to avoid CamelCase, and to
>> use namespace associated with the driver.
>>
>> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
>> ---
>> Other CamelCase issues in this patch will be dealt with by later
>> patches in the series.
>> ---
>> drivers/staging/comedi/drivers/daqboard2000.c | 112 ++++++++++++++------------
>> 1 file changed, 61 insertions(+), 51 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
>> index b3b68e8..92ff8f4 100644
>> --- a/drivers/staging/comedi/drivers/daqboard2000.c
>> +++ b/drivers/staging/comedi/drivers/daqboard2000.c
>> @@ -151,35 +151,35 @@ static const struct comedi_lrange range_daqboard2000_ai = {
>> /*
>> * Register Memory Map
>> */
>> -#define acqControl 0x00 /* u16 */
>> -#define acqScanListFIFO 0x02 /* u16 */
>> -#define acqPacerClockDivLow 0x04 /* u32 */
>> -#define acqScanCounter 0x08 /* u16 */
>> -#define acqPacerClockDivHigh 0x0a /* u16 */
>> -#define acqTriggerCount 0x0c /* u16 */
>> -#define acqResultsFIFO 0x10 /* u16 */
>> -#define acqResultsShadow 0x14 /* u16 */
>> -#define acqAdcResult 0x18 /* u16 */
>> -#define dacScanCounter 0x1c /* u16 */
>> -#define dacControl 0x20 /* u16 */
>> -#define dacFIFO 0x24 /* s16 */
>> -#define dacPacerClockDiv 0x2a /* u16 */
>> -#define refDacs 0x2c /* u16 */
>> -#define dioControl 0x30 /* u16 */
>> -#define dioP3hsioData 0x32 /* s16 */
>> -#define dioP3Control 0x34 /* u16 */
>> -#define calEepromControl 0x36 /* u16 */
>> -#define dacSetting(x) (0x38 + (x) * 2) /* s16 */
>> -#define dioP2ExpansionIO8Bit 0x40 /* s16 */
>> -#define ctrTmrControl 0x80 /* u16 */
>> -#define ctrInput(x) (0x88 + (x) * 2) /* s16 */
>> -#define timerDivisor(x) (0xa0 + (x) * 2) /* u16 */
>> -#define dmaControl 0xb0 /* u16 */
>> -#define trigControl 0xb2 /* u16 */
>> -#define calEeprom 0xb8 /* u16 */
>> -#define acqDigitalMark 0xba /* u16 */
>> -#define trigDacs 0xbc /* u16 */
>> -#define dioP2ExpansionIO16Bit(x) (0xc0 + (x) * 2) /* s16 */
>> +#define DAQBOARD2000_REG_ACQ_CONTROL 0x00 /* u16 */
>> +#define DAQBOARD2000_REG_ACQ_SCAN_LIST_FIFO 0x02 /* u16 */
>> +#define DAQBOARD2000_REG_ACQ_PACER_CLOCK_DIV_LOW 0x04 /* u32 */
>> +#define DAQBOARD2000_REG_ACQ_SCAN_COUNTER 0x08 /* u16 */
>> +#define DAQBOARD2000_REG_ACQ_PACER_CLOCK_DIV_HIGH 0x0a /* u16 */
>> +#define DAQBOARD2000_REG_ACQ_TRIGGER_COUNT 0x0c /* u16 */
>> +#define DAQBOARD2000_REG_ACQ_RESULTS_FIFO 0x10 /* u16 */
>> +#define DAQBOARD2000_REG_ACQ_RESULTS_SHADOW 0x14 /* u16 */
>> +#define DAQBOARD2000_REG_ACQ_ADC_RESULT 0x18 /* u16 */
>> +#define DAQBOARD2000_REG_DAC_SCAN_COUNTER 0x1c /* u16 */
>> +#define DAQBOARD2000_REG_DAC_CONTROL 0x20 /* u16 */
>> +#define DAQBOARD2000_REG_DAC_FIFO 0x24 /* s16 */
>> +#define DAQBOARD2000_REG_DAC_PACER_CLOCK_DIV 0x2a /* u16 */
>> +#define DAQBOARD2000_REG_REF_DACS 0x2c /* u16 */
>> +#define DAQBOARD2000_REG_DIO_CONTROL 0x30 /* u16 */
>> +#define DAQBOARD2000_REG_P3_HSIO_DATA 0x32 /* s16 */
>> +#define DAQBOARD2000_REG_P3_CONTROL 0x34 /* u16 */
>> +#define DAQBOARD2000_REG_CAL_EEPROM_CONTROL 0x36 /* u16 */
>> +#define DAQBOARD2000_REG_DAC_SETTING(x) (0x38 + (x) * 2) /* s16 */
>> +#define DAQBOARD2000_REG_DIO_P2_EXP_IO_8_BIT 0x40 /* s16 */
>> +#define DAQBOARD2000_REG_COUNTER_TIMER_CONTROL 0x80 /* u16 */
>> +#define DAQBOARD2000_REG_COUNTER_INPUT(x) (0x88 + (x) * 2) /* s16 */
>> +#define DAQBOARD2000_REG_TIMER_DIV(x) (0xa0 + (x) * 2) /* u16 */
>> +#define DAQBOARD2000_REG_DMA_CONTROL 0xb0 /* u16 */
>> +#define DAQBOARD2000_REG_TRIG_CONTROL 0xb2 /* u16 */
>> +#define DAQBOARD2000_REG_CAL_EEPROM 0xb8 /* u16 */
>> +#define DAQBOARD2000_REG_ACQ_DIGITAL_MARK 0xba /* u16 */
>> +#define DAQBOARD2000_REG_TRIG_DACS 0xbc /* u16 */
>> +#define DAQBOARD2000_REG_DIO_P2_EXP_IO_16_BIT(x) (0xc0 + (x) * 2) /* s16 */
>
> Any chance we can shorten the namespace prefix? It's not a big deal but
> the DAQBOARD2000_ is pretty long. How about DB2K_ or even D2K_?
Fair enough.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
next prev parent reply other threads:[~2016-05-18 10:27 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 9:52 [PATCH 00/14] staging: comedi: daqboard2000: checkpatch clean-ups Ian Abbott
2016-05-17 9:52 ` [PATCH 01/14] staging: comedi: daqboard2000: remove commented out code Ian Abbott
2016-05-17 17:14 ` Hartley Sweeten
2016-05-18 10:21 ` Ian Abbott
2016-05-17 9:52 ` [PATCH 02/14] staging: comedi: daqboard2000: use usual block comment style Ian Abbott
2016-05-17 9:52 ` [PATCH 03/14] staging: comedi: daqboard2000: CHECK: spaces preferred around that '*' Ian Abbott
2016-05-17 9:52 ` [PATCH 04/14] staging: comedi: daqboard2000: add blank line after struct declaration Ian Abbott
2016-05-17 9:52 ` [PATCH 05/14] staging: comedi: daqboard2000: rename serial EEPROM register macros Ian Abbott
2016-05-17 17:22 ` Hartley Sweeten
2016-05-18 10:25 ` Ian Abbott
2016-05-17 9:52 ` [PATCH 06/14] staging: comedi: daqboard2000: rename register offset macros Ian Abbott
2016-05-17 17:27 ` Hartley Sweeten
2016-05-18 10:27 ` Ian Abbott [this message]
2016-05-17 9:52 ` [PATCH 07/14] staging: comedi: daqboard2000: rename acquisition control register macros Ian Abbott
2016-05-17 9:52 ` [PATCH 08/14] staging: comedi: daqboard2000: rename acq status " Ian Abbott
2016-05-17 9:52 ` [PATCH 09/14] staging: comedi: daqboard2000: redo DAC control " Ian Abbott
2016-05-17 9:52 ` [PATCH 10/14] staging: comedi: daqboard2000: redo DAC status macros and fix busy Ian Abbott
2016-05-17 9:52 ` [PATCH 11/14] staging: comedi: daqboard2000: rename trigger control register macros Ian Abbott
2016-05-17 9:52 ` [PATCH 12/14] staging: comedi: daqboard2000: rename reference DACs " Ian Abbott
2016-05-17 9:52 ` [PATCH 13/14] staging: comedi: daqboard2000: rename CamelCase functions Ian Abbott
2016-05-17 9:52 ` [PATCH 14/14] staging: comedi: daqboard2000: prefer usleep_range() Ian Abbott
2016-05-17 17:42 ` Hartley Sweeten
2016-05-18 10:28 ` Ian Abbott
2016-05-17 17:46 ` [PATCH 00/14] staging: comedi: daqboard2000: checkpatch clean-ups Hartley Sweeten
2016-05-18 12:00 ` Ian Abbott
2016-05-18 12:36 ` [PATCH v2 " Ian Abbott
2016-05-18 12:36 ` [PATCH v2 01/14] staging: comedi: daqboard2000: remove commented out code Ian Abbott
2016-05-18 12:36 ` [PATCH v2 02/14] staging: comedi: daqboard2000: use usual block comment style Ian Abbott
2016-05-18 12:36 ` [PATCH v2 03/14] staging: comedi: daqboard2000: CHECK: spaces preferred around that '*' Ian Abbott
2016-05-18 12:36 ` [PATCH v2 04/14] staging: comedi: daqboard2000: add blank line after struct declaration Ian Abbott
2016-05-18 12:37 ` [PATCH v2 05/14] staging: comedi: daqboard2000: rename serial EEPROM register macros Ian Abbott
2016-05-18 12:37 ` [PATCH v2 06/14] staging: comedi: daqboard2000: rename register offset macros Ian Abbott
2016-05-18 22:45 ` Hartley Sweeten
2016-05-19 9:55 ` [PATCH v3 " Ian Abbott
2016-05-19 16:49 ` Hartley Sweeten
2016-05-19 17:42 ` Ian Abbott
2016-05-18 12:37 ` [PATCH v2 07/14] staging: comedi: daqboard2000: rename acquisition control register macros Ian Abbott
2016-05-18 12:37 ` [PATCH v2 08/14] staging: comedi: daqboard2000: rename acq status " Ian Abbott
2016-05-18 12:37 ` [PATCH v2 09/14] staging: comedi: daqboard2000: redo DAC control " Ian Abbott
2016-05-18 12:37 ` [PATCH v2 10/14] staging: comedi: daqboard2000: redo DAC status macros and fix busy Ian Abbott
2016-05-18 12:37 ` [PATCH v2 11/14] staging: comedi: daqboard2000: rename trigger control register macros Ian Abbott
2016-05-18 12:37 ` [PATCH v2 12/14] staging: comedi: daqboard2000: rename reference DACs " Ian Abbott
2016-05-18 22:35 ` Hartley Sweeten
2016-05-19 9:58 ` [PATCH v3 " Ian Abbott
2016-05-19 10:07 ` Ian Abbott
2016-05-19 10:11 ` [PATCH v4 " Ian Abbott
2016-05-18 12:37 ` [PATCH v2 13/14] staging: comedi: daqboard2000: rename CamelCase functions Ian Abbott
2016-05-18 12:37 ` [PATCH v2 14/14] staging: comedi: daqboard2000: prefer usleep_range() Ian Abbott
2016-05-19 10:02 ` [PATCH v2 00/14] staging: comedi: daqboard2000: checkpatch clean-ups Ian Abbott
2016-05-19 10:16 ` Ian Abbott
2016-05-19 18:04 ` Ian Abbott
2016-05-19 18:15 ` [PATCH v4 " Ian Abbott
2016-05-19 18:15 ` [PATCH v4 01/14] staging: comedi: daqboard2000: remove commented out code Ian Abbott
2016-05-19 18:15 ` [PATCH v4 02/14] staging: comedi: daqboard2000: use usual block comment style Ian Abbott
2016-05-19 18:15 ` [PATCH v4 03/14] staging: comedi: daqboard2000: CHECK: spaces preferred around that '*' Ian Abbott
2016-05-19 18:15 ` [PATCH v4 04/14] staging: comedi: daqboard2000: add blank line after struct declaration Ian Abbott
2016-05-19 18:15 ` [PATCH v4 05/14] staging: comedi: daqboard2000: rename serial EEPROM register macros Ian Abbott
2016-05-19 18:15 ` [PATCH v4 06/14] staging: comedi: daqboard2000: rename register offset macros Ian Abbott
2016-05-19 18:15 ` [PATCH v4 07/14] staging: comedi: daqboard2000: rename acquisition control register macros Ian Abbott
2016-05-19 18:15 ` [PATCH v4 08/14] staging: comedi: daqboard2000: rename acq status " Ian Abbott
2016-05-19 18:15 ` [PATCH v4 09/14] staging: comedi: daqboard2000: redo DAC control " Ian Abbott
2016-05-19 18:15 ` [PATCH v4 10/14] staging: comedi: daqboard2000: redo DAC status macros and fix busy Ian Abbott
2016-05-19 18:15 ` [PATCH v4 11/14] staging: comedi: daqboard2000: rename trigger control register macros Ian Abbott
2016-05-19 18:15 ` [PATCH v4 12/14] staging: comedi: daqboard2000: rename reference DACs " Ian Abbott
2016-05-19 18:15 ` [PATCH v4 13/14] staging: comedi: daqboard2000: rename CamelCase functions Ian Abbott
2016-05-19 18:15 ` [PATCH v4 14/14] staging: comedi: daqboard2000: prefer usleep_range() Ian Abbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=573C43A2.8090206@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=HartleyS@visionengravers.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).