#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/hwmon-vid.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
Go to the source code of this file.
#define DIV_FROM_REG |
( |
|
val | ) |
(1 << (val)) |
#define FAN_FROM_REG |
( |
|
val, |
|
|
|
div |
|
) |
| ((val) == 0 ? 0 : (480000 / ((val) << (div)))) |
#define FAN_TO_REG |
( |
|
val, |
|
|
|
div |
|
) |
| |
Value:
SENSORS_LIMIT((480000 + ((
val) << ((
div)-1))) / ((
val) << (
div)), 1, \
255))
Definition at line 287 of file gl520sm.c.
#define GL520_REG_ALARMS 0x12 |
#define GL520_REG_BEEP_MASK 0x10 |
#define GL520_REG_CHIP_ID 0x00 |
#define GL520_REG_CONF 0x03 |
#define GL520_REG_FAN_DIV 0x0f |
#define GL520_REG_FAN_INPUT 0x07 |
#define GL520_REG_FAN_MIN 0x08 |
#define GL520_REG_MASK 0x11 |
#define GL520_REG_REVISION 0x01 |
#define GL520_REG_VID_INPUT 0x02 |
#define IN_FROM_REG |
( |
|
val | ) |
((val) * 19) |
#define IN_TO_REG |
( |
|
val | ) |
SENSORS_LIMIT((((val) + 9) / 19), 0, 255) |
#define TEMP_FROM_REG |
( |
|
val | ) |
(((val) - 130) * 1000) |
#define TEMP_TO_REG |
( |
|
val | ) |
|
Value:SENSORS_LIMIT(((((
val) < 0 ? \
(
val) - 500 : (
val) + 500) / 1000) + 130), 0, 255)
Definition at line 453 of file gl520sm.c.
#define VDD_FROM_REG |
( |
|
val | ) |
(((val) * 95 + 2) / 4) |
#define VDD_TO_REG |
( |
|
val | ) |
SENSORS_LIMIT((((val) * 4 + 47) / 95), 0, 255) |
MODULE_AUTHOR |
( |
"Frodo Looijaard <[email protected]> |
, |
|
|
""Kyösti Mälkki< kmalkki @cc.hut.fi > |
, |
|
|
""Maarten Deprez< maartendeprez @users.sourceforge.net >" |
|
|
) |
| |
MODULE_DESCRIPTION |
( |
"GL520SM driver" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
gl520_id |
|
|
) |
| |
module_i2c_driver |
( |
gl520_driver |
| ) |
|
module_param |
( |
extra_sensor_type |
, |
|
|
ushort |
, |
|
|
0 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
extra_sensor_type |
, |
|
|
"Type of extra sensor (0=autodetect, 1=temperature, 2=voltage)" |
|
|
) |
| |