From: Borislav Petkov <petkovbb@googlemail.com>
To: Peter Feuerer <peter@piie.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
lenb@kernel.org, Matthew Garrett <mjg59@srcf.ucam.org>,
Maxim Levitsky <maximlevitsky@gmail.com>
Subject: Re: [PATCH] Acer Aspire One Fan Control
Date: Wed, 3 Jun 2009 09:35:52 +0200 [thread overview]
Message-ID: <20090603073552.GA2671@liondog.tnic> (raw)
In-Reply-To: <cone.1243865541.882421.4368.1000@deskpiie>
Hi,
On Mon, Jun 01, 2009 at 04:12:21PM +0200, Peter Feuerer wrote:
>> Ok, minor nitpicks below but it starting to shape up quite ok. You could
>> send it for inclusion upstream.
>
> How exactly do I send the patch for inclusion?
just rediff it against latest git and send an email to Len Brown (i
assume, from looking at git log drivers/thermal/ output) requesting for
driver inclusion.
Len?
If you hurry and do it this week it might be possible to get it in .31
because the merge window opens around the coming weekend.
>>> +/* acer ec functions */
>>> +static int acerhdf_get_temp(void)
>>> +{
>>> + u8 temp;
>>> + /* read temperature */
>>> + if (!ec_read(bios_settings[bios_version].tempreg, &temp)) {
>>> + if (verbose)
>>
>> you need to check the error status here before printing the temperature
>> since it might be invalid if the ec_read has failed:
>>
>> u8 temp;
>> int err;
>>
>> err = ec_read(bios_settings[bios_version].tempreg, &temp);
>>
>> if (err)
>> return ACERHDF_ERROR;
>>
>> if (verbose)
>> acerhdf_notice("temp %d\n", temp);
>>
>> return temp;
>> }
>>
>
> The printf was already omitted when ec_read fails the way I wrote it,
> wasn't it? - Only if ec_read returns 0, the printf is launched and the
> temperature is returned.
Ah, nevermind. I got mixed up here, sorry.
>>> + acerhdf_notice("temp %d\n", temp);
>>> + return temp;
>>> + }
>>> + return ACERHDF_ERROR;
>>> +}
>>> +
>>> +
>>> + if (verbose)
>>> + acerhdf_error("read state: %d expected state: %d\n",
>>> + old_state, fanstate);
>>> +
>>> + acerhdf_change_fanstate(ACERHDF_FAN_AUTO);
>>> + disable_kernelmode = 1;
>>> + }
>>> +
>>> + if (state == 0) {
>>> + /* turn fan off only if below fanoff temperature */
>>> + if ((old_state == ACERHDF_FAN_AUTO) &&
>>> + (acerhdf_get_temp() < fanoff))
>>
>> it might be cool to tell the user why you're not turning off the fan.
>>
>> if (verbose)
>> acerhdf_notice("Not turning off fan due to current temp "
>> "exceeding fanoff value\n");
>>
>
> Hm.. I think it should be clear that the fan is turned off, as soon as
> the temperature is below the fanoff temperature. In my opinion printing
> this message would be a case for a "verbose==2" verbose mode :)
My reasoning was that because this is called from sysfs and the user
sees nothing happening even if he'd turned off the fan by calling
.set_cur_state that it might be useful to tell him why.
--
Regards/Gruss,
Boris.
next prev parent reply other threads:[~2009-06-03 7:36 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-25 1:45 Peter Feuerer
2009-04-25 8:42 ` Peter Feuerer
2009-04-26 15:31 ` Matthew Garrett
2009-04-27 18:25 ` Peter Feuerer
2009-04-26 17:29 ` Borislav Petkov
2009-04-27 18:57 ` Peter Feuerer
2009-04-28 7:25 ` Borislav Petkov
2009-04-28 10:04 ` Maxim Levitsky
2009-04-28 20:17 ` Peter Feuerer
2009-04-28 20:31 ` Maxim Levitsky
2009-05-02 21:21 ` Peter Feuerer
2009-05-03 18:46 ` Borislav Petkov
2009-05-06 19:41 ` Peter Feuerer
2009-05-06 22:17 ` Peter Feuerer
2009-05-09 17:14 ` Borislav Petkov
2009-05-11 18:05 ` Peter Feuerer
2009-05-12 6:02 ` Borislav Petkov
2009-05-18 18:04 ` Peter Feuerer
2009-05-18 20:20 ` Joe Perches
2009-05-19 6:47 ` Peter Feuerer
2009-05-19 7:06 ` Joe Perches
2009-05-24 19:22 ` Borislav Petkov
2009-06-01 14:12 ` Peter Feuerer
2009-06-03 7:35 ` Borislav Petkov [this message]
2009-06-03 8:10 ` Peter Feuerer
2009-06-03 10:52 ` Borislav Petkov
2009-06-03 11:29 ` Peter Feuerer
2009-06-03 13:07 ` Peter Feuerer
2009-06-03 14:49 ` Borislav Petkov
2009-06-01 14:18 ` Peter Feuerer
2009-06-03 7:39 ` Borislav Petkov
2009-06-03 7:52 ` Peter Feuerer
2009-06-03 8:00 ` Borislav Petkov
2009-05-19 20:30 ` Pavel Machek
2009-05-22 11:50 ` Borislav Petkov
2009-05-22 14:09 ` Pavel Machek
2009-05-22 14:53 ` Borislav Petkov
2009-05-24 11:13 ` Peter Feuerer
2009-05-22 16:10 ` [PATCH] Acer Aspire One Fan Contro Andreas Mohr
2009-05-22 18:24 ` Borislav Petkov
2009-05-22 19:35 ` Andreas Mohr
2009-04-26 22:20 ` [PATCH] Acer Aspire One Fan Control Joe Perches
2009-04-27 19:03 ` Peter Feuerer
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=20090603073552.GA2671@liondog.tnic \
--to=petkovbb@googlemail.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maximlevitsky@gmail.com \
--cc=mjg59@srcf.ucam.org \
--cc=peter@piie.net \
/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
all inboxes | Powered by JetHome®