All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Boichat <nicolas@boichat.ch>
To: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: roberto@unbit.it, mactel-linux-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, Jean Delvare <khali@linux-fr.org>,
	LM Sensors <lm-sensors@lm-sensors.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"guilherme m. schroeder" <guilherme.m.schroeder@gmail.com>
Subject: [lm-sensors] [PATCH 2/2] applesmc: add support for Macbook v3.
Date: Tue, 29 Jul 2008 15:07:42 +0000	[thread overview]
Message-ID: <488F323E.6040403@boichat.ch> (raw)
In-Reply-To: <488F30F7.4030804@boichat.ch>

This patches adds support for Macbook v3 (sensors and accelerometer).

From: guilherme m. schroeder <guilherme.m.schroeder@gmail.com>
Signed-off-by: Nicolas Boichat <nicolas@boichat.ch>
---
 drivers/hwmon/applesmc.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 52d842b..b06b8e0 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -101,6 +101,9 @@ static const char* temperature_sensors_sets[][36] = {
 /* Set 5: iMac */
 	{ "TC0D", "TA0P", "TG0P", "TG0D", "TG0H", "TH0P", "Tm0P", "TO0P",
 	  "Tp0C", NULL },
+/* Set 6: Macbook3 set */
+	{ "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TTF0", "TW0P", "Th0H",
+	  "Th0S", "Th1H", NULL },
 };
 
 /* List of keys used to read/write fan speeds */
@@ -1228,6 +1231,8 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
 	{ .accelerometer = 0, .light = 0, .temperature_set = 4 },
 /* iMac: temperature set 5 */
 	{ .accelerometer = 0, .light = 0, .temperature_set = 5 },
+/* MacBook3: accelerometer and temperature set 6 */
+	{ .accelerometer = 1, .light = 0, .temperature_set = 6 },
 };
 
 /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
@@ -1237,10 +1242,14 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBookPro") },
 		(void*)&applesmc_dmi_data[0]},
-	{ applesmc_dmi_match, "Apple MacBook", {
+	{ applesmc_dmi_match, "Apple MacBook (v2)", {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook2") },
 		(void*)&applesmc_dmi_data[1]},
+	{ applesmc_dmi_match, "Apple MacBook (v3)", {
+	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
+	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook3") },
+		(void*)&applesmc_dmi_data[6]},
 	{ applesmc_dmi_match, "Apple MacBook", {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook") },



_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Boichat <nicolas@boichat.ch>
To: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: roberto@unbit.it, mactel-linux-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, Jean Delvare <khali@linux-fr.org>,
	LM Sensors <lm-sensors@lm-sensors.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"guilherme m. schroeder" <guilherme.m.schroeder@gmail.com>
Subject: [PATCH 2/2] applesmc: add support for Macbook v3.
Date: Tue, 29 Jul 2008 23:07:42 +0800	[thread overview]
Message-ID: <488F323E.6040403@boichat.ch> (raw)
In-Reply-To: <488F30F7.4030804@boichat.ch>

This patches adds support for Macbook v3 (sensors and accelerometer).

From: guilherme m. schroeder <guilherme.m.schroeder@gmail.com>
Signed-off-by: Nicolas Boichat <nicolas@boichat.ch>
---
 drivers/hwmon/applesmc.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 52d842b..b06b8e0 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -101,6 +101,9 @@ static const char* temperature_sensors_sets[][36] = {
 /* Set 5: iMac */
 	{ "TC0D", "TA0P", "TG0P", "TG0D", "TG0H", "TH0P", "Tm0P", "TO0P",
 	  "Tp0C", NULL },
+/* Set 6: Macbook3 set */
+	{ "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TTF0", "TW0P", "Th0H",
+	  "Th0S", "Th1H", NULL },
 };
 
 /* List of keys used to read/write fan speeds */
@@ -1228,6 +1231,8 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
 	{ .accelerometer = 0, .light = 0, .temperature_set = 4 },
 /* iMac: temperature set 5 */
 	{ .accelerometer = 0, .light = 0, .temperature_set = 5 },
+/* MacBook3: accelerometer and temperature set 6 */
+	{ .accelerometer = 1, .light = 0, .temperature_set = 6 },
 };
 
 /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
@@ -1237,10 +1242,14 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBookPro") },
 		(void*)&applesmc_dmi_data[0]},
-	{ applesmc_dmi_match, "Apple MacBook", {
+	{ applesmc_dmi_match, "Apple MacBook (v2)", {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook2") },
 		(void*)&applesmc_dmi_data[1]},
+	{ applesmc_dmi_match, "Apple MacBook (v3)", {
+	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
+	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook3") },
+		(void*)&applesmc_dmi_data[6]},
 	{ applesmc_dmi_match, "Apple MacBook", {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook") },



  reply	other threads:[~2008-07-29 15:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23 11:55 [PATCH] Support for Intel iMac in applesmc Roberto De Ioris
2008-07-23 23:24 ` [Mactel-linux-devel] " paul s
2008-07-29 15:02 ` [lm-sensors] [PATCH 1/2] " Nicolas Boichat
2008-07-29 15:02   ` Nicolas Boichat
2008-07-29 15:07   ` Nicolas Boichat [this message]
2008-07-29 15:07     ` [PATCH 2/2] applesmc: add support for Macbook v3 Nicolas Boichat
2008-07-29 23:57     ` [lm-sensors] " Andrew Morton
2008-07-29 23:57       ` Andrew Morton
2008-07-29 23:54   ` [lm-sensors] [PATCH 1/2] Support for Intel iMac in applesmc Andrew Morton
2008-07-29 23:54     ` Andrew Morton

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=488F323E.6040403@boichat.ch \
    --to=nicolas@boichat.ch \
    --cc=akpm@linux-foundation.org \
    --cc=guilherme.m.schroeder@gmail.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=mactel-linux-devel@lists.sourceforge.net \
    --cc=mhoffman@lightlink.com \
    --cc=roberto@unbit.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.