Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1402242 > unrolled thread

[PATCH 01/14] staging: comedi: daqboard2000: remove commented out code

Started byIan Abbott <abbotti@mev.co.uk>
First post2016-05-17 12:00 +0200
Last post2016-05-18 12:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 01/14] staging: comedi: daqboard2000: remove commented out code Ian Abbott <abbotti@mev.co.uk> - 2016-05-17 12:00 +0200
    RE: [PATCH 01/14] staging: comedi: daqboard2000: remove commented out  code Hartley Sweeten <HartleyS@visionengravers.com> - 2016-05-17 19:30 +0200
      Re: [PATCH 01/14] staging: comedi: daqboard2000: remove commented out  code Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 12:30 +0200

#1402242 — [PATCH 01/14] staging: comedi: daqboard2000: remove commented out code

FromIan Abbott <abbotti@mev.co.uk>
Date2016-05-17 12:00 +0200
Subject[PATCH 01/14] staging: comedi: daqboard2000: remove commented out code
Message-ID<rzJXh-2UD-25@gated-at.bofh.it>
Remove some commented out code.  Some of it uses constructs that don't
exist in the driver, and probably come from the source code for the MS
Windows driver.

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

diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 57ab668..8c9a024 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -278,9 +278,7 @@ struct daqboard2000_private {
 
 static void writeAcqScanListEntry(struct comedi_device *dev, u16 entry)
 {
-	/* udelay(4); */
 	writew(entry & 0x00ff, dev->mmio + acqScanListFIFO);
-	/* udelay(4); */
 	writew((entry >> 8) & 0x00ff, dev->mmio + acqScanListFIFO);
 }
 
@@ -315,10 +313,6 @@ static void setup_sampling(struct comedi_device *dev, int chan, int gain)
 		word3 = 0;
 		break;
 	}
-/*
-  dev->eeprom.correctionDACSE[i][j][k].offset = 0x800;
-  dev->eeprom.correctionDACSE[i][j][k].gain = 0xc00;
-*/
 	/* These should be read from EEPROM */
 	word2 |= 0x0800;
 	word3 |= 0xc000;
-- 
2.8.1

[toc] | [next] | [standalone]


#1402492 — RE: [PATCH 01/14] staging: comedi: daqboard2000: remove commented out code

FromHartley Sweeten <HartleyS@visionengravers.com>
Date2016-05-17 19:30 +0200
SubjectRE: [PATCH 01/14] staging: comedi: daqboard2000: remove commented out code
Message-ID<rzQYH-7s5-37@gated-at.bofh.it>
In reply to#1402242
On Tuesday, May 17, 2016 2:53 AM, Ian Abbott wrote:
> Remove some commented out code.  Some of it uses constructs that don't
> exist in the driver, and probably come from the source code for the MS
> Windows driver.
>
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
>  drivers/staging/comedi/drivers/daqboard2000.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
> index 57ab668..8c9a024 100644
> --- a/drivers/staging/comedi/drivers/daqboard2000.c
> +++ b/drivers/staging/comedi/drivers/daqboard2000.c
> @@ -278,9 +278,7 @@ struct daqboard2000_private {
>  
>  static void writeAcqScanListEntry(struct comedi_device *dev, u16 entry)
>  {
> -	/* udelay(4); */
>  	writew(entry & 0x00ff, dev->mmio + acqScanListFIFO);
> -	/* udelay(4); */
>  	writew((entry >> 8) & 0x00ff, dev->mmio + acqScanListFIFO);
>  }
>  
> @@ -315,10 +313,6 @@ static void setup_sampling(struct comedi_device *dev, int chan, int gain)
>  		word3 = 0;
>  		break;
>  	}
> -/*
> -  dev->eeprom.correctionDACSE[i][j][k].offset = 0x800;
> -  dev->eeprom.correctionDACSE[i][j][k].gain = 0xc00;
> -*/
>  	/* These should be read from EEPROM */
>  	word2 |= 0x0800;
>  	word3 |= 0xc000;

It might be a good idea to add a comment about the magic 0x0800 and 0xc000 values:

>  	word2 |= 0x0800;	/* offset */
>  	word3 |= 0xc000;	/* gain */

Wish I could find a register map for this board. I sent an email to Measurement Computing
to see if one is available.

Regards,
Hartley

[toc] | [prev] | [next] | [standalone]


#1402864 — Re: [PATCH 01/14] staging: comedi: daqboard2000: remove commented out code

FromIan Abbott <abbotti@mev.co.uk>
Date2016-05-18 12:30 +0200
SubjectRe: [PATCH 01/14] staging: comedi: daqboard2000: remove commented out code
Message-ID<rA6TL-Pd-1@gated-at.bofh.it>
In reply to#1402492
On 17/05/16 18:14, Hartley Sweeten wrote:
> On Tuesday, May 17, 2016 2:53 AM, Ian Abbott wrote:
>> Remove some commented out code.  Some of it uses constructs that don't
>> exist in the driver, and probably come from the source code for the MS
>> Windows driver.
>>
>> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
>> ---
>>   drivers/staging/comedi/drivers/daqboard2000.c | 6 ------
>>   1 file changed, 6 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
>> index 57ab668..8c9a024 100644
>> --- a/drivers/staging/comedi/drivers/daqboard2000.c
>> +++ b/drivers/staging/comedi/drivers/daqboard2000.c
[snip]
>> @@ -315,10 +313,6 @@ static void setup_sampling(struct comedi_device *dev, int chan, int gain)
>>   		word3 = 0;
>>   		break;
>>   	}
>> -/*
>> -  dev->eeprom.correctionDACSE[i][j][k].offset = 0x800;
>> -  dev->eeprom.correctionDACSE[i][j][k].gain = 0xc00;
>> -*/
>>   	/* These should be read from EEPROM */
>>   	word2 |= 0x0800;
>>   	word3 |= 0xc000;
>
> It might be a good idea to add a comment about the magic 0x0800 and 0xc000 values:
>
>>   	word2 |= 0x0800;	/* offset */
>>   	word3 |= 0xc000;	/* gain */

Fair enough.

> Wish I could find a register map for this board. I sent an email to Measurement Computing
> to see if one is available.

I think the board was made by IOTech and added to Measurement 
Computing's catalog, and the Windows driver appears to have been done by 
IOTech too.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web