aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2011-07-11 08:15:48 -0400
committerJiri Kosina <jkosina@suse.cz>2011-07-11 08:15:55 -0400
commitb7e9c223be8ce335e30f2cf6ba588e6a4092275c (patch)
tree2d1e3b75606abc18df7ad65e51ac3f90cd68b38d /drivers/hwmon/pmbus.c
parentc172d82500a6cf3c32d1e650722a1055d72ce858 (diff)
parente3bbfa78bab125f58b831b5f7f45b5a305091d72 (diff)
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
Diffstat (limited to 'drivers/hwmon/pmbus.c')
-rw-r--r--drivers/hwmon/pmbus.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/hwmon/pmbus.c b/drivers/hwmon/pmbus.c
index 98e2e28899e2..9b1f0c37ef77 100644
--- a/drivers/hwmon/pmbus.c
+++ b/drivers/hwmon/pmbus.c
@@ -47,22 +47,29 @@ static void pmbus_find_sensor_groups(struct i2c_client *client,
47 if (info->func[0] 47 if (info->func[0]
48 && pmbus_check_byte_register(client, 0, PMBUS_STATUS_INPUT)) 48 && pmbus_check_byte_register(client, 0, PMBUS_STATUS_INPUT))
49 info->func[0] |= PMBUS_HAVE_STATUS_INPUT; 49 info->func[0] |= PMBUS_HAVE_STATUS_INPUT;
50 if (pmbus_check_word_register(client, 0, PMBUS_READ_FAN_SPEED_1)) { 50 if (pmbus_check_byte_register(client, 0, PMBUS_FAN_CONFIG_12) &&
51 pmbus_check_word_register(client, 0, PMBUS_READ_FAN_SPEED_1)) {
51 info->func[0] |= PMBUS_HAVE_FAN12; 52 info->func[0] |= PMBUS_HAVE_FAN12;
52 if (pmbus_check_byte_register(client, 0, PMBUS_STATUS_FAN_12)) 53 if (pmbus_check_byte_register(client, 0, PMBUS_STATUS_FAN_12))
53 info->func[0] |= PMBUS_HAVE_STATUS_FAN12; 54 info->func[0] |= PMBUS_HAVE_STATUS_FAN12;
54 } 55 }
55 if (pmbus_check_word_register(client, 0, PMBUS_READ_FAN_SPEED_3)) { 56 if (pmbus_check_byte_register(client, 0, PMBUS_FAN_CONFIG_34) &&
57 pmbus_check_word_register(client, 0, PMBUS_READ_FAN_SPEED_3)) {
56 info->func[0] |= PMBUS_HAVE_FAN34; 58 info->func[0] |= PMBUS_HAVE_FAN34;
57 if (pmbus_check_byte_register(client, 0, PMBUS_STATUS_FAN_34)) 59 if (pmbus_check_byte_register(client, 0, PMBUS_STATUS_FAN_34))
58 info->func[0] |= PMBUS_HAVE_STATUS_FAN34; 60 info->func[0] |= PMBUS_HAVE_STATUS_FAN34;
59 } 61 }
60 if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_1)) { 62 if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_1))
61 info->func[0] |= PMBUS_HAVE_TEMP; 63 info->func[0] |= PMBUS_HAVE_TEMP;
62 if (pmbus_check_byte_register(client, 0, 64 if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_2))
63 PMBUS_STATUS_TEMPERATURE)) 65 info->func[0] |= PMBUS_HAVE_TEMP2;
66 if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_3))
67 info->func[0] |= PMBUS_HAVE_TEMP3;
68 if (info->func[0] & (PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2
69 | PMBUS_HAVE_TEMP3)
70 && pmbus_check_byte_register(client, 0,
71 PMBUS_STATUS_TEMPERATURE))
64 info->func[0] |= PMBUS_HAVE_STATUS_TEMP; 72 info->func[0] |= PMBUS_HAVE_STATUS_TEMP;
65 }
66 73
67 /* Sensors detected on all pages */ 74 /* Sensors detected on all pages */
68 for (page = 0; page < info->pages; page++) { 75 for (page = 0; page < info->pages; page++) {