Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
01d9def5
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
01d9def5
编写于
1月 19, 2012
作者:
G
Guenter Roeck
提交者:
Guenter Roeck
3月 18, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hwmon: (w83l786ng) Fix multi-line comments
Signed-off-by:
N
Guenter Roeck
<
linux@roeck-us.net
>
上级
130067d7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
36 addition
and
32 deletion
+36
-32
drivers/hwmon/w83l786ng.c
drivers/hwmon/w83l786ng.c
+36
-32
未找到文件。
drivers/hwmon/w83l786ng.c
浏览文件 @
01d9def5
/*
w83l786ng.c - Linux kernel driver for hardware monitoring
Copyright (c) 2007 Kevin Lo <kevlo@kevlo.org>
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
the Free Software Foundation - version 2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
*
w83l786ng.c - Linux kernel driver for hardware monitoring
*
Copyright (c) 2007 Kevin Lo <kevlo@kevlo.org>
*
*
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
*
the Free Software Foundation - version 2.
*
*
This program is distributed in the hope that it will be useful,
*
but WITHOUT ANY WARRANTY; without even the implied warranty of
*
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
GNU General Public License for more details.
*
*
You should have received a copy of the GNU General Public License
*
along with this program; if not, write to the Free Software
*
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
*
02110-1301 USA.
*/
/*
Supports following chips:
Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA
w83l786ng 3 2 2 2 0x7b 0x5ca3 yes no
*/
*
Supports following chips:
*
*
Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA
*
w83l786ng 3 2 2 2 0x7b 0x5ca3 yes no
*/
#include <linux/module.h>
#include <linux/init.h>
...
...
@@ -100,9 +100,11 @@ FAN_TO_REG(long rpm, int div)
#define TEMP_FROM_REG(val) (((val) & 0x80 ? \
(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
multiply/divide by 8 to translate from/to register values. */
/*
* 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
* multiply/divide by 8 to translate from/to register values.
*/
#define IN_TO_REG(val) (SENSORS_LIMIT((((val) + 4) / 8), 0, 255))
#define IN_FROM_REG(val) ((val) * 8)
...
...
@@ -127,7 +129,7 @@ struct w83l786ng_data {
char
valid
;
/* !=0 if following fields are valid */
unsigned
long
last_updated
;
/* In jiffies */
unsigned
long
last_nonvolatile
;
/* In jiffies, last time we update the
nonvolatile registers */
*
nonvolatile registers */
u8
in
[
3
];
u8
in_max
[
3
];
...
...
@@ -139,10 +141,10 @@ struct w83l786ng_data {
u8
temp
[
2
][
3
];
u8
pwm
[
2
];
u8
pwm_mode
[
2
];
/* 0->DC variable voltage
1->PWM variable duty cycle */
*
1->PWM variable duty cycle */
u8
pwm_enable
[
2
];
/* 1->manual
2->thermal cruise (also called SmartFan I) */
*
2->thermal cruise (also called SmartFan I) */
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
]));
}
/* 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
least surprise; the user doesn't expect the fan minimum to change just
because the divisor changed. */
/*
* 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
* least surprise; the user doesn't expect the fan minimum to change just
* because the divisor changed.
*/
static
ssize_t
store_fan_div
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
const
char
*
buf
,
size_t
count
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录