Dear Corentin, 2012/5/18 Corentin Chary <corentincj@xxxxxxxxxx>: > 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 ? Ah, no, it's confidential. but it's in grey area I think :p > >> 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 ? Yes, there is a way to get the device status, but it do no harm if the device ID we queried is not exist. > If yes, could a sysfs file could be added to configure the behavior ? Where is the proper directory to contain it? This feature is nice to have, for people will turn it on always. Best regards, AceLan Kao. > >> 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 -- Chia-Lin Kao(AceLan) http://blog.acelan.idv.tw/ E-Mail: acelan.kaoATcanonical.com (s/AT/@/) -- 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