lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 21 Aug 2013 14:54:36 -0500
From:	Felipe Contreras <felipe.contreras@...il.com>
To:	Zhang Rui <rui.zhang@...el.com>
Cc:	Linux PM <linux-pm@...r.kernel.org>,
	Eduardo Valentin <eduardo.valentin@...com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	corentin.chary@...il.com,
	Matthew Garrett <matthew.garrett@...ula.com>
Subject: Re: [PATCH] thermal: new asus driver

On Thu, Aug 15, 2013 at 2:22 AM, Zhang Rui <rui.zhang@...el.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ