Linux Kernel
3.7.1
|
#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-vid.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/mutex.h>
Go to the source code of this file.
Data Structures | |
struct | lm85_zone |
struct | lm85_autofan |
struct | lm85_data |
Macros | |
#define | LM85_REG_IN(nr) (0x20 + (nr)) |
#define | LM85_REG_IN_MIN(nr) (0x44 + (nr) * 2) |
#define | LM85_REG_IN_MAX(nr) (0x45 + (nr) * 2) |
#define | LM85_REG_TEMP(nr) (0x25 + (nr)) |
#define | LM85_REG_TEMP_MIN(nr) (0x4e + (nr) * 2) |
#define | LM85_REG_TEMP_MAX(nr) (0x4f + (nr) * 2) |
#define | LM85_REG_FAN(nr) (0x28 + (nr) * 2) |
#define | LM85_REG_FAN_MIN(nr) (0x54 + (nr) * 2) |
#define | LM85_REG_PWM(nr) (0x30 + (nr)) |
#define | LM85_REG_COMPANY 0x3e |
#define | LM85_REG_VERSTEP 0x3f |
#define | ADT7468_REG_CFG5 0x7c |
#define | ADT7468_OFF64 (1 << 0) |
#define | ADT7468_HFPWM (1 << 1) |
#define | IS_ADT7468_OFF64(data) ((data)->type == adt7468 && !((data)->cfg5 & ADT7468_OFF64)) |
#define | IS_ADT7468_HFPWM(data) ((data)->type == adt7468 && !((data)->cfg5 & ADT7468_HFPWM)) |
#define | LM85_COMPANY_NATIONAL 0x01 |
#define | LM85_COMPANY_ANALOG_DEV 0x41 |
#define | LM85_COMPANY_SMSC 0x5c |
#define | LM85_VERSTEP_VMASK 0xf0 |
#define | LM85_VERSTEP_GENERIC 0x60 |
#define | LM85_VERSTEP_GENERIC2 0x70 |
#define | LM85_VERSTEP_LM85C 0x60 |
#define | LM85_VERSTEP_LM85B 0x62 |
#define | LM85_VERSTEP_LM96000_1 0x68 |
#define | LM85_VERSTEP_LM96000_2 0x69 |
#define | LM85_VERSTEP_ADM1027 0x60 |
#define | LM85_VERSTEP_ADT7463 0x62 |
#define | LM85_VERSTEP_ADT7463C 0x6A |
#define | LM85_VERSTEP_ADT7468_1 0x71 |
#define | LM85_VERSTEP_ADT7468_2 0x72 |
#define | LM85_VERSTEP_EMC6D100_A0 0x60 |
#define | LM85_VERSTEP_EMC6D100_A1 0x61 |
#define | LM85_VERSTEP_EMC6D102 0x65 |
#define | LM85_VERSTEP_EMC6D103_A0 0x68 |
#define | LM85_VERSTEP_EMC6D103_A1 0x69 |
#define | LM85_VERSTEP_EMC6D103S 0x6A /* Also known as EMC6D103:A2 */ |
#define | LM85_REG_CONFIG 0x40 |
#define | LM85_REG_ALARM1 0x41 |
#define | LM85_REG_ALARM2 0x42 |
#define | LM85_REG_VID 0x43 |
#define | LM85_REG_AFAN_CONFIG(nr) (0x5c + (nr)) |
#define | LM85_REG_AFAN_RANGE(nr) (0x5f + (nr)) |
#define | LM85_REG_AFAN_SPIKE1 0x62 |
#define | LM85_REG_AFAN_MINPWM(nr) (0x64 + (nr)) |
#define | LM85_REG_AFAN_LIMIT(nr) (0x67 + (nr)) |
#define | LM85_REG_AFAN_CRITICAL(nr) (0x6a + (nr)) |
#define | LM85_REG_AFAN_HYST1 0x6d |
#define | LM85_REG_AFAN_HYST2 0x6e |
#define | ADM1027_REG_EXTEND_ADC1 0x76 |
#define | ADM1027_REG_EXTEND_ADC2 0x77 |
#define | EMC6D100_REG_ALARM3 0x7d |
#define | EMC6D100_REG_IN(nr) (0x70 + ((nr) - 5)) |
#define | EMC6D100_REG_IN_MIN(nr) (0x73 + ((nr) - 5) * 2) |
#define | EMC6D100_REG_IN_MAX(nr) (0x74 + ((nr) - 5) * 2) |
#define | EMC6D102_REG_EXTEND_ADC1 0x85 |
#define | EMC6D102_REG_EXTEND_ADC2 0x86 |
#define | EMC6D102_REG_EXTEND_ADC3 0x87 |
#define | EMC6D102_REG_EXTEND_ADC4 0x88 |
#define | SCALE(val, from, to) (((val) * (to) + ((from) / 2)) / (from)) |
#define | INS_TO_REG(n, val) SENSORS_LIMIT(SCALE(val, lm85_scaling[n], 192), 0, 255) |
#define | INSEXT_FROM_REG(n, val, ext) SCALE(((val) << 4) + (ext), 192 << 4, lm85_scaling[n]) |
#define | INS_FROM_REG(n, val) SCALE((val), 192, lm85_scaling[n]) |
#define | FAN_FROM_REG(val) |
#define | TEMP_TO_REG(val) SENSORS_LIMIT(SCALE(val, 1000, 1), -127, 127) |
#define | TEMPEXT_FROM_REG(val, ext) SCALE(((val) << 4) + (ext), 16, 1000) |
#define | TEMP_FROM_REG(val) ((val) * 1000) |
#define | PWM_TO_REG(val) SENSORS_LIMIT(val, 0, 255) |
#define | PWM_FROM_REG(val) (val) |
#define | RANGE_FROM_REG(val) lm85_range_map[(val) & 0x0f] |
#define | ZONE_FROM_REG(val) lm85_zone_map[(val) >> 5] |
#define | HYST_TO_REG(val) SENSORS_LIMIT(((val) + 500) / 1000, 0, 15) |
#define | HYST_FROM_REG(val) ((val) * 1000) |
#define | LM85_DATA_INTERVAL (HZ + HZ / 2) |
#define | LM85_CONFIG_INTERVAL (1 * 60 * HZ) |
#define | show_fan_offset(offset) |
#define | show_pwm_reg(offset) |
#define | show_in_reg(offset) |
#define | show_temp_reg(offset) |
#define | pwm_auto(offset) |
#define | temp_auto(offset) |
Functions | |
MODULE_DEVICE_TABLE (i2c, lm85_id) | |
show_fan_offset (1) | |
show_fan_offset (2) | |
show_fan_offset (3) | |
show_fan_offset (4) | |
show_pwm_reg (1) | |
show_pwm_reg (2) | |
show_pwm_reg (3) | |
show_in_reg (0) | |
show_in_reg (1) | |
show_in_reg (2) | |
show_in_reg (3) | |
show_in_reg (4) | |
show_in_reg (5) | |
show_in_reg (6) | |
show_in_reg (7) | |
show_temp_reg (1) | |
show_temp_reg (2) | |
show_temp_reg (3) | |
pwm_auto (1) | |
pwm_auto (2) | |
pwm_auto (3) | |
temp_auto (1) | |
temp_auto (2) | |
temp_auto (3) | |
module_i2c_driver (lm85_driver) | |
MODULE_LICENSE ("GPL") | |
MODULE_AUTHOR ("Philip Pokorny <[email protected]>, ""Margit Schubert-While <margitsw@t-online.de>, ""Justin Thiessen <[email protected]>") | |
MODULE_DESCRIPTION ("LM85-B, LM85-C driver") | |
#define FAN_FROM_REG | ( | val | ) |
#define LM85_VERSTEP_EMC6D103S 0x6A /* Also known as EMC6D103:A2 */ |
#define pwm_auto | ( | offset | ) |
#define show_fan_offset | ( | offset | ) |
#define show_in_reg | ( | offset | ) |
#define show_pwm_reg | ( | offset | ) |
#define show_temp_reg | ( | offset | ) |
#define temp_auto | ( | offset | ) |
enum chips |
MODULE_AUTHOR | ( | "Philip Pokorny <[email protected]> | , |
""Margit Schubert-While< margitsw @t-online.de > | , | ||
""Justin Thiessen< jthiessen @penguincomputing.com >" | |||
) |
MODULE_DEVICE_TABLE | ( | i2c | , |
lm85_id | |||
) |
module_i2c_driver | ( | lm85_driver | ) |
MODULE_LICENSE | ( | "GPL" | ) |
pwm_auto | ( | 1 | ) |
pwm_auto | ( | 2 | ) |
pwm_auto | ( | 3 | ) |
show_fan_offset | ( | 1 | ) |
show_fan_offset | ( | 2 | ) |
show_fan_offset | ( | 3 | ) |
show_fan_offset | ( | 4 | ) |
show_in_reg | ( | 0 | ) |
show_in_reg | ( | 1 | ) |
show_in_reg | ( | 2 | ) |
show_in_reg | ( | 3 | ) |
show_in_reg | ( | 4 | ) |
show_in_reg | ( | 5 | ) |
show_in_reg | ( | 6 | ) |
show_in_reg | ( | 7 | ) |
show_pwm_reg | ( | 1 | ) |
show_pwm_reg | ( | 2 | ) |
show_pwm_reg | ( | 3 | ) |
show_temp_reg | ( | 1 | ) |
show_temp_reg | ( | 2 | ) |
show_temp_reg | ( | 3 | ) |
temp_auto | ( | 1 | ) |
temp_auto | ( | 2 | ) |
temp_auto | ( | 3 | ) |