]> git.hungrycats.org Git - linux/commitdiff
[PATCH] I2C: rename in0_ref to cpu0_vid
authorJean Delvare <khali@linux-fr.org>
Wed, 25 Aug 2004 06:21:59 +0000 (23:21 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 25 Aug 2004 06:21:59 +0000 (23:21 -0700)
This patch changes all the i2c chip drivers and documentation to use the
name "cpu0_vid" instead of "in0_ref". The name "in0_ref" was an error in
the first place as motherboard manufacturers may fail to follow the chip
manufacturer's recommendation about which "in" channel to use for VCore
monitoring.

The new name leaves room for chips able to monitor more than 1 vid
value, such as the LM93 and, to a lesser extent, the PC87360 family (all
by National Semiconductor). These chips are typically designed for
dual-CPU motherboards.

This breaks the interface (obviously) so libsensors has been updated to
support both names.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Documentation/i2c/sysfs-interface
drivers/i2c/chips/asb100.c
drivers/i2c/chips/it87.c
drivers/i2c/chips/lm78.c
drivers/i2c/chips/lm85.c
drivers/i2c/chips/w83627hf.c
drivers/i2c/chips/w83781d.c

index f651de4873f8bb7f027f26c6e2301ec7a775e344..3e74daeb901d11750d9c2349e6902ca0063315b3 100644 (file)
@@ -104,7 +104,7 @@ in[0-8]_input       Voltage input value.
                        in7_*   varies
                        in8_*   varies
 
-in0_ref                CPU core reference voltage.
+cpu[0-1]_vid   CPU core reference voltage.
                Unit: millivolt
                Read only.
                Not always correct.
index 2997929306a42bc6028b536945194bf984579ef1..e170b2a786b91513ef8384e2332067d0f88f8d66 100644 (file)
@@ -520,9 +520,9 @@ static ssize_t show_vid(struct device *dev, char *buf)
        return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm));
 }
 
-static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid, NULL);
+static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
 #define device_create_file_vid(client) \
-device_create_file(&client->dev, &dev_attr_in0_ref)
+device_create_file(&client->dev, &dev_attr_cpu0_vid)
 
 /* VRM */
 static ssize_t show_vrm(struct device *dev, char *buf)
index aa735e7cf2944ccc0a95fe9e32f282aeba2d2ed6..c7c068b8207120ac69b492c16bc12665fd43799d 100644 (file)
@@ -571,9 +571,9 @@ show_vid_reg(struct device *dev, char *buf)
        struct it87_data *data = it87_update_device(dev);
        return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm));
 }
-static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL);
+static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);
 #define device_create_file_vid(client) \
-device_create_file(&client->dev, &dev_attr_in0_ref)
+device_create_file(&client->dev, &dev_attr_cpu0_vid)
 
 /* This function is called when:
      * it87_driver is inserted (when this module is loaded), for each
index 40385ffd8b91857fc32e2331a387db2bdc6b36ba..b3cab5fa9d8c622b881c3b48840c03f84855f689 100644 (file)
@@ -423,7 +423,7 @@ static ssize_t show_vid(struct device *dev, char *buf)
        struct lm78_data *data = lm78_update_device(dev);
        return sprintf(buf, "%d\n", VID_FROM_REG(data->vid));
 }
-static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid, NULL);
+static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
 
 /* Alarms */
 static ssize_t show_alarms(struct device *dev, char *buf)
@@ -615,7 +615,7 @@ int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
        device_create_file(&new_client->dev, &dev_attr_fan3_min);
        device_create_file(&new_client->dev, &dev_attr_fan3_div);
        device_create_file(&new_client->dev, &dev_attr_alarms);
-       device_create_file(&new_client->dev, &dev_attr_in0_ref);
+       device_create_file(&new_client->dev, &dev_attr_cpu0_vid);
 
        return 0;
 
index d8cecb1739882f8625c609ba36bf207827d7b984..757520f7562cd8c6ea35f26d0401d15f12d44d11 100644 (file)
@@ -465,7 +465,7 @@ static ssize_t show_vid_reg(struct device *dev, char *buf)
        return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm));
 }
 
-static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL);
+static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);
 
 static ssize_t show_vrm_reg(struct device *dev, char *buf)
 {
@@ -874,7 +874,7 @@ int lm85_detect(struct i2c_adapter *adapter, int address,
        device_create_file(&new_client->dev, &dev_attr_temp2_max);
        device_create_file(&new_client->dev, &dev_attr_temp3_max);
        device_create_file(&new_client->dev, &dev_attr_vrm);
-       device_create_file(&new_client->dev, &dev_attr_in0_ref);
+       device_create_file(&new_client->dev, &dev_attr_cpu0_vid);
        device_create_file(&new_client->dev, &dev_attr_alarms);
 
        return 0;
index 90a48e77cff8c821bda90731b7b5c8214168fbb7..5c3ade5b6498d4fdcdd1c41918253f2167afacff 100644 (file)
@@ -635,9 +635,9 @@ show_vid_reg(struct device *dev, char *buf)
        struct w83627hf_data *data = w83627hf_update_device(dev);
        return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm));
 }
-static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL);
+static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);
 #define device_create_file_vid(client) \
-device_create_file(&client->dev, &dev_attr_in0_ref)
+device_create_file(&client->dev, &dev_attr_cpu0_vid)
 
 static ssize_t
 show_vrm_reg(struct device *dev, char *buf)
index 9612fab5655c549ef118190770a039d547a30077..063d34a0de9b30a1063e2f039ac50b8b6d32ecaa 100644 (file)
@@ -503,9 +503,9 @@ show_vid_reg(struct device *dev, char *buf)
 }
 
 static
-DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL);
+DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);
 #define device_create_file_vid(client) \
-device_create_file(&client->dev, &dev_attr_in0_ref);
+device_create_file(&client->dev, &dev_attr_cpu0_vid);
 static ssize_t
 show_vrm_reg(struct device *dev, char *buf)
 {