summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-10-28 20:31:47 +0200
committerJean Delvare <khali@endymion.delvare>2010-10-28 20:31:47 +0200
commit54891a3c135b30ca0718dbf81f78260795a5b2fe (patch)
tree9df28c7465d992c66f7089214bb6c8db849df4d2 /drivers/hwmon
parentdd127f5ccd7c61eb7ee215120a7809eb67c1ed7f (diff)
downloadop-kernel-dev-54891a3c135b30ca0718dbf81f78260795a5b2fe.zip
op-kernel-dev-54891a3c135b30ca0718dbf81f78260795a5b2fe.tar.gz
hwmon: (w83795) Report PECI agent Tbase values
On systems with PECI, report PECI agent Tbase temperature values. This is informative only. Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/w83795.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
index f4b7cb4..b360696 100644
--- a/drivers/hwmon/w83795.c
+++ b/drivers/hwmon/w83795.c
@@ -236,6 +236,7 @@ static const u8 IN_LSB_SHIFT_IDX[][2] = {
#define W83795_REG_DTSC 0x301
#define W83795_REG_DTSE 0x302
#define W83795_REG_DTS(index) (0x26 + (index))
+#define W83795_REG_PECI_TBASE(index) (0x320 + (index))
#define DTS_CRIT 0
#define DTS_CRIT_HYST 1
@@ -1993,6 +1994,18 @@ static int w83795_probe(struct i2c_client *client,
data->has_dts = w83795_read(client, W83795_REG_DTSE);
}
+ /* Report PECI Tbase values */
+ if (data->enable_dts == 1) {
+ for (i = 0; i < 8; i++) {
+ if (!(data->has_dts & (1 << i)))
+ continue;
+ tmp = w83795_read(client, W83795_REG_PECI_TBASE(i));
+ dev_info(&client->dev,
+ "PECI agent %d Tbase temperature: %u\n",
+ i + 1, (unsigned int)tmp & 0x7f);
+ }
+ }
+
/* First update the voltages measured value and limits */
for (i = 0; i < ARRAY_SIZE(data->in); i++) {
if (!(data->has_in & (1 << i)))
OpenPOWER on IntegriCloud