diff options
author | Guenter Roeck <linux@roeck-us.net> | 2012-01-19 14:02:15 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-03-18 21:27:13 -0400 |
commit | 10775d18995f50def96c7affea5eb3ca293485d6 (patch) | |
tree | 4148abdab5cd8cd7f0fd12e27c9b879f993a4cd5 /drivers/hwmon/ads7871.c | |
parent | d13d6232de932f11554119bb0c756798f5039ecd (diff) |
hwmon: (ads7871) Fix multi-line comments
Cc: Paul Thomas <pthomas8589@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/ads7871.c')
-rw-r--r-- | drivers/hwmon/ads7871.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/hwmon/ads7871.c b/drivers/hwmon/ads7871.c index 11a5f5f69071..e65c6e45d36b 100644 --- a/drivers/hwmon/ads7871.c +++ b/drivers/hwmon/ads7871.c | |||
@@ -34,9 +34,11 @@ | |||
34 | #define REG_SER_CONTROL 24 /*Serial Interface Control Register*/ | 34 | #define REG_SER_CONTROL 24 /*Serial Interface Control Register*/ |
35 | #define REG_ID 31 /*ID Register*/ | 35 | #define REG_ID 31 /*ID Register*/ |
36 | 36 | ||
37 | /*From figure 17 in the datasheet | 37 | /* |
38 | * These bits get ORed with the address to form | 38 | * From figure 17 in the datasheet |
39 | * the instruction byte */ | 39 | * These bits get ORed with the address to form |
40 | * the instruction byte | ||
41 | */ | ||
40 | /*Instruction Bit masks*/ | 42 | /*Instruction Bit masks*/ |
41 | #define INST_MODE_bm (1<<7) | 43 | #define INST_MODE_bm (1<<7) |
42 | #define INST_READ_bm (1<<6) | 44 | #define INST_READ_bm (1<<6) |
@@ -105,8 +107,10 @@ static ssize_t show_voltage(struct device *dev, | |||
105 | uint8_t channel, mux_cnv; | 107 | uint8_t channel, mux_cnv; |
106 | 108 | ||
107 | channel = attr->index; | 109 | channel = attr->index; |
108 | /*TODO: add support for conversions | 110 | /* |
109 | *other than single ended with a gain of 1*/ | 111 | * TODO: add support for conversions |
112 | * other than single ended with a gain of 1 | ||
113 | */ | ||
110 | /*MUX_M3_bm forces single ended*/ | 114 | /*MUX_M3_bm forces single ended*/ |
111 | /*This is also where the gain of the PGA would be set*/ | 115 | /*This is also where the gain of the PGA would be set*/ |
112 | ads7871_write_reg8(spi, REG_GAIN_MUX, | 116 | ads7871_write_reg8(spi, REG_GAIN_MUX, |
@@ -114,8 +118,10 @@ static ssize_t show_voltage(struct device *dev, | |||
114 | 118 | ||
115 | ret = ads7871_read_reg8(spi, REG_GAIN_MUX); | 119 | ret = ads7871_read_reg8(spi, REG_GAIN_MUX); |
116 | mux_cnv = ((ret & MUX_CNV_bm)>>MUX_CNV_bv); | 120 | mux_cnv = ((ret & MUX_CNV_bm)>>MUX_CNV_bv); |
117 | /*on 400MHz arm9 platform the conversion | 121 | /* |
118 | *is already done when we do this test*/ | 122 | * on 400MHz arm9 platform the conversion |
123 | * is already done when we do this test | ||
124 | */ | ||
119 | while ((i < 2) && mux_cnv) { | 125 | while ((i < 2) && mux_cnv) { |
120 | i++; | 126 | i++; |
121 | ret = ads7871_read_reg8(spi, REG_GAIN_MUX); | 127 | ret = ads7871_read_reg8(spi, REG_GAIN_MUX); |
@@ -179,8 +185,10 @@ static int __devinit ads7871_probe(struct spi_device *spi) | |||
179 | ret = ads7871_read_reg8(spi, REG_OSC_CONTROL); | 185 | ret = ads7871_read_reg8(spi, REG_OSC_CONTROL); |
180 | 186 | ||
181 | dev_dbg(&spi->dev, "REG_OSC_CONTROL write:%x, read:%x\n", val, ret); | 187 | dev_dbg(&spi->dev, "REG_OSC_CONTROL write:%x, read:%x\n", val, ret); |
182 | /*because there is no other error checking on an SPI bus | 188 | /* |
183 | we need to make sure we really have a chip*/ | 189 | * because there is no other error checking on an SPI bus |
190 | * we need to make sure we really have a chip | ||
191 | */ | ||
184 | if (val != ret) { | 192 | if (val != ret) { |
185 | err = -ENODEV; | 193 | err = -ENODEV; |
186 | goto exit; | 194 | goto exit; |