From grant_lkml@dodo.com.au Fri May 13 03:27:28 2005 From: Grant Coady To: greg@kroah.com Subject: I2C: adm9240 driver cleanup Date: Fri, 13 May 2005 20:26:10 +1000 Message-ID: <6vv881d0gkm41uq91he47mj92j8jgr80fk@4ax.com> This patch adds an info print of detected VRM stolen from Sebastian Witt's atxp1 sriver. ADM9240 already has vrm accessor removed. Write no-op and whitespace fixes removed :) Couple of comments changed, tested on 2.6.11.9. Signed-off-by: Grant Coady Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/chips/adm9240.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) --- gregkh-2.6.orig/drivers/i2c/chips/adm9240.c 2005-05-17 19:02:46.000000000 -0700 +++ gregkh-2.6/drivers/i2c/chips/adm9240.c 2005-05-17 22:02:31.000000000 -0700 @@ -165,7 +165,7 @@ s8 temp_high; /* rw temp1_max */ s8 temp_hyst; /* rw temp1_max_hyst */ u16 alarms; /* ro alarms */ - u8 aout; /* rw analog_out */ + u8 aout; /* rw aout_output */ u8 vid; /* ro vid */ u8 vrm; /* -- vrm set on startup, no accessor */ }; @@ -192,7 +192,7 @@ } show_temp(temp_high, 1000); show_temp(temp_hyst, 1000); -show_temp(temp, 500); +show_temp(temp, 500); /* 0.5'C per bit */ #define set_temp(value, reg) \ static ssize_t set_##value(struct device *dev, const char *buf, \ @@ -630,6 +630,9 @@ data->vrm = i2c_which_vrm(); /* need this to report vid as mV */ + dev_info(&client->dev, "Using VRM: %d.%d\n", data->vrm / 10, + data->vrm % 10); + if (conf & 1) { /* measurement cycle running: report state */ dev_info(&client->dev, "status: config 0x%02x mode %u\n",