From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] applesmc - add temperature sensors set for
Date: Sun, 01 Jul 2007 18:08:07 +0000 [thread overview]
Message-ID: <20070701200807.4bdc4b06@hyperion.delvare> (raw)
Hi Nicolas,
On Fri, 29 Jun 2007 23:04:45 +0200, Nicolas Boichat wrote:
> applesmc: Add temperature sensors set on Macbook (non-pro).
>
> From: Martin Szulecki <mactel@sukimashita.com>
> Signed-off-by: Nicolas Boichat <nicolas@boichat.ch>
>
> ---
>
> drivers/hwmon/applesmc.c | 14 +++++++++-----
> 1 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
> index eb81a64..232cbad 100644
> --- a/drivers/hwmon/applesmc.c
> +++ b/drivers/hwmon/applesmc.c
> @@ -79,11 +79,15 @@
>
> /*
> * Temperature sensors keys (sp78 - 2 bytes).
> - * First set for Macbook(Pro), second for Macmini.
> */
> static const char* temperature_sensors_sets[][13] = {
> +/* Set 0: Macbook Pro */
> { "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H",
> "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL },
> +/* Set 1: Macbook set */
> + { "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TN1P", "Th0H", "Th0S",
> + "Th1H", "Ts0P", NULL },
> +/* Set 2: Macmini set */
> { "TC0D", "TC0P", NULL }
> };
>
> @@ -1129,10 +1133,10 @@ static void applesmc_release_accelerometer(void)
> static __initdata struct dmi_match_data applesmc_dmi_data[] = {
> /* MacBook Pro: accelerometer, backlight and temperature set 0 */
> { .accelerometer = 1, .light = 1, .temperature_set = 0 },
> -/* MacBook: accelerometer and temperature set 0 */
> - { .accelerometer = 1, .light = 0, .temperature_set = 0 },
> -/* MacBook: temperature set 1 */
> - { .accelerometer = 0, .light = 0, .temperature_set = 1 }
> +/* MacBook: accelerometer and temperature set 1 */
> + { .accelerometer = 1, .light = 0, .temperature_set = 1 },
> +/* MacMini: temperature set 2 */
> + { .accelerometer = 0, .light = 0, .temperature_set = 2 }
> };
You should add a trailing comma to the last item of such arrays, it
makes patches easier in case you need to add more entries in the future.
>
> /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
Other than that (and the fact that I can't test it), patch looks good.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next reply other threads:[~2007-07-01 18:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-01 18:08 Jean Delvare [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-06-29 21:04 [lm-sensors] [PATCH] applesmc - add temperature sensors set for Nicolas Boichat
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=20070701200807.4bdc4b06@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.kernel.org \
/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.