forked from mirrors/linux
		
	hwmon: (ads7871) Fix multi-line comments
Cc: Paul Thomas <pthomas8589@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
		
							parent
							
								
									d13d6232de
								
							
						
					
					
						commit
						10775d1899
					
				
					 1 changed files with 17 additions and 9 deletions
				
			
		|  | @ -34,9 +34,11 @@ | ||||||
| #define REG_SER_CONTROL 24 /*Serial Interface Control Register*/ | #define REG_SER_CONTROL 24 /*Serial Interface Control Register*/ | ||||||
| #define REG_ID		31 /*ID Register*/ | #define REG_ID		31 /*ID Register*/ | ||||||
| 
 | 
 | ||||||
| /*From figure 17 in the datasheet
 | /*
 | ||||||
| * These bits get ORed with the address to form |  * From figure 17 in the datasheet | ||||||
| * the instruction byte */ |  * These bits get ORed with the address to form | ||||||
|  |  * the instruction byte | ||||||
|  |  */ | ||||||
| /*Instruction Bit masks*/ | /*Instruction Bit masks*/ | ||||||
| #define INST_MODE_bm	(1<<7) | #define INST_MODE_bm	(1<<7) | ||||||
| #define INST_READ_bm	(1<<6) | #define INST_READ_bm	(1<<6) | ||||||
|  | @ -105,8 +107,10 @@ static ssize_t show_voltage(struct device *dev, | ||||||
| 	uint8_t channel, mux_cnv; | 	uint8_t channel, mux_cnv; | ||||||
| 
 | 
 | ||||||
| 	channel = attr->index; | 	channel = attr->index; | ||||||
| 	/*TODO: add support for conversions
 | 	/*
 | ||||||
| 	 *other than single ended with a gain of 1*/ | 	 * TODO: add support for conversions | ||||||
|  | 	 * other than single ended with a gain of 1 | ||||||
|  | 	 */ | ||||||
| 	/*MUX_M3_bm forces single ended*/ | 	/*MUX_M3_bm forces single ended*/ | ||||||
| 	/*This is also where the gain of the PGA would be set*/ | 	/*This is also where the gain of the PGA would be set*/ | ||||||
| 	ads7871_write_reg8(spi, REG_GAIN_MUX, | 	ads7871_write_reg8(spi, REG_GAIN_MUX, | ||||||
|  | @ -114,8 +118,10 @@ static ssize_t show_voltage(struct device *dev, | ||||||
| 
 | 
 | ||||||
| 	ret = ads7871_read_reg8(spi, REG_GAIN_MUX); | 	ret = ads7871_read_reg8(spi, REG_GAIN_MUX); | ||||||
| 	mux_cnv = ((ret & MUX_CNV_bm)>>MUX_CNV_bv); | 	mux_cnv = ((ret & MUX_CNV_bm)>>MUX_CNV_bv); | ||||||
| 	/*on 400MHz arm9 platform the conversion
 | 	/*
 | ||||||
| 	 *is already done when we do this test*/ | 	 * on 400MHz arm9 platform the conversion | ||||||
|  | 	 * is already done when we do this test | ||||||
|  | 	 */ | ||||||
| 	while ((i < 2) && mux_cnv) { | 	while ((i < 2) && mux_cnv) { | ||||||
| 		i++; | 		i++; | ||||||
| 		ret = ads7871_read_reg8(spi, REG_GAIN_MUX); | 		ret = ads7871_read_reg8(spi, REG_GAIN_MUX); | ||||||
|  | @ -179,8 +185,10 @@ static int __devinit ads7871_probe(struct spi_device *spi) | ||||||
| 	ret = ads7871_read_reg8(spi, REG_OSC_CONTROL); | 	ret = ads7871_read_reg8(spi, REG_OSC_CONTROL); | ||||||
| 
 | 
 | ||||||
| 	dev_dbg(&spi->dev, "REG_OSC_CONTROL write:%x, read:%x\n", val, ret); | 	dev_dbg(&spi->dev, "REG_OSC_CONTROL write:%x, read:%x\n", val, ret); | ||||||
| 	/*because there is no other error checking on an SPI bus
 | 	/*
 | ||||||
| 	we need to make sure we really have a chip*/ | 	 * because there is no other error checking on an SPI bus | ||||||
|  | 	 * we need to make sure we really have a chip | ||||||
|  | 	 */ | ||||||
| 	if (val != ret) { | 	if (val != ret) { | ||||||
| 		err = -ENODEV; | 		err = -ENODEV; | ||||||
| 		goto exit; | 		goto exit; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Guenter Roeck
						Guenter Roeck