#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/err.h>
#include <linux/mutex.h>
#include <linux/i2c/max6639.h>
Go to the source code of this file.
#define FAN_FROM_REG |
( |
|
val, |
|
|
|
rpm_range |
|
) |
| |
Value:((
val) == 0 || (
val) == 255 ? \
0 : (rpm_ranges[rpm_range] * 30) / (
val))
Definition at line 75 of file max6639.c.
#define MAX6639_FAN_CONFIG1_PWM 0x80 |
#define MAX6639_FAN_CONFIG3_THERM_FULL_SPEED 0x40 |
#define MAX6639_GCONFIG_CH2_LOCAL 0x10 |
#define MAX6639_GCONFIG_DISABLE_TIMEOUT 0x20 |
#define MAX6639_GCONFIG_POR 0x40 |
#define MAX6639_GCONFIG_PWM_FREQ_HI 0x08 |
#define MAX6639_GCONFIG_STANDBY 0x80 |
#define MAX6639_REG_ALERT_LIMIT |
( |
|
ch | ) |
(0x08 + (ch)) |
#define MAX6639_REG_DEVID 0x3D |
#define MAX6639_REG_DEVREV 0x3F |
#define MAX6639_REG_FAN_CNT |
( |
|
ch | ) |
(0x20 + (ch)) |
#define MAX6639_REG_FAN_CONFIG1 |
( |
|
ch | ) |
(0x10 + (ch) * 4) |
#define MAX6639_REG_FAN_CONFIG2a |
( |
|
ch | ) |
(0x11 + (ch) * 4) |
#define MAX6639_REG_FAN_CONFIG2b |
( |
|
ch | ) |
(0x12 + (ch) * 4) |
#define MAX6639_REG_FAN_CONFIG3 |
( |
|
ch | ) |
(0x13 + (ch) * 4) |
#define MAX6639_REG_FAN_PPR |
( |
|
ch | ) |
(0x24 + (ch)) |
#define MAX6639_REG_FAN_START_TEMP |
( |
|
ch | ) |
(0x28 + (ch)) |
#define MAX6639_REG_GCONFIG 0x04 |
#define MAX6639_REG_MANUID 0x3E |
#define MAX6639_REG_OT_LIMIT |
( |
|
ch | ) |
(0x0A + (ch)) |
#define MAX6639_REG_OUTPUT_MASK 0x03 |
#define MAX6639_REG_STATUS 0x02 |
#define MAX6639_REG_TARGET_CNT |
( |
|
ch | ) |
(0x22 + (ch)) |
#define MAX6639_REG_TARGTDUTY |
( |
|
ch | ) |
(0x26 + (ch)) |
#define MAX6639_REG_TEMP |
( |
|
ch | ) |
(0x00 + (ch)) |
#define MAX6639_REG_TEMP_EXT |
( |
|
ch | ) |
(0x05 + (ch)) |
#define MAX6639_REG_THERM_LIMIT |
( |
|
ch | ) |
(0x0C + (ch)) |
#define TEMP_LIMIT_TO_REG |
( |
|
val | ) |
SENSORS_LIMIT((val) / 1000, 0, 255) |
MODULE_DESCRIPTION |
( |
"max6639 driver" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
max6639_id |
|
|
) |
| |
module_i2c_driver |
( |
max6639_driver |
| ) |
|