On Thu, May 17, 2012 at 7:48 AM, AceLan Kao <acelan.kao@xxxxxxxxxxxxx> wrote:
> According to the ASUS WMI spec., to enable resume on lid open should
> use the device ID(0x00120032), but it doesn't work indeed.
I suppose this ASUS WMI spec isn't public at all ?
> After discussing with ASUS' BIOS engineer, they say wake on lid open
> doesn't have a uniq device ID(0x00120032) in the BIOS. It shares the same
> device ID with deep S3(0x00120031), and the deep S3(resume on lid open)
> is disable by default.
>
> It's reasonable to resume the system while opening the lid, so add it
> in the asus-wmi driver and tested the code on ASUS X100CH and ASUS 1015CX.
If there there a way to know what the current settings is and if it's
available ?
If yes, could a sysfs file could be added to configure the behavior ?
> Signed-off-by: AceLan Kao <acelan.kao@xxxxxxxxxxxxx>
> ---
> drivers/platform/x86/asus-wmi.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index beda7fc..30e978d 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -137,6 +137,9 @@ MODULE_LICENSE("GPL");
> /* Power */
> #define ASUS_WMI_DEVID_PROCESSOR_STATE 0x00120012
>
> +/* Deep S3 / Resume on LID open */
> +#define ASUS_WMI_DEVID_LID 0x00120031
> +
> /* DSTS masks */
> #define ASUS_WMI_DSTS_STATUS_BIT 0x00000001
> #define ASUS_WMI_DSTS_UNKNOWN_BIT 0x00000002
> @@ -1487,6 +1490,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)
> asus_wmi_set_devstate(ASUS_WMI_DEVID_CWAP,
> asus->driver->quirks->wapf, NULL);
>
> + /* Enable resume on lid open */
> + asus_wmi_set_devstate(ASUS_WMI_DEVID_LID, 1, &rv);
> +
> return asus_wmi_sysfs_init(asus->platform_device);
> }
>
> --
> 1.7.9.5
>
--
Corentin Chary
http://xf.iksaif.net
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]