From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] i2c driver fixes for 2.6.2-rc2
Date: Tue, 27 Jan 2004 15:34:13 -0800 [thread overview]
Message-ID: <1075246453781@kroah.com> (raw)
In-Reply-To: <10752464532280@kroah.com>
ChangeSet 1.1474.148.5, 2004/01/27 14:38:29-08:00, khali@linux-fr.org
[PATCH] I2C: Bring lm75 and lm78 in compliance with sysfs naming conventions
Here is a patch that brings the lm75 and lm78 drivers in compliance with
sysfs naming conventions. The drivers as found in existing 2.6 kernels
do not have a digit appended to the temperature-related files names as
the sysfs naming conversion recommends (obviously because they each have
a single temperature channel). As a result, libsensors won't find the
files.
It was discussed on the list wether a '1' should be appended in this
case, and our conclusion was that it would be better to do so because it
helps automatic processing of the sysfs exported files. Please apply if
you agree with this.
drivers/i2c/chips/lm75.c | 12 ++++++------
drivers/i2c/chips/lm78.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff -Nru a/drivers/i2c/chips/lm75.c b/drivers/i2c/chips/lm75.c
--- a/drivers/i2c/chips/lm75.c Tue Jan 27 15:26:46 2004
+++ b/drivers/i2c/chips/lm75.c Tue Jan 27 15:26:46 2004
@@ -104,9 +104,9 @@
set(temp_max, LM75_REG_TEMP_OS);
set(temp_hyst, LM75_REG_TEMP_HYST);
-static DEVICE_ATTR(temp_max, S_IWUSR | S_IRUGO, show_temp_max, set_temp_max);
-static DEVICE_ATTR(temp_hyst, S_IWUSR | S_IRUGO, show_temp_hyst, set_temp_hyst);
-static DEVICE_ATTR(temp_input, S_IRUGO, show_temp_input, NULL);
+static DEVICE_ATTR(temp_max1, S_IWUSR | S_IRUGO, show_temp_max, set_temp_max);
+static DEVICE_ATTR(temp_hyst1, S_IWUSR | S_IRUGO, show_temp_hyst, set_temp_hyst);
+static DEVICE_ATTR(temp_input1, S_IRUGO, show_temp_input, NULL);
static int lm75_attach_adapter(struct i2c_adapter *adapter)
{
@@ -197,9 +197,9 @@
lm75_init_client(new_client);
/* Register sysfs hooks */
- device_create_file(&new_client->dev, &dev_attr_temp_max);
- device_create_file(&new_client->dev, &dev_attr_temp_hyst);
- device_create_file(&new_client->dev, &dev_attr_temp_input);
+ device_create_file(&new_client->dev, &dev_attr_temp_max1);
+ device_create_file(&new_client->dev, &dev_attr_temp_hyst1);
+ device_create_file(&new_client->dev, &dev_attr_temp_input1);
return 0;
diff -Nru a/drivers/i2c/chips/lm78.c b/drivers/i2c/chips/lm78.c
--- a/drivers/i2c/chips/lm78.c Tue Jan 27 15:26:46 2004
+++ b/drivers/i2c/chips/lm78.c Tue Jan 27 15:26:46 2004
@@ -369,10 +369,10 @@
return count;
}
-static DEVICE_ATTR(temp_input, S_IRUGO, show_temp, NULL)
-static DEVICE_ATTR(temp_max, S_IRUGO | S_IWUSR,
+static DEVICE_ATTR(temp_input1, S_IRUGO, show_temp, NULL)
+static DEVICE_ATTR(temp_max1, S_IRUGO | S_IWUSR,
show_temp_over, set_temp_over)
-static DEVICE_ATTR(temp_hyst, S_IRUGO | S_IWUSR,
+static DEVICE_ATTR(temp_hyst1, S_IRUGO | S_IWUSR,
show_temp_hyst, set_temp_hyst)
/* 3 Fans */
@@ -678,9 +678,9 @@
device_create_file(&new_client->dev, &dev_attr_in_input6);
device_create_file(&new_client->dev, &dev_attr_in_min6);
device_create_file(&new_client->dev, &dev_attr_in_max6);
- device_create_file(&new_client->dev, &dev_attr_temp_input);
- device_create_file(&new_client->dev, &dev_attr_temp_max);
- device_create_file(&new_client->dev, &dev_attr_temp_hyst);
+ device_create_file(&new_client->dev, &dev_attr_temp_input1);
+ device_create_file(&new_client->dev, &dev_attr_temp_max1);
+ device_create_file(&new_client->dev, &dev_attr_temp_hyst1);
device_create_file(&new_client->dev, &dev_attr_fan_input1);
device_create_file(&new_client->dev, &dev_attr_fan_min1);
device_create_file(&new_client->dev, &dev_attr_fan_div1);
next prev parent reply other threads:[~2004-01-27 23:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-27 23:32 [BK PATCH] i2c driver fixes for 2.6.2-rc2 Greg KH
2004-01-27 23:34 ` [PATCH] " Greg KH
2004-01-27 23:34 ` Greg KH
2004-01-27 23:34 ` Greg KH
2004-01-27 23:34 ` Greg KH
2004-01-27 23:34 ` Greg KH [this message]
2004-01-27 23:34 ` Greg KH
2004-01-28 13:08 ` Typo (Re: [PATCH] i2c driver fixes for 2.6.2-rc2) David Martínez Moreno
2004-01-28 23:23 ` Greg KH
2004-01-29 11:27 ` David Martínez Moreno
2004-01-29 19:47 ` Greg KH
2004-01-30 9:58 ` David Martínez Moreno
2004-01-31 0:55 ` Greg KH
2004-01-29 0:44 ` [BK PATCH] i2c driver fixes for 2.6.2-rc2 J.A. Magallon
2004-01-29 0:47 ` J.A. Magallon
2004-01-29 8:44 ` Jean Delvare
2004-01-29 22:21 ` J.A. Magallon
2004-01-29 22:56 ` J.A. Magallon
2004-01-30 3:38 ` Mark M. Hoffman
2004-01-30 9:36 ` Jean Delvare
2004-01-30 9:18 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1075246453781@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@stimpy.netroedge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox