Commit fbb6670d authored by Guenter Roeck's avatar Guenter Roeck Committed by Guenter Roeck

hwmon: (adm1031) Fix multi-line comments

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 94b991d4
/* /*
adm1031.c - Part of lm_sensors, Linux kernel modules for hardware * adm1031.c - Part of lm_sensors, Linux kernel modules for hardware
monitoring * monitoring
Based on lm75.c and lm85.c * Based on lm75.c and lm85.c
Supports adm1030 / adm1031 * Supports adm1030 / adm1031
Copyright (C) 2004 Alexandre d'Alton <alex@alexdalton.org> * Copyright (C) 2004 Alexandre d'Alton <alex@alexdalton.org>
Reworked by Jean Delvare <khali@linux-fr.org> * Reworked by Jean Delvare <khali@linux-fr.org>
*
This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. * (at your option) any later version.
*
This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. * GNU General Public License for more details.
*
You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -80,7 +80,8 @@ struct adm1031_data { ...@@ -80,7 +80,8 @@ struct adm1031_data {
char valid; /* !=0 if following fields are valid */ char valid; /* !=0 if following fields are valid */
unsigned long last_updated; /* In jiffies */ unsigned long last_updated; /* In jiffies */
unsigned int update_interval; /* In milliseconds */ unsigned int update_interval; /* In milliseconds */
/* The chan_select_table contains the possible configurations for /*
* The chan_select_table contains the possible configurations for
* auto fan control. * auto fan control.
*/ */
const auto_chan_table_t *chan_select_table; 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,7 +206,8 @@ static int AUTO_TEMP_MAX_TO_REG(int val, int reg, int pwm)
#define GET_FAN_AUTO_BITFIELD(data, idx) \ #define GET_FAN_AUTO_BITFIELD(data, idx) \
(*(data)->chan_select_table)[FAN_CHAN_FROM_REG((data)->conf1)][idx % 2] (*(data)->chan_select_table)[FAN_CHAN_FROM_REG((data)->conf1)][idx % 2]
/* The tables below contains the possible values for the auto fan /*
* The tables below contains the possible values for the auto fan
* control bitfields. the index in the table is the register value. * control bitfields. the index in the table is the register value.
* MSb is the auto fan control enable bit, so the four first entries * MSb is the auto fan control enable bit, so the four first entries
* in the table disables auto fan control when both bitfields are zero. * 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,7 +228,8 @@ static const auto_chan_table_t auto_channel_select_table_adm1030 = {
{ 3 /* 0b11 */ , 0 }, { 3 /* 0b11 */ , 0 },
}; };
/* That function checks if a bitfield is valid and returns the other bitfield /*
* That function checks if a bitfield is valid and returns the other bitfield
* nearest match if no exact match where found. * nearest match if no exact match where found.
*/ */
static int static int
...@@ -252,7 +255,8 @@ get_fan_auto_nearest(struct adm1031_data *data, ...@@ -252,7 +255,8 @@ get_fan_auto_nearest(struct adm1031_data *data,
break; break;
} else if (val == (*data->chan_select_table)[i][chan] && } else if (val == (*data->chan_select_table)[i][chan] &&
first_match == -1) { first_match == -1) {
/* Save the first match in case of an exact match has /*
* Save the first match in case of an exact match has
* not been found * not been found
*/ */
first_match = i; first_match = i;
...@@ -306,9 +310,11 @@ set_fan_auto_channel(struct device *dev, struct device_attribute *attr, ...@@ -306,9 +310,11 @@ set_fan_auto_channel(struct device *dev, struct device_attribute *attr,
if ((data->conf1 & ADM1031_CONF1_AUTO_MODE) ^ if ((data->conf1 & ADM1031_CONF1_AUTO_MODE) ^
(old_fan_mode & ADM1031_CONF1_AUTO_MODE)) { (old_fan_mode & ADM1031_CONF1_AUTO_MODE)) {
if (data->conf1 & ADM1031_CONF1_AUTO_MODE) { if (data->conf1 & ADM1031_CONF1_AUTO_MODE) {
/* Switch to Auto Fan Mode /*
* Switch to Auto Fan Mode
* Save PWM registers * Save PWM registers
* Set PWM registers to 33% Both */ * Set PWM registers to 33% Both
*/
data->old_pwm[0] = data->pwm[0]; data->old_pwm[0] = data->pwm[0];
data->old_pwm[1] = data->pwm[1]; data->old_pwm[1] = data->pwm[1];
adm1031_write_value(client, ADM1031_REG_PWM, 0x55); adm1031_write_value(client, ADM1031_REG_PWM, 0x55);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment