forked from mirrors/linux
		
	hwmon: (w83l786ng) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
		
							parent
							
								
									130067d7c6
								
							
						
					
					
						commit
						01d9def5ba
					
				
					 1 changed files with 36 additions and 32 deletions
				
			
		|  | @ -1,28 +1,28 @@ | ||||||
| /*
 | /*
 | ||||||
|     w83l786ng.c - Linux kernel driver for hardware monitoring |  * w83l786ng.c - Linux kernel driver for hardware monitoring | ||||||
|     Copyright (c) 2007 Kevin Lo <kevlo@kevlo.org> |  * Copyright (c) 2007 Kevin Lo <kevlo@kevlo.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 - version 2. |  * the Free Software Foundation - version 2. | ||||||
| 
 |  * | ||||||
|     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., 51 Franklin Street, Fifth Floor, Boston, MA |  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||||||
|     02110-1301 USA. |  * 02110-1301 USA. | ||||||
| */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|     Supports following chips: |  * Supports following chips: | ||||||
| 
 |  * | ||||||
|     Chip	#vin	#fanin	#pwm	#temp	wchipid	vendid	i2c	ISA |  * Chip	#vin	#fanin	#pwm	#temp	wchipid	vendid	i2c	ISA | ||||||
|     w83l786ng	3	2	2	2	0x7b	0x5ca3	yes	no |  * w83l786ng	3	2	2	2	0x7b	0x5ca3	yes	no | ||||||
| */ |  */ | ||||||
| 
 | 
 | ||||||
| #include <linux/module.h> | #include <linux/module.h> | ||||||
| #include <linux/init.h> | #include <linux/init.h> | ||||||
|  | @ -100,9 +100,11 @@ FAN_TO_REG(long rpm, int div) | ||||||
| #define TEMP_FROM_REG(val)	(((val) & 0x80 ? \ | #define TEMP_FROM_REG(val)	(((val) & 0x80 ? \ | ||||||
| 				  (val) - 0x100 : (val)) * 1000) | 				  (val) - 0x100 : (val)) * 1000) | ||||||
| 
 | 
 | ||||||
| /* The analog voltage inputs have 8mV LSB. Since the sysfs output is
 | /*
 | ||||||
|    in mV as would be measured on the chip input pin, need to just |  * The analog voltage inputs have 8mV LSB. Since the sysfs output is | ||||||
|    multiply/divide by 8 to translate from/to register values. */ |  * in mV as would be measured on the chip input pin, need to just | ||||||
|  |  * multiply/divide by 8 to translate from/to register values. | ||||||
|  |  */ | ||||||
| #define IN_TO_REG(val)		(SENSORS_LIMIT((((val) + 4) / 8), 0, 255)) | #define IN_TO_REG(val)		(SENSORS_LIMIT((((val) + 4) / 8), 0, 255)) | ||||||
| #define IN_FROM_REG(val)	((val) * 8) | #define IN_FROM_REG(val)	((val) * 8) | ||||||
| 
 | 
 | ||||||
|  | @ -127,7 +129,7 @@ struct w83l786ng_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 long last_nonvolatile;	/* In jiffies, last time we update the
 | 	unsigned long last_nonvolatile;	/* In jiffies, last time we update the
 | ||||||
| 					   nonvolatile registers */ | 					 * nonvolatile registers */ | ||||||
| 
 | 
 | ||||||
| 	u8 in[3]; | 	u8 in[3]; | ||||||
| 	u8 in_max[3]; | 	u8 in_max[3]; | ||||||
|  | @ -139,10 +141,10 @@ struct w83l786ng_data { | ||||||
| 	u8 temp[2][3]; | 	u8 temp[2][3]; | ||||||
| 	u8 pwm[2]; | 	u8 pwm[2]; | ||||||
| 	u8 pwm_mode[2];	/* 0->DC variable voltage
 | 	u8 pwm_mode[2];	/* 0->DC variable voltage
 | ||||||
| 			   1->PWM variable duty cycle */ | 			 * 1->PWM variable duty cycle */ | ||||||
| 
 | 
 | ||||||
| 	u8 pwm_enable[2]; /* 1->manual
 | 	u8 pwm_enable[2]; /* 1->manual
 | ||||||
| 			     2->thermal cruise (also called SmartFan I) */ | 			   * 2->thermal cruise (also called SmartFan I) */ | ||||||
| 	u8 tolerance[2]; | 	u8 tolerance[2]; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | @ -285,10 +287,12 @@ show_fan_div(struct device *dev, struct device_attribute *attr, | ||||||
| 	return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); | 	return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* Note: we save and restore the fan minimum here, because its value is
 | /*
 | ||||||
|    determined in part by the fan divisor.  This follows the principle of |  * Note: we save and restore the fan minimum here, because its value is | ||||||
|    least surprise; the user doesn't expect the fan minimum to change just |  * determined in part by the fan divisor.  This follows the principle of | ||||||
|    because the divisor changed. */ |  * least surprise; the user doesn't expect the fan minimum to change just | ||||||
|  |  * because the divisor changed. | ||||||
|  |  */ | ||||||
| static ssize_t | static ssize_t | ||||||
| store_fan_div(struct device *dev, struct device_attribute *attr, | store_fan_div(struct device *dev, struct device_attribute *attr, | ||||||
| 	      const char *buf, size_t count) | 	      const char *buf, size_t count) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Guenter Roeck
						Guenter Roeck