|
#define | GL518_REG_CHIP_ID 0x00 |
|
#define | GL518_REG_REVISION 0x01 |
|
#define | GL518_REG_VENDOR_ID 0x02 |
|
#define | GL518_REG_CONF 0x03 |
|
#define | GL518_REG_TEMP_IN 0x04 |
|
#define | GL518_REG_TEMP_MAX 0x05 |
|
#define | GL518_REG_TEMP_HYST 0x06 |
|
#define | GL518_REG_FAN_COUNT 0x07 |
|
#define | GL518_REG_FAN_LIMIT 0x08 |
|
#define | GL518_REG_VIN1_LIMIT 0x09 |
|
#define | GL518_REG_VIN2_LIMIT 0x0a |
|
#define | GL518_REG_VIN3_LIMIT 0x0b |
|
#define | GL518_REG_VDD_LIMIT 0x0c |
|
#define | GL518_REG_VIN3 0x0d |
|
#define | GL518_REG_MISC 0x0f |
|
#define | GL518_REG_ALARM 0x10 |
|
#define | GL518_REG_MASK 0x11 |
|
#define | GL518_REG_INT 0x12 |
|
#define | GL518_REG_VIN2 0x13 |
|
#define | GL518_REG_VIN1 0x14 |
|
#define | GL518_REG_VDD 0x15 |
|
#define | RAW_FROM_REG(val) val |
|
#define | BOOL_FROM_REG(val) ((val) ? 0 : 1) |
|
#define | BOOL_TO_REG(val) ((val) ? 0 : 1) |
|
#define | TEMP_TO_REG(val) |
|
#define | TEMP_FROM_REG(val) (((val) - 119) * 1000) |
|
#define | FAN_FROM_REG(val, div) ((val) == 0 ? 0 : (480000 / ((val) * (div)))) |
|
#define | IN_TO_REG(val) SENSORS_LIMIT((((val) + 9) / 19), 0, 255) |
|
#define | IN_FROM_REG(val) ((val) * 19) |
|
#define | VDD_TO_REG(val) SENSORS_LIMIT((((val) * 4 + 47) / 95), 0, 255) |
|
#define | VDD_FROM_REG(val) (((val) * 95 + 2) / 4) |
|
#define | DIV_FROM_REG(val) (1 << (val)) |
|
#define | BEEP_MASK_TO_REG(val) ((val) & 0x7f & data->alarm_mask) |
|
#define | BEEP_MASK_FROM_REG(val) ((val) & 0x7f) |
|
#define | show(type, suffix, value) |
|
#define | set(type, suffix, value, reg) |
|
#define | set_bits(type, suffix, value, reg, mask, shift) |
|
#define | set_low(type, suffix, value, reg) set_bits(type, suffix, value, reg, 0x00ff, 0) |
|
#define | set_high(type, suffix, value, reg) set_bits(type, suffix, value, reg, 0xff00, 8) |
|
|
enum | chips {
ad7416,
ad7417,
ad7418,
adm1021,
adm1023,
max1617,
max1617a,
thmc10,
lm84,
gl523sm,
mc1066,
adm1025,
ne1619,
adm1030,
adm1031,
adm9240,
ds1780,
lm81,
adt7473,
adt7475,
adt7476,
adt7490,
amc6821,
dme1737,
sch5027,
sch311x,
sch5127,
f71808e,
f71808a,
f71858fg,
f71862fg,
f71869,
f71869a,
f71882fg,
f71889fg,
f71889ed,
f71889a,
f8000,
f81865f,
f75373,
f75375,
f75387,
fscpos,
fscher,
fscscy,
fschrc,
fschmd,
fschds,
fscsyl,
gl518sm_r00,
gl518sm_r80,
it87,
it8712,
it8716,
it8718,
it8720,
it8721,
it8728,
it8782,
it8783,
lm63,
lm64,
lm96163,
lm78,
lm79,
lm83,
lm82,
any_chip,
lm85b,
lm85c,
adm1027,
adt7463,
adt7468,
emc6d100,
emc6d102,
emc6d103,
emc6d103s,
lm87,
adm1024,
lm90,
adm1032,
lm99,
lm86,
max6657,
max6659,
adt7461,
max6680,
max6646,
w83l771,
max6696,
sa56004,
g781,
max1110,
max1111,
max1112,
max1113,
max16065,
max16066,
max16067,
max16068,
max16070,
max16071,
max1668,
max1805,
max1989,
mcp3021,
mcp3221,
adm1075,
adm1275,
adm1276,
lm25066,
lm5064,
lm5066,
ltc2978,
ltc3880,
max34440,
max34441,
max34446,
ucd9000,
ucd90120,
ucd90124,
ucd9090,
ucd90910,
ucd9200,
ucd9220,
ucd9222,
ucd9224,
ucd9240,
ucd9244,
ucd9246,
ucd9248,
zl2004,
zl2005,
zl2006,
zl2008,
zl2105,
zl2106,
zl6100,
zl6105,
zl9101,
zl9117,
smm465,
smm665,
smm665c,
smm764,
smm766,
smsc47m1,
smsc47m2,
thmc50,
adm1022,
tmp401,
tmp411,
tmp421,
tmp422,
tmp423,
w83627hf,
w83627thf,
w83697hf,
w83637hf,
w83687thf,
w83781d,
w83782d,
w83783s,
as99127f,
DC21040 = 0,
DC21041 = 1,
DC21140 = 2,
DC21142 = 3,
DC21143 = 3,
LC82C168,
MX98713,
MX98715,
MX98725,
AX88140,
PNIC2,
COMET,
COMPEX9881,
I21145,
DM910X,
CONEXANT,
TPS62360,
TPS62361,
TPS62362,
TPS62363,
sc18is602,
sc18is602b,
sc18is603,
f71808fg,
f71858fg,
f71862fg,
f71869,
f71882fg,
f71889fg
} |
|
|
| MODULE_DEVICE_TABLE (i2c, gl518_id) |
|
| show (TEMP, temp_input1, temp_in) |
|
| show (TEMP, temp_max1, temp_max) |
|
| show (TEMP, temp_hyst1, temp_hyst) |
|
| show (BOOL, fan_auto1, fan_auto1) |
|
| show (VDD, in_input0, voltage_in[0]) |
|
| show (IN, in_input1, voltage_in[1]) |
|
| show (IN, in_input2, voltage_in[2]) |
|
| show (IN, in_input3, voltage_in[3]) |
|
| show (VDD, in_min0, voltage_min[0]) |
|
| show (IN, in_min1, voltage_min[1]) |
|
| show (IN, in_min2, voltage_min[2]) |
|
| show (IN, in_min3, voltage_min[3]) |
|
| show (VDD, in_max0, voltage_max[0]) |
|
| show (IN, in_max1, voltage_max[1]) |
|
| show (IN, in_max2, voltage_max[2]) |
|
| show (IN, in_max3, voltage_max[3]) |
|
| show (RAW, alarms, alarms) |
|
| show (BOOL, beep_enable, beep_enable) |
|
| show (BEEP_MASK, beep_mask, beep_mask) |
|
| set (TEMP, temp_max1, temp_max, GL518_REG_TEMP_MAX) |
|
| set (TEMP, temp_hyst1, temp_hyst, GL518_REG_TEMP_HYST) |
|
| set_bits (BOOL, fan_auto1, fan_auto1, GL518_REG_MISC, 0x08, 3) |
|
| set_low (VDD, in_min0, voltage_min[0], GL518_REG_VDD_LIMIT) |
|
| set_low (IN, in_min1, voltage_min[1], GL518_REG_VIN1_LIMIT) |
|
| set_low (IN, in_min2, voltage_min[2], GL518_REG_VIN2_LIMIT) |
|
| set_low (IN, in_min3, voltage_min[3], GL518_REG_VIN3_LIMIT) |
|
| set_high (VDD, in_max0, voltage_max[0], GL518_REG_VDD_LIMIT) |
|
| set_high (IN, in_max1, voltage_max[1], GL518_REG_VIN1_LIMIT) |
|
| set_high (IN, in_max2, voltage_max[2], GL518_REG_VIN2_LIMIT) |
|
| set_high (IN, in_max3, voltage_max[3], GL518_REG_VIN3_LIMIT) |
|
| set_bits (BOOL, beep_enable, beep_enable, GL518_REG_CONF, 0x04, 2) |
|
| set (BEEP_MASK, beep_mask, beep_mask, GL518_REG_ALARM) |
|
| module_i2c_driver (gl518_driver) |
|
| MODULE_AUTHOR ("Frodo Looijaard <[email protected]>, ""Kyosti Malkki <[email protected]> and ""Hong-Gunn Chew <[email protected]>") |
|
| MODULE_DESCRIPTION ("GL518SM driver") |
|
| MODULE_LICENSE ("GPL") |
|