[PATCH] I2C: adm9240 driver cleanup
authorGrant Coady <grant_lkml@dodo.com.au>
Fri, 13 May 2005 10:26:10 +0000 (20:26 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Jun 2005 04:51:57 +0000 (21:51 -0700)
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>
drivers/i2c/chips/adm9240.c

index 0b67eab15d2dc46fc3518850e4873195012645c2..6d609d89e7904a8d0f256183fb6306b793f79e62 100644 (file)
@@ -165,7 +165,7 @@ struct adm9240_data {
        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 @@ static ssize_t show_##value(struct device *dev, char *buf)  \
 }
 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 @@ static void adm9240_init_client(struct i2c_client *client)
 
        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",