lkml.org 
[lkml]   [2013]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] thermal: new asus driver
From
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", &params, &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", &params, &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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-08-21 22:21    [W:0.062 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site