aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Coady <grant_lkml@dodo.com.au>2005-05-13 06:26:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-22 00:51:57 -0400
commit8e8f9289cc5b781d583d5aed935abf060207bbd3 (patch)
treed058803efab6b2f359ca750ec50e73681da3ce8d
parent937df8df907ce63b0f7e19adf6e3cdef1687fac3 (diff)
[PATCH] I2C: adm9240 driver cleanup
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 <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/i2c/chips/adm9240.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/i2c/chips/adm9240.c b/drivers/i2c/chips/adm9240.c
index 0b67eab15d2d..6d609d89e790 100644
--- a/drivers/i2c/chips/adm9240.c
+++ b/drivers/i2c/chips/adm9240.c
@@ -165,7 +165,7 @@ struct adm9240_data {
165 s8 temp_high; /* rw temp1_max */ 165 s8 temp_high; /* rw temp1_max */
166 s8 temp_hyst; /* rw temp1_max_hyst */ 166 s8 temp_hyst; /* rw temp1_max_hyst */
167 u16 alarms; /* ro alarms */ 167 u16 alarms; /* ro alarms */
168 u8 aout; /* rw analog_out */ 168 u8 aout; /* rw aout_output */
169 u8 vid; /* ro vid */ 169 u8 vid; /* ro vid */
170 u8 vrm; /* -- vrm set on startup, no accessor */ 170 u8 vrm; /* -- vrm set on startup, no accessor */
171}; 171};
@@ -192,7 +192,7 @@ static ssize_t show_##value(struct device *dev, char *buf) \
192} 192}
193show_temp(temp_high, 1000); 193show_temp(temp_high, 1000);
194show_temp(temp_hyst, 1000); 194show_temp(temp_hyst, 1000);
195show_temp(temp, 500); 195show_temp(temp, 500); /* 0.5'C per bit */
196 196
197#define set_temp(value, reg) \ 197#define set_temp(value, reg) \
198static ssize_t set_##value(struct device *dev, const char *buf, \ 198static ssize_t set_##value(struct device *dev, const char *buf, \
@@ -630,6 +630,9 @@ static void adm9240_init_client(struct i2c_client *client)
630 630
631 data->vrm = i2c_which_vrm(); /* need this to report vid as mV */ 631 data->vrm = i2c_which_vrm(); /* need this to report vid as mV */
632 632
633 dev_info(&client->dev, "Using VRM: %d.%d\n", data->vrm / 10,
634 data->vrm % 10);
635
633 if (conf & 1) { /* measurement cycle running: report state */ 636 if (conf & 1) { /* measurement cycle running: report state */
634 637
635 dev_info(&client->dev, "status: config 0x%02x mode %u\n", 638 dev_info(&client->dev, "status: config 0x%02x mode %u\n",