summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-10 10:24:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-10 10:24:47 -0700
commite3bbfa78bab125f58b831b5f7f45b5a305091d72 (patch)
tree7e2c95757f887b890a5ce025169c3c595b53bf59 /drivers/hwmon/pmbus.c
parentaa4c495e3d24335bedbed56cca47ec9ee1e1b390 (diff)
parent22e6b2312d221376dcd98a8afb0f314b62d33a91 (diff)
downloadblackbird-op-linux-e3bbfa78bab125f58b831b5f7f45b5a305091d72.tar.gz
blackbird-op-linux-e3bbfa78bab125f58b831b5f7f45b5a305091d72.zip
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: hwmon: (pmbus) Improve auto-detection of temperature status register hwmon: (lm95241) Fix negative temperature results hwmon: (lm95241) Fix chip detection code
Diffstat (limited to 'drivers/hwmon/pmbus.c')
-rw-r--r--drivers/hwmon/pmbus.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/hwmon/pmbus.c b/drivers/hwmon/pmbus.c
index 931d940923ae..9b1f0c37ef77 100644
--- a/drivers/hwmon/pmbus.c
+++ b/drivers/hwmon/pmbus.c
@@ -59,16 +59,17 @@ static void pmbus_find_sensor_groups(struct i2c_client *client,
if (pmbus_check_byte_register(client, 0, PMBUS_STATUS_FAN_34))
info->func[0] |= PMBUS_HAVE_STATUS_FAN34;
}
- if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_1)) {
+ if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_1))
info->func[0] |= PMBUS_HAVE_TEMP;
- if (pmbus_check_byte_register(client, 0,
- PMBUS_STATUS_TEMPERATURE))
- info->func[0] |= PMBUS_HAVE_STATUS_TEMP;
- }
if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_2))
info->func[0] |= PMBUS_HAVE_TEMP2;
if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_3))
info->func[0] |= PMBUS_HAVE_TEMP3;
+ if (info->func[0] & (PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2
+ | PMBUS_HAVE_TEMP3)
+ && pmbus_check_byte_register(client, 0,
+ PMBUS_STATUS_TEMPERATURE))
+ info->func[0] |= PMBUS_HAVE_STATUS_TEMP;
/* Sensors detected on all pages */
for (page = 0; page < info->pages; page++) {
OpenPOWER on IntegriCloud