aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/f71882fg.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-01-19 14:02:17 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-03-18 21:27:15 -0400
commit20eaf7247ed9ea15c0e117cf58206f3b64219382 (patch)
treed637be71a6ac8a9a4d68561418d1a697ddfd4ff8 /drivers/hwmon/f71882fg.c
parent4bebced84fb66e8f4c061c5579264b112c39fdec (diff)
hwmon: (f71882fg) Fix multi-line comments
Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/f71882fg.c')
-rw-r--r--drivers/hwmon/f71882fg.c59
1 files changed, 37 insertions, 22 deletions
diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
index f8a9c9a86a44..6d1226365e30 100644
--- a/drivers/hwmon/f71882fg.c
+++ b/drivers/hwmon/f71882fg.c
@@ -252,9 +252,11 @@ struct f71882fg_data {
252 u16 fan_full_speed[4]; 252 u16 fan_full_speed[4];
253 u8 fan_status; 253 u8 fan_status;
254 u8 fan_beep; 254 u8 fan_beep;
255 /* Note: all models have max 3 temperature channels, but on some 255 /*
256 they are addressed as 0-2 and on others as 1-3, so for coding 256 * Note: all models have max 3 temperature channels, but on some
257 convenience we reserve space for 4 channels */ 257 * they are addressed as 0-2 and on others as 1-3, so for coding
258 * convenience we reserve space for 4 channels
259 */
258 u16 temp[4]; 260 u16 temp[4];
259 u8 temp_ovt[4]; 261 u8 temp_ovt[4];
260 u8 temp_high[4]; 262 u8 temp_high[4];
@@ -376,8 +378,10 @@ static struct platform_driver f71882fg_driver = {
376 378
377static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); 379static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
378 380
379/* Temp attr for the f71858fg, the f71858fg is special as it has its 381/*
380 temperature indexes start at 0 (the others start at 1) */ 382 * Temp attr for the f71858fg, the f71858fg is special as it has its
383 * temperature indexes start at 0 (the others start at 1)
384 */
381static struct sensor_device_attribute_2 f71858fg_temp_attr[] = { 385static struct sensor_device_attribute_2 f71858fg_temp_attr[] = {
382 SENSOR_ATTR_2(temp1_input, S_IRUGO, show_temp, NULL, 0, 0), 386 SENSOR_ATTR_2(temp1_input, S_IRUGO, show_temp, NULL, 0, 0),
383 SENSOR_ATTR_2(temp1_max, S_IRUGO|S_IWUSR, show_temp_max, 387 SENSOR_ATTR_2(temp1_max, S_IRUGO|S_IWUSR, show_temp_max,
@@ -424,9 +428,11 @@ static struct sensor_device_attribute_2 fxxxx_temp_attr[3][9] = { {
424 store_temp_max, 0, 1), 428 store_temp_max, 0, 1),
425 SENSOR_ATTR_2(temp1_max_hyst, S_IRUGO|S_IWUSR, show_temp_max_hyst, 429 SENSOR_ATTR_2(temp1_max_hyst, S_IRUGO|S_IWUSR, show_temp_max_hyst,
426 store_temp_max_hyst, 0, 1), 430 store_temp_max_hyst, 0, 1),
427 /* Should really be temp1_max_alarm, but older versions did not handle 431 /*
428 the max and crit alarms separately and lm_sensors v2 depends on the 432 * Should really be temp1_max_alarm, but older versions did not handle
429 presence of temp#_alarm files. The same goes for temp2/3 _alarm. */ 433 * the max and crit alarms separately and lm_sensors v2 depends on the
434 * presence of temp#_alarm files. The same goes for temp2/3 _alarm.
435 */
430 SENSOR_ATTR_2(temp1_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 1), 436 SENSOR_ATTR_2(temp1_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 1),
431 SENSOR_ATTR_2(temp1_crit, S_IRUGO|S_IWUSR, show_temp_crit, 437 SENSOR_ATTR_2(temp1_crit, S_IRUGO|S_IWUSR, show_temp_crit,
432 store_temp_crit, 0, 1), 438 store_temp_crit, 0, 1),
@@ -485,10 +491,11 @@ static struct sensor_device_attribute_2 fxxxx_temp_beep_attr[3][2] = { {
485 store_temp_beep, 0, 7), 491 store_temp_beep, 0, 7),
486} }; 492} };
487 493
488/* Temp attr for the f8000 494/*
489 Note on the f8000 temp_ovt (crit) is used as max, and temp_high (max) 495 * Temp attr for the f8000
490 is used as hysteresis value to clear alarms 496 * Note on the f8000 temp_ovt (crit) is used as max, and temp_high (max)
491 Also like the f71858fg its temperature indexes start at 0 497 * is used as hysteresis value to clear alarms
498 * Also like the f71858fg its temperature indexes start at 0
492 */ 499 */
493static struct sensor_device_attribute_2 f8000_temp_attr[] = { 500static struct sensor_device_attribute_2 f8000_temp_attr[] = {
494 SENSOR_ATTR_2(temp1_input, S_IRUGO, show_temp, NULL, 0, 0), 501 SENSOR_ATTR_2(temp1_input, S_IRUGO, show_temp, NULL, 0, 0),
@@ -603,8 +610,10 @@ static struct sensor_device_attribute_2 fxxxx_fan_beep_attr[] = {
603 store_fan_beep, 0, 3), 610 store_fan_beep, 0, 3),
604}; 611};
605 612
606/* PWM attr for the f71862fg, fewer pwms and fewer zones per pwm than the 613/*
607 standard models */ 614 * PWM attr for the f71862fg, fewer pwms and fewer zones per pwm than the
615 * standard models
616 */
608static struct sensor_device_attribute_2 f71862fg_auto_pwm_attr[3][7] = { { 617static struct sensor_device_attribute_2 f71862fg_auto_pwm_attr[3][7] = { {
609 SENSOR_ATTR_2(pwm1_auto_channels_temp, S_IRUGO|S_IWUSR, 618 SENSOR_ATTR_2(pwm1_auto_channels_temp, S_IRUGO|S_IWUSR,
610 show_pwm_auto_point_channel, 619 show_pwm_auto_point_channel,
@@ -673,9 +682,11 @@ static struct sensor_device_attribute_2 f71862fg_auto_pwm_attr[3][7] = { {
673 show_pwm_auto_point_temp_hyst, NULL, 3, 2), 682 show_pwm_auto_point_temp_hyst, NULL, 3, 2),
674} }; 683} };
675 684
676/* PWM attr for the f71808e/f71869, almost identical to the f71862fg, but the 685/*
677 pwm setting when the temperature is above the pwmX_auto_point1_temp can be 686 * PWM attr for the f71808e/f71869, almost identical to the f71862fg, but the
678 programmed instead of being hardcoded to 0xff */ 687 * pwm setting when the temperature is above the pwmX_auto_point1_temp can be
688 * programmed instead of being hardcoded to 0xff
689 */
679static struct sensor_device_attribute_2 f71869_auto_pwm_attr[3][8] = { { 690static struct sensor_device_attribute_2 f71869_auto_pwm_attr[3][8] = { {
680 SENSOR_ATTR_2(pwm1_auto_channels_temp, S_IRUGO|S_IWUSR, 691 SENSOR_ATTR_2(pwm1_auto_channels_temp, S_IRUGO|S_IWUSR,
681 show_pwm_auto_point_channel, 692 show_pwm_auto_point_channel,
@@ -925,9 +936,11 @@ static struct sensor_device_attribute_2 f8000_fan_attr[] = {
925 SENSOR_ATTR_2(fan4_input, S_IRUGO, show_fan, NULL, 0, 3), 936 SENSOR_ATTR_2(fan4_input, S_IRUGO, show_fan, NULL, 0, 3),
926}; 937};
927 938
928/* PWM attr for the f8000, zones mapped to temp instead of to pwm! 939/*
929 Also the register block at offset A0 maps to TEMP1 (so our temp2, as the 940 * PWM attr for the f8000, zones mapped to temp instead of to pwm!
930 F8000 starts counting temps at 0), B0 maps the TEMP2 and C0 maps to TEMP0 */ 941 * Also the register block at offset A0 maps to TEMP1 (so our temp2, as the
942 * F8000 starts counting temps at 0), B0 maps the TEMP2 and C0 maps to TEMP0
943 */
931static struct sensor_device_attribute_2 f8000_auto_pwm_attr[3][14] = { { 944static struct sensor_device_attribute_2 f8000_auto_pwm_attr[3][14] = { {
932 SENSOR_ATTR_2(pwm1_auto_channels_temp, S_IRUGO|S_IWUSR, 945 SENSOR_ATTR_2(pwm1_auto_channels_temp, S_IRUGO|S_IWUSR,
933 show_pwm_auto_point_channel, 946 show_pwm_auto_point_channel,
@@ -2295,8 +2308,10 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)
2295 data->temp_config = 2308 data->temp_config =
2296 f71882fg_read8(data, F71882FG_REG_TEMP_CONFIG); 2309 f71882fg_read8(data, F71882FG_REG_TEMP_CONFIG);
2297 if (data->temp_config & 0x10) 2310 if (data->temp_config & 0x10)
2298 /* The f71858fg temperature alarms behave as 2311 /*
2299 the f8000 alarms in this mode */ 2312 * The f71858fg temperature alarms behave as
2313 * the f8000 alarms in this mode
2314 */
2300 err = f71882fg_create_sysfs_files(pdev, 2315 err = f71882fg_create_sysfs_files(pdev,
2301 f8000_temp_attr, 2316 f8000_temp_attr,
2302 ARRAY_SIZE(f8000_temp_attr)); 2317 ARRAY_SIZE(f8000_temp_attr));