diff options
author | Guenter Roeck <linux@roeck-us.net> | 2012-01-19 14:02:22 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-03-18 21:26:56 -0400 |
commit | 3af2861e8b80676d32c5498f9ac1b2de70d3e19b (patch) | |
tree | fb1fd8da49e8004ce63fd584a8ee1dd0202d77ef /drivers/hwmon/pc87360.c | |
parent | 07de3dfb15793c3e406bfb04da7c4b64ecdf3022 (diff) |
hwmon: (pc87360) Fix multi-line comments
Cc: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pc87360.c')
-rw-r--r-- | drivers/hwmon/pc87360.c | 73 |
1 files changed, 46 insertions, 27 deletions
diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c index 3d99b8854d7c..b54637efc879 100644 --- a/drivers/hwmon/pc87360.c +++ b/drivers/hwmon/pc87360.c | |||
@@ -498,9 +498,11 @@ static struct sensor_device_attribute in_max[] = { | |||
498 | #define CHAN_ALM_MAX 0x04 /* max limit exceeded */ | 498 | #define CHAN_ALM_MAX 0x04 /* max limit exceeded */ |
499 | #define TEMP_ALM_CRIT 0x08 /* temp crit exceeded (temp only) */ | 499 | #define TEMP_ALM_CRIT 0x08 /* temp crit exceeded (temp only) */ |
500 | 500 | ||
501 | /* show_in_min/max_alarm() reads data from the per-channel status | 501 | /* |
502 | register (sec 11.5.12), not the vin event status registers (sec | 502 | * show_in_min/max_alarm() reads data from the per-channel status |
503 | 11.5.2) that (legacy) show_in_alarm() resds (via data->in_alarms) */ | 503 | * register (sec 11.5.12), not the vin event status registers (sec |
504 | * 11.5.2) that (legacy) show_in_alarm() resds (via data->in_alarms) | ||
505 | */ | ||
504 | 506 | ||
505 | static ssize_t show_in_min_alarm(struct device *dev, | 507 | static ssize_t show_in_min_alarm(struct device *dev, |
506 | struct device_attribute *devattr, char *buf) | 508 | struct device_attribute *devattr, char *buf) |
@@ -679,9 +681,10 @@ static ssize_t set_therm_crit(struct device *dev, struct device_attribute *devat | |||
679 | return count; | 681 | return count; |
680 | } | 682 | } |
681 | 683 | ||
682 | /* the +11 term below reflects the fact that VLM units 11,12,13 are | 684 | /* |
683 | used in the chip to measure voltage across the thermistors | 685 | * the +11 term below reflects the fact that VLM units 11,12,13 are |
684 | */ | 686 | * used in the chip to measure voltage across the thermistors |
687 | */ | ||
685 | static struct sensor_device_attribute therm_input[] = { | 688 | static struct sensor_device_attribute therm_input[] = { |
686 | SENSOR_ATTR(temp4_input, S_IRUGO, show_therm_input, NULL, 0+11), | 689 | SENSOR_ATTR(temp4_input, S_IRUGO, show_therm_input, NULL, 0+11), |
687 | SENSOR_ATTR(temp5_input, S_IRUGO, show_therm_input, NULL, 1+11), | 690 | SENSOR_ATTR(temp5_input, S_IRUGO, show_therm_input, NULL, 1+11), |
@@ -717,8 +720,10 @@ static struct sensor_device_attribute therm_crit[] = { | |||
717 | show_therm_crit, set_therm_crit, 2+11), | 720 | show_therm_crit, set_therm_crit, 2+11), |
718 | }; | 721 | }; |
719 | 722 | ||
720 | /* show_therm_min/max_alarm() reads data from the per-channel voltage | 723 | /* |
721 | status register (sec 11.5.12) */ | 724 | * show_therm_min/max_alarm() reads data from the per-channel voltage |
725 | * status register (sec 11.5.12) | ||
726 | */ | ||
722 | 727 | ||
723 | static ssize_t show_therm_min_alarm(struct device *dev, | 728 | static ssize_t show_therm_min_alarm(struct device *dev, |
724 | struct device_attribute *devattr, char *buf) | 729 | struct device_attribute *devattr, char *buf) |
@@ -905,9 +910,11 @@ static ssize_t show_temp_alarms(struct device *dev, struct device_attribute *att | |||
905 | } | 910 | } |
906 | static DEVICE_ATTR(alarms_temp, S_IRUGO, show_temp_alarms, NULL); | 911 | static DEVICE_ATTR(alarms_temp, S_IRUGO, show_temp_alarms, NULL); |
907 | 912 | ||
908 | /* show_temp_min/max_alarm() reads data from the per-channel status | 913 | /* |
909 | register (sec 12.3.7), not the temp event status registers (sec | 914 | * show_temp_min/max_alarm() reads data from the per-channel status |
910 | 12.3.2) that show_temp_alarm() reads (via data->temp_alarms) */ | 915 | * register (sec 12.3.7), not the temp event status registers (sec |
916 | * 12.3.2) that show_temp_alarm() reads (via data->temp_alarms) | ||
917 | */ | ||
911 | 918 | ||
912 | static ssize_t show_temp_min_alarm(struct device *dev, | 919 | static ssize_t show_temp_min_alarm(struct device *dev, |
913 | struct device_attribute *devattr, char *buf) | 920 | struct device_attribute *devattr, char *buf) |
@@ -1063,9 +1070,11 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses | |||
1063 | } else if (i==1) { /* Voltages */ | 1070 | } else if (i==1) { /* Voltages */ |
1064 | /* Are we using thermistors? */ | 1071 | /* Are we using thermistors? */ |
1065 | if (*devid == 0xE9) { /* PC87366 */ | 1072 | if (*devid == 0xE9) { /* PC87366 */ |
1066 | /* These registers are not logical-device | 1073 | /* |
1067 | specific, just that we won't need them if | 1074 | * These registers are not logical-device |
1068 | we don't use the VLM device */ | 1075 | * specific, just that we won't need them if |
1076 | * we don't use the VLM device | ||
1077 | */ | ||
1069 | confreg[2] = superio_inb(sioaddr, 0x2B); | 1078 | confreg[2] = superio_inb(sioaddr, 0x2B); |
1070 | confreg[3] = superio_inb(sioaddr, 0x25); | 1079 | confreg[3] = superio_inb(sioaddr, 0x25); |
1071 | 1080 | ||
@@ -1147,9 +1156,11 @@ static int __devinit pc87360_probe(struct platform_device *pdev) | |||
1147 | if (data->fannr) | 1156 | if (data->fannr) |
1148 | data->fan_conf = confreg[0] | (confreg[1] << 8); | 1157 | data->fan_conf = confreg[0] | (confreg[1] << 8); |
1149 | 1158 | ||
1150 | /* Use the correct reference voltage | 1159 | /* |
1151 | Unless both the VLM and the TMS logical devices agree to | 1160 | * Use the correct reference voltage |
1152 | use an external Vref, the internal one is used. */ | 1161 | * Unless both the VLM and the TMS logical devices agree to |
1162 | * use an external Vref, the internal one is used. | ||
1163 | */ | ||
1153 | if (data->innr) { | 1164 | if (data->innr) { |
1154 | i = pc87360_read_value(data, LD_IN, NO_BANK, | 1165 | i = pc87360_read_value(data, LD_IN, NO_BANK, |
1155 | PC87365_REG_IN_CONFIG); | 1166 | PC87365_REG_IN_CONFIG); |
@@ -1287,8 +1298,10 @@ static int __devexit pc87360_remove(struct platform_device *pdev) | |||
1287 | return 0; | 1298 | return 0; |
1288 | } | 1299 | } |
1289 | 1300 | ||
1290 | /* ldi is the logical device index | 1301 | /* |
1291 | bank is for voltages and temperatures only */ | 1302 | * ldi is the logical device index |
1303 | * bank is for voltages and temperatures only | ||
1304 | */ | ||
1292 | static int pc87360_read_value(struct pc87360_data *data, u8 ldi, u8 bank, | 1305 | static int pc87360_read_value(struct pc87360_data *data, u8 ldi, u8 bank, |
1293 | u8 reg) | 1306 | u8 reg) |
1294 | { | 1307 | { |
@@ -1359,8 +1372,10 @@ static void pc87360_init_device(struct platform_device *pdev, | |||
1359 | } | 1372 | } |
1360 | } | 1373 | } |
1361 | 1374 | ||
1362 | /* We can't blindly trust the Super-I/O space configuration bit, | 1375 | /* |
1363 | most BIOS won't set it properly */ | 1376 | * We can't blindly trust the Super-I/O space configuration bit, |
1377 | * most BIOS won't set it properly | ||
1378 | */ | ||
1364 | dev_dbg(&pdev->dev, "bios thermistors:%d\n", use_thermistors); | 1379 | dev_dbg(&pdev->dev, "bios thermistors:%d\n", use_thermistors); |
1365 | for (i = 11; i < data->innr; i++) { | 1380 | for (i = 11; i < data->innr; i++) { |
1366 | reg = pc87360_read_value(data, LD_IN, i, | 1381 | reg = pc87360_read_value(data, LD_IN, i, |
@@ -1391,8 +1406,10 @@ static void pc87360_init_device(struct platform_device *pdev, | |||
1391 | if (use_thermistors) { | 1406 | if (use_thermistors) { |
1392 | for (i = 11; i < data->innr; i++) { | 1407 | for (i = 11; i < data->innr; i++) { |
1393 | if (init >= init_in[i]) { | 1408 | if (init >= init_in[i]) { |
1394 | /* The pin may already be used by thermal | 1409 | /* |
1395 | diodes */ | 1410 | * The pin may already be used by thermal |
1411 | * diodes | ||
1412 | */ | ||
1396 | reg = pc87360_read_value(data, LD_TEMP, | 1413 | reg = pc87360_read_value(data, LD_TEMP, |
1397 | (i-11)/2, PC87365_REG_TEMP_STATUS); | 1414 | (i-11)/2, PC87365_REG_TEMP_STATUS); |
1398 | if (reg & CHAN_ENA) { | 1415 | if (reg & CHAN_ENA) { |
@@ -1444,10 +1461,12 @@ static void pc87360_init_device(struct platform_device *pdev, | |||
1444 | if (init >= 2) { | 1461 | if (init >= 2) { |
1445 | /* Chip config as documented by National Semi. */ | 1462 | /* Chip config as documented by National Semi. */ |
1446 | pc87360_write_value(data, LD_TEMP, 0xF, 0xA, 0x08); | 1463 | pc87360_write_value(data, LD_TEMP, 0xF, 0xA, 0x08); |
1447 | /* We voluntarily omit the bank here, in case the | 1464 | /* |
1448 | sequence itself matters. It shouldn't be a problem, | 1465 | * We voluntarily omit the bank here, in case the |
1449 | since nobody else is supposed to access the | 1466 | * sequence itself matters. It shouldn't be a problem, |
1450 | device at that point. */ | 1467 | * since nobody else is supposed to access the |
1468 | * device at that point. | ||
1469 | */ | ||
1451 | pc87360_write_value(data, LD_TEMP, NO_BANK, 0xB, 0x04); | 1470 | pc87360_write_value(data, LD_TEMP, NO_BANK, 0xB, 0x04); |
1452 | pc87360_write_value(data, LD_TEMP, NO_BANK, 0xC, 0x35); | 1471 | pc87360_write_value(data, LD_TEMP, NO_BANK, 0xC, 0x35); |
1453 | pc87360_write_value(data, LD_TEMP, NO_BANK, 0xD, 0x05); | 1472 | pc87360_write_value(data, LD_TEMP, NO_BANK, 0xD, 0x05); |