aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83795.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-10-28 14:31:47 -0400
committerJean Delvare <khali@endymion.delvare>2010-10-28 14:31:47 -0400
commit54891a3c135b30ca0718dbf81f78260795a5b2fe (patch)
tree9df28c7465d992c66f7089214bb6c8db849df4d2 /drivers/hwmon/w83795.c
parentdd127f5ccd7c61eb7ee215120a7809eb67c1ed7f (diff)
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/w83795.c')
-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 f4b7cb45ebcb..b360696f241d 100644
--- a/drivers/hwmon/w83795.c
+++ b/drivers/hwmon/w83795.c
@@ -236,6 +236,7 @@ static const u8 IN_LSB_SHIFT_IDX[][2] = {
236#define W83795_REG_DTSC 0x301 236#define W83795_REG_DTSC 0x301
237#define W83795_REG_DTSE 0x302 237#define W83795_REG_DTSE 0x302
238#define W83795_REG_DTS(index) (0x26 + (index)) 238#define W83795_REG_DTS(index) (0x26 + (index))
239#define W83795_REG_PECI_TBASE(index) (0x320 + (index))
239 240
240#define DTS_CRIT 0 241#define DTS_CRIT 0
241#define DTS_CRIT_HYST 1 242#define DTS_CRIT_HYST 1
@@ -1993,6 +1994,18 @@ static int w83795_probe(struct i2c_client *client,
1993 data->has_dts = w83795_read(client, W83795_REG_DTSE); 1994 data->has_dts = w83795_read(client, W83795_REG_DTSE);
1994 } 1995 }
1995 1996
1997 /* Report PECI Tbase values */
1998 if (data->enable_dts == 1) {
1999 for (i = 0; i < 8; i++) {
2000 if (!(data->has_dts & (1 << i)))
2001 continue;
2002 tmp = w83795_read(client, W83795_REG_PECI_TBASE(i));
2003 dev_info(&client->dev,
2004 "PECI agent %d Tbase temperature: %u\n",
2005 i + 1, (unsigned int)tmp & 0x7f);
2006 }
2007 }
2008
1996 /* First update the voltages measured value and limits */ 2009 /* First update the voltages measured value and limits */
1997 for (i = 0; i < ARRAY_SIZE(data->in); i++) { 2010 for (i = 0; i < ARRAY_SIZE(data->in); i++) {
1998 if (!(data->has_in & (1 << i))) 2011 if (!(data->has_in & (1 << i)))