From: Soeren Sonnenburg <kernel@nn7.de>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Subject: applesmc - sensors patch missing from 2.6.22-rc2
Date: Mon, 21 May 2007 10:09:13 +0200 [thread overview]
Message-ID: <1179734953.4487.20.camel@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]
I wonder why the attached patch is missing from applesmc (written by
nicolas boichat) without which sensors simply won't work ...
( but these ones has been applied and are rather useless without the
attached one
http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg12374.html
http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg12371.html )
I am using this for some weeks on 2.6.21 now without problems
$ sensors
applesmc-isa-0300
Adapter: ISA adapter
temp1: +28°C
temp2: +40°C
temp3: +66°C
temp4: +58°C
temp5: +65°C
temp6: +62°C
temp7: +69°C
temp8: +49°C
temp9: +45°C
temp10: +58°C
temp11: +40°C
temp12: +39°C
fan1: 1060 RPM (safe = 1200 RPM, min = 1000 RPM, max = 6000 RPM)
fan2: 1060 RPM (safe = 1200 RPM, min = 1000 RPM, max = 6000 RPM)
Soeren
--
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
[-- Attachment #2: Type: text/x-patch, Size: 1134 bytes --]
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 0c16067..366f4a1 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -491,6 +491,12 @@ out:
/* Sysfs Files */
+static ssize_t applesmc_name_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ return snprintf(buf, PAGE_SIZE, "applesmc\n");
+}
+
static ssize_t applesmc_position_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -913,6 +919,8 @@ static struct led_classdev applesmc_backlight = {
.brightness_set = applesmc_brightness_set,
};
+static DEVICE_ATTR(name, 0444, applesmc_name_show, NULL);
+
static DEVICE_ATTR(position, 0444, applesmc_position_show, NULL);
static DEVICE_ATTR(calibrate, 0644,
applesmc_calibrate_show, applesmc_calibrate_store);
@@ -1197,6 +1205,8 @@ static int __init applesmc_init(void)
goto out_driver;
}
+ ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_name.attr);
+
/* Create key enumeration sysfs files */
ret = sysfs_create_group(&pdev->dev.kobj, &key_enumeration_group);
if (ret)
reply other threads:[~2007-05-21 8:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1179734953.4487.20.camel@localhost \
--to=kernel@nn7.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas@boichat.ch \
/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;
as well as URLs for NNTP newsgroup(s).