diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-01 14:33:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-01 14:33:19 -0400 |
commit | 676056132425ac425d7215cdaa8bd25582e07966 (patch) | |
tree | f9edecac1a441947e5d145eb1a834b2df07673f1 /drivers/hwmon/adt7473.c | |
parent | 623fa579e61f250c1913c70257ef3a753820bb68 (diff) | |
parent | 47d715af0761012ab074a12b5b5959f0179eaa09 (diff) |
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
hwmon: needs new maintainer
hwmon: (lm85) Simplify device initialization function
hwmon: (lm85) Misc cleanups
hwmon: (lm85) Don't write back cached values
hwmon: (lm85) Drop dead code
hwmon: (lm85) Coding-style cleanups
hwmon: (lm75) add new-style driver binding
hwmon: (lm75) cleanup/reorg
hwmon: (adt7473) clarify an awkward bit of code
hwmon: (adt7473) Remove unused defines
hwmon: (dme1737) fix voltage scaling
hwmon: (dme1737) probe all addresses
hwmon: (dme1737) demacrofy for readability
Diffstat (limited to 'drivers/hwmon/adt7473.c')
-rw-r--r-- | drivers/hwmon/adt7473.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/hwmon/adt7473.c b/drivers/hwmon/adt7473.c index ce4a7cb5a116..3a0b63136479 100644 --- a/drivers/hwmon/adt7473.c +++ b/drivers/hwmon/adt7473.c | |||
@@ -39,32 +39,20 @@ I2C_CLIENT_INSMOD_1(adt7473); | |||
39 | #define ADT7473_REG_BASE_ADDR 0x20 | 39 | #define ADT7473_REG_BASE_ADDR 0x20 |
40 | 40 | ||
41 | #define ADT7473_REG_VOLT_BASE_ADDR 0x21 | 41 | #define ADT7473_REG_VOLT_BASE_ADDR 0x21 |
42 | #define ADT7473_REG_VOLT_MAX_ADDR 0x22 | ||
43 | #define ADT7473_REG_VOLT_MIN_BASE_ADDR 0x46 | 42 | #define ADT7473_REG_VOLT_MIN_BASE_ADDR 0x46 |
44 | #define ADT7473_REG_VOLT_MIN_MAX_ADDR 0x49 | ||
45 | 43 | ||
46 | #define ADT7473_REG_TEMP_BASE_ADDR 0x25 | 44 | #define ADT7473_REG_TEMP_BASE_ADDR 0x25 |
47 | #define ADT7473_REG_TEMP_MAX_ADDR 0x27 | ||
48 | #define ADT7473_REG_TEMP_LIMITS_BASE_ADDR 0x4E | 45 | #define ADT7473_REG_TEMP_LIMITS_BASE_ADDR 0x4E |
49 | #define ADT7473_REG_TEMP_LIMITS_MAX_ADDR 0x53 | ||
50 | #define ADT7473_REG_TEMP_TMIN_BASE_ADDR 0x67 | 46 | #define ADT7473_REG_TEMP_TMIN_BASE_ADDR 0x67 |
51 | #define ADT7473_REG_TEMP_TMIN_MAX_ADDR 0x69 | ||
52 | #define ADT7473_REG_TEMP_TMAX_BASE_ADDR 0x6A | 47 | #define ADT7473_REG_TEMP_TMAX_BASE_ADDR 0x6A |
53 | #define ADT7473_REG_TEMP_TMAX_MAX_ADDR 0x6C | ||
54 | 48 | ||
55 | #define ADT7473_REG_FAN_BASE_ADDR 0x28 | 49 | #define ADT7473_REG_FAN_BASE_ADDR 0x28 |
56 | #define ADT7473_REG_FAN_MAX_ADDR 0x2F | ||
57 | #define ADT7473_REG_FAN_MIN_BASE_ADDR 0x54 | 50 | #define ADT7473_REG_FAN_MIN_BASE_ADDR 0x54 |
58 | #define ADT7473_REG_FAN_MIN_MAX_ADDR 0x5B | ||
59 | 51 | ||
60 | #define ADT7473_REG_PWM_BASE_ADDR 0x30 | 52 | #define ADT7473_REG_PWM_BASE_ADDR 0x30 |
61 | #define ADT7473_REG_PWM_MAX_ADDR 0x32 | ||
62 | #define ADT7473_REG_PWM_MIN_BASE_ADDR 0x64 | 53 | #define ADT7473_REG_PWM_MIN_BASE_ADDR 0x64 |
63 | #define ADT7473_REG_PWM_MIN_MAX_ADDR 0x66 | ||
64 | #define ADT7473_REG_PWM_MAX_BASE_ADDR 0x38 | 54 | #define ADT7473_REG_PWM_MAX_BASE_ADDR 0x38 |
65 | #define ADT7473_REG_PWM_MAX_MAX_ADDR 0x3A | ||
66 | #define ADT7473_REG_PWM_BHVR_BASE_ADDR 0x5C | 55 | #define ADT7473_REG_PWM_BHVR_BASE_ADDR 0x5C |
67 | #define ADT7473_REG_PWM_BHVR_MAX_ADDR 0x5E | ||
68 | #define ADT7473_PWM_BHVR_MASK 0xE0 | 56 | #define ADT7473_PWM_BHVR_MASK 0xE0 |
69 | #define ADT7473_PWM_BHVR_SHIFT 5 | 57 | #define ADT7473_PWM_BHVR_SHIFT 5 |
70 | 58 | ||
@@ -102,7 +90,6 @@ I2C_CLIENT_INSMOD_1(adt7473); | |||
102 | #define ADT7473_FAN4_ALARM 0x20 | 90 | #define ADT7473_FAN4_ALARM 0x20 |
103 | #define ADT7473_R1T_SHORT 0x40 | 91 | #define ADT7473_R1T_SHORT 0x40 |
104 | #define ADT7473_R2T_SHORT 0x80 | 92 | #define ADT7473_R2T_SHORT 0x80 |
105 | #define ADT7473_REG_MAX_ADDR 0x80 | ||
106 | 93 | ||
107 | #define ALARM2(x) ((x) << 8) | 94 | #define ALARM2(x) ((x) << 8) |
108 | 95 | ||
@@ -583,10 +570,9 @@ static ssize_t set_max_duty_at_crit(struct device *dev, | |||
583 | struct i2c_client *client = to_i2c_client(dev); | 570 | struct i2c_client *client = to_i2c_client(dev); |
584 | struct adt7473_data *data = i2c_get_clientdata(client); | 571 | struct adt7473_data *data = i2c_get_clientdata(client); |
585 | int temp = simple_strtol(buf, NULL, 10); | 572 | int temp = simple_strtol(buf, NULL, 10); |
586 | temp = temp && 0xFF; | ||
587 | 573 | ||
588 | mutex_lock(&data->lock); | 574 | mutex_lock(&data->lock); |
589 | data->max_duty_at_overheat = temp; | 575 | data->max_duty_at_overheat = !!temp; |
590 | reg = i2c_smbus_read_byte_data(client, ADT7473_REG_CFG4); | 576 | reg = i2c_smbus_read_byte_data(client, ADT7473_REG_CFG4); |
591 | if (temp) | 577 | if (temp) |
592 | reg |= ADT7473_CFG4_MAX_DUTY_AT_OVT; | 578 | reg |= ADT7473_CFG4_MAX_DUTY_AT_OVT; |