From: Felipe Contreras <felipe.contreras@gmail.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: Linux PM <linux-pm@vger.kernel.org>,
Eduardo Valentin <eduardo.valentin@ti.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
corentin.chary@gmail.com,
Matthew Garrett <matthew.garrett@nebula.com>
Subject: Re: [PATCH] thermal: new asus driver
Date: Wed, 21 Aug 2013 14:54:36 -0500 [thread overview]
Message-ID: <CAMP44s1_ZN0ZewJre41Bp50OmwM8djM2uR_xGybQLLgke2w2VA@mail.gmail.com> (raw)
In-Reply-To: <1376551353.2335.117.camel@rzhang-lenovo>
On Thu, Aug 15, 2013 at 2:22 AM, Zhang Rui <rui.zhang@intel.com> wrote:
> On 二, 2013-08-06 at 17:48 -0500, Felipe Contreras wrote:
>> Simple driver to enable control of the fan in ASUS laptops. So far this
>> has only been tested in ASUS Zenbook Prime UX31A, but according to some
>> online reference [1], it should work in other models as well.
>>
> I'd rather prefer to do this in the vendor driver like asus-laptop.c.
> Say, it is the asus-laptop driver that knows the fan control ability of
> the platform and register to the thermal framework.
But asus-laptop doesn't work on this machine. I presume asus-wmi
wouldn't work on some other machines.
I think this is a completely different thing.
>> +static int fan_get_cur_state(struct thermal_cooling_device *cdev,
>> + unsigned long *state)
>> +{
>> + struct acpi_object_list params;
>> + union acpi_object in_objs[1];
>> + unsigned long long value;
>> + acpi_status r;
>> +
>> + params.count = ARRAY_SIZE(in_objs);
>> + params.pointer = in_objs;
>> + in_objs[0].type = ACPI_TYPE_INTEGER;
>> + in_objs[0].integer.value = 0;
>> +
>> + r = acpi_evaluate_integer(NULL, "\\_TZ.RFAN", ¶ms, &value);
>> + if (r != AE_OK)
>> + return r;
>> +
>> + *state = value;
>> +
>> + return 0;
>> +}
>> +
>> +static int fan_set(struct thermal_cooling_device *cdev, int fan, int speed)
>> +{
>> + struct acpi_object_list params;
>> + union acpi_object in_objs[2];
>> + unsigned long long value;
>> +
>> + params.count = ARRAY_SIZE(in_objs);
>> + params.pointer = in_objs;
>> + in_objs[0].type = ACPI_TYPE_INTEGER;
>> + in_objs[0].integer.value = fan;
>> + in_objs[1].type = ACPI_TYPE_INTEGER;
>> + in_objs[1].integer.value = speed;
>> +
>> + return acpi_evaluate_integer(NULL, "\\_SB.PCI0.LPCB.EC0.SFNV", ¶ms, &value);
>> +}
>> +
> I checked a couple of BIOS, and it seems that both of these two methods
> can be invoked by ATKD.WMNB indirectly.
> So I'm wondering if it is proper to invoke these two methods directly,
> and if these are some features/functionalities that are still missing in
> the asus-laptop driver.
I don't know what that means. From what I can see asus-laptop is not
meant to work on all ASUS laptops, and indeed it doesn't work on this
one.
--
Felipe Contreras
prev parent reply other threads:[~2013-08-21 19:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 22:48 [PATCH] thermal: new asus driver Felipe Contreras
2013-08-15 7:22 ` Zhang Rui
2013-08-15 7:24 ` Zhang Rui
2013-08-21 19:54 ` Felipe Contreras [this message]
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=CAMP44s1_ZN0ZewJre41Bp50OmwM8djM2uR_xGybQLLgke2w2VA@mail.gmail.com \
--to=felipe.contreras@gmail.com \
--cc=corentin.chary@gmail.com \
--cc=eduardo.valentin@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthew.garrett@nebula.com \
--cc=rui.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).