aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-01-19 14:02:28 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-03-18 21:27:39 -0400
commit01d9def5bae959de5d420a2fc09fcc58106513fa (patch)
tree720c29a6e4dfd9781f9645a5dfc56a032f42e5a6
parent130067d7c62dea33f82fbba96ebb042f6fac9474 (diff)
hwmon: (w83l786ng) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/w83l786ng.c68
1 files changed, 36 insertions, 32 deletions
diff --git a/drivers/hwmon/w83l786ng.c b/drivers/hwmon/w83l786ng.c
index a6310b89dedc..5850b7706088 100644
--- a/drivers/hwmon/w83l786ng.c
+++ b/drivers/hwmon/w83l786ng.c
@@ -1,28 +1,28 @@
1/* 1/*
2 w83l786ng.c - Linux kernel driver for hardware monitoring 2 * w83l786ng.c - Linux kernel driver for hardware monitoring
3 Copyright (c) 2007 Kevin Lo <kevlo@kevlo.org> 3 * Copyright (c) 2007 Kevin Lo <kevlo@kevlo.org>
4 4 *
5 This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 the Free Software Foundation - version 2. 7 * the Free Software Foundation - version 2.
8 8 *
9 This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 * GNU General Public License for more details.
13 13 *
14 You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301 USA. 17 * 02110-1301 USA.
18*/ 18 */
19 19
20/* 20/*
21 Supports following chips: 21 * Supports following chips:
22 22 *
23 Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA 23 * Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA
24 w83l786ng 3 2 2 2 0x7b 0x5ca3 yes no 24 * w83l786ng 3 2 2 2 0x7b 0x5ca3 yes no
25*/ 25 */
26 26
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/init.h> 28#include <linux/init.h>
@@ -100,9 +100,11 @@ FAN_TO_REG(long rpm, int div)
100#define TEMP_FROM_REG(val) (((val) & 0x80 ? \ 100#define TEMP_FROM_REG(val) (((val) & 0x80 ? \
101 (val) - 0x100 : (val)) * 1000) 101 (val) - 0x100 : (val)) * 1000)
102 102
103/* The analog voltage inputs have 8mV LSB. Since the sysfs output is 103/*
104 in mV as would be measured on the chip input pin, need to just 104 * The analog voltage inputs have 8mV LSB. Since the sysfs output is
105 multiply/divide by 8 to translate from/to register values. */ 105 * in mV as would be measured on the chip input pin, need to just
106 * multiply/divide by 8 to translate from/to register values.
107 */
106#define IN_TO_REG(val) (SENSORS_LIMIT((((val) + 4) / 8), 0, 255)) 108#define IN_TO_REG(val) (SENSORS_LIMIT((((val) + 4) / 8), 0, 255))
107#define IN_FROM_REG(val) ((val) * 8) 109#define IN_FROM_REG(val) ((val) * 8)
108 110
@@ -127,7 +129,7 @@ struct w83l786ng_data {
127 char valid; /* !=0 if following fields are valid */ 129 char valid; /* !=0 if following fields are valid */
128 unsigned long last_updated; /* In jiffies */ 130 unsigned long last_updated; /* In jiffies */
129 unsigned long last_nonvolatile; /* In jiffies, last time we update the 131 unsigned long last_nonvolatile; /* In jiffies, last time we update the
130 nonvolatile registers */ 132 * nonvolatile registers */
131 133
132 u8 in[3]; 134 u8 in[3];
133 u8 in_max[3]; 135 u8 in_max[3];
@@ -139,10 +141,10 @@ struct w83l786ng_data {
139 u8 temp[2][3]; 141 u8 temp[2][3];
140 u8 pwm[2]; 142 u8 pwm[2];
141 u8 pwm_mode[2]; /* 0->DC variable voltage 143 u8 pwm_mode[2]; /* 0->DC variable voltage
142 1->PWM variable duty cycle */ 144 * 1->PWM variable duty cycle */
143 145
144 u8 pwm_enable[2]; /* 1->manual 146 u8 pwm_enable[2]; /* 1->manual
145 2->thermal cruise (also called SmartFan I) */ 147 * 2->thermal cruise (also called SmartFan I) */
146 u8 tolerance[2]; 148 u8 tolerance[2];
147}; 149};
148 150
@@ -285,10 +287,12 @@ show_fan_div(struct device *dev, struct device_attribute *attr,
285 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); 287 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr]));
286} 288}
287 289
288/* Note: we save and restore the fan minimum here, because its value is 290/*
289 determined in part by the fan divisor. This follows the principle of 291 * Note: we save and restore the fan minimum here, because its value is
290 least surprise; the user doesn't expect the fan minimum to change just 292 * determined in part by the fan divisor. This follows the principle of
291 because the divisor changed. */ 293 * least surprise; the user doesn't expect the fan minimum to change just
294 * because the divisor changed.
295 */
292static ssize_t 296static ssize_t
293store_fan_div(struct device *dev, struct device_attribute *attr, 297store_fan_div(struct device *dev, struct device_attribute *attr,
294 const char *buf, size_t count) 298 const char *buf, size_t count)