aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/adm1031.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-01-19 14:02:14 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-03-18 21:27:33 -0400
commitfbb6670d941fa018af2bebc729091a577899f1fb (patch)
treeb517fef3437387f03001e6618297ba8fece197b0 /drivers/hwmon/adm1031.c
parent94b991d4c780b98bcf36451ab4839f35c19d5e32 (diff)
hwmon: (adm1031) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/adm1031.c')
-rw-r--r--drivers/hwmon/adm1031.c60
1 files changed, 33 insertions, 27 deletions
diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c
index 71b5ec31fdc3..ff37363ea5bc 100644
--- a/drivers/hwmon/adm1031.c
+++ b/drivers/hwmon/adm1031.c
@@ -1,25 +1,25 @@
1/* 1/*
2 adm1031.c - Part of lm_sensors, Linux kernel modules for hardware 2 * adm1031.c - Part of lm_sensors, Linux kernel modules for hardware
3 monitoring 3 * monitoring
4 Based on lm75.c and lm85.c 4 * Based on lm75.c and lm85.c
5 Supports adm1030 / adm1031 5 * Supports adm1030 / adm1031
6 Copyright (C) 2004 Alexandre d'Alton <alex@alexdalton.org> 6 * Copyright (C) 2004 Alexandre d'Alton <alex@alexdalton.org>
7 Reworked by Jean Delvare <khali@linux-fr.org> 7 * Reworked by Jean Delvare <khali@linux-fr.org>
8 8 *
9 This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or 11 * the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version. 12 * (at your option) any later version.
13 13 *
14 This program is distributed in the hope that it will be useful, 14 * This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details. 17 * GNU General Public License for more details.
18 18 *
19 You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22*/ 22 */
23 23
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/init.h> 25#include <linux/init.h>
@@ -80,7 +80,8 @@ struct adm1031_data {
80 char valid; /* !=0 if following fields are valid */ 80 char valid; /* !=0 if following fields are valid */
81 unsigned long last_updated; /* In jiffies */ 81 unsigned long last_updated; /* In jiffies */
82 unsigned int update_interval; /* In milliseconds */ 82 unsigned int update_interval; /* In milliseconds */
83 /* The chan_select_table contains the possible configurations for 83 /*
84 * The chan_select_table contains the possible configurations for
84 * auto fan control. 85 * auto fan control.
85 */ 86 */
86 const auto_chan_table_t *chan_select_table; 87 const auto_chan_table_t *chan_select_table;
@@ -205,7 +206,8 @@ static int AUTO_TEMP_MAX_TO_REG(int val, int reg, int pwm)
205#define GET_FAN_AUTO_BITFIELD(data, idx) \ 206#define GET_FAN_AUTO_BITFIELD(data, idx) \
206 (*(data)->chan_select_table)[FAN_CHAN_FROM_REG((data)->conf1)][idx % 2] 207 (*(data)->chan_select_table)[FAN_CHAN_FROM_REG((data)->conf1)][idx % 2]
207 208
208/* The tables below contains the possible values for the auto fan 209/*
210 * The tables below contains the possible values for the auto fan
209 * control bitfields. the index in the table is the register value. 211 * control bitfields. the index in the table is the register value.
210 * MSb is the auto fan control enable bit, so the four first entries 212 * MSb is the auto fan control enable bit, so the four first entries
211 * in the table disables auto fan control when both bitfields are zero. 213 * in the table disables auto fan control when both bitfields are zero.
@@ -226,7 +228,8 @@ static const auto_chan_table_t auto_channel_select_table_adm1030 = {
226 { 3 /* 0b11 */ , 0 }, 228 { 3 /* 0b11 */ , 0 },
227}; 229};
228 230
229/* That function checks if a bitfield is valid and returns the other bitfield 231/*
232 * That function checks if a bitfield is valid and returns the other bitfield
230 * nearest match if no exact match where found. 233 * nearest match if no exact match where found.
231 */ 234 */
232static int 235static int
@@ -252,7 +255,8 @@ get_fan_auto_nearest(struct adm1031_data *data,
252 break; 255 break;
253 } else if (val == (*data->chan_select_table)[i][chan] && 256 } else if (val == (*data->chan_select_table)[i][chan] &&
254 first_match == -1) { 257 first_match == -1) {
255 /* Save the first match in case of an exact match has 258 /*
259 * Save the first match in case of an exact match has
256 * not been found 260 * not been found
257 */ 261 */
258 first_match = i; 262 first_match = i;
@@ -306,9 +310,11 @@ set_fan_auto_channel(struct device *dev, struct device_attribute *attr,
306 if ((data->conf1 & ADM1031_CONF1_AUTO_MODE) ^ 310 if ((data->conf1 & ADM1031_CONF1_AUTO_MODE) ^
307 (old_fan_mode & ADM1031_CONF1_AUTO_MODE)) { 311 (old_fan_mode & ADM1031_CONF1_AUTO_MODE)) {
308 if (data->conf1 & ADM1031_CONF1_AUTO_MODE) { 312 if (data->conf1 & ADM1031_CONF1_AUTO_MODE) {
309 /* Switch to Auto Fan Mode 313 /*
314 * Switch to Auto Fan Mode
310 * Save PWM registers 315 * Save PWM registers
311 * Set PWM registers to 33% Both */ 316 * Set PWM registers to 33% Both
317 */
312 data->old_pwm[0] = data->pwm[0]; 318 data->old_pwm[0] = data->pwm[0];
313 data->old_pwm[1] = data->pwm[1]; 319 data->old_pwm[1] = data->pwm[1];
314 adm1031_write_value(client, ADM1031_REG_PWM, 0x55); 320 adm1031_write_value(client, ADM1031_REG_PWM, 0x55);