aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ABI/testing/sysfs-platform-asus-wmi7
-rw-r--r--drivers/platform/x86/asus-wmi.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-wmi b/Documentation/ABI/testing/sysfs-platform-asus-wmi
index 2e7df91620de..019e1e29370e 100644
--- a/Documentation/ABI/testing/sysfs-platform-asus-wmi
+++ b/Documentation/ABI/testing/sysfs-platform-asus-wmi
@@ -29,3 +29,10 @@ KernelVersion: 2.6.39
29Contact: "Corentin Chary" <corentincj@iksaif.net> 29Contact: "Corentin Chary" <corentincj@iksaif.net>
30Description: 30Description:
31 Control the card touchpad. 1 means on, 0 means off. 31 Control the card touchpad. 1 means on, 0 means off.
32
33What: /sys/devices/platform/<platform>/lid_resume
34Date: May 2012
35KernelVersion: 3.5
36Contact: "AceLan Kao" <acelan.kao@canonical.com>
37Description:
38 Resume on lid open. 1 means on, 0 means off.
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 486f836b79df..c7a36f6b0580 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -139,6 +139,9 @@ MODULE_LICENSE("GPL");
139/* Power */ 139/* Power */
140#define ASUS_WMI_DEVID_PROCESSOR_STATE 0x00120012 140#define ASUS_WMI_DEVID_PROCESSOR_STATE 0x00120012
141 141
142/* Deep S3 / Resume on LID open */
143#define ASUS_WMI_DEVID_LID_RESUME 0x00120031
144
142/* DSTS masks */ 145/* DSTS masks */
143#define ASUS_WMI_DSTS_STATUS_BIT 0x00000001 146#define ASUS_WMI_DSTS_STATUS_BIT 0x00000001
144#define ASUS_WMI_DSTS_UNKNOWN_BIT 0x00000002 147#define ASUS_WMI_DSTS_UNKNOWN_BIT 0x00000002
@@ -1368,6 +1371,7 @@ static ssize_t show_sys_wmi(struct asus_wmi *asus, int devid, char *buf)
1368ASUS_WMI_CREATE_DEVICE_ATTR(touchpad, 0644, ASUS_WMI_DEVID_TOUCHPAD); 1371ASUS_WMI_CREATE_DEVICE_ATTR(touchpad, 0644, ASUS_WMI_DEVID_TOUCHPAD);
1369ASUS_WMI_CREATE_DEVICE_ATTR(camera, 0644, ASUS_WMI_DEVID_CAMERA); 1372ASUS_WMI_CREATE_DEVICE_ATTR(camera, 0644, ASUS_WMI_DEVID_CAMERA);
1370ASUS_WMI_CREATE_DEVICE_ATTR(cardr, 0644, ASUS_WMI_DEVID_CARDREADER); 1373ASUS_WMI_CREATE_DEVICE_ATTR(cardr, 0644, ASUS_WMI_DEVID_CARDREADER);
1374ASUS_WMI_CREATE_DEVICE_ATTR(lid_resume, 0644, ASUS_WMI_DEVID_LID_RESUME);
1371 1375
1372static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr, 1376static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
1373 const char *buf, size_t count) 1377 const char *buf, size_t count)
@@ -1393,6 +1397,7 @@ static struct attribute *platform_attributes[] = {
1393 &dev_attr_camera.attr, 1397 &dev_attr_camera.attr,
1394 &dev_attr_cardr.attr, 1398 &dev_attr_cardr.attr,
1395 &dev_attr_touchpad.attr, 1399 &dev_attr_touchpad.attr,
1400 &dev_attr_lid_resume.attr,
1396 NULL 1401 NULL
1397}; 1402};
1398 1403
@@ -1411,6 +1416,8 @@ static umode_t asus_sysfs_is_visible(struct kobject *kobj,
1411 devid = ASUS_WMI_DEVID_CARDREADER; 1416 devid = ASUS_WMI_DEVID_CARDREADER;
1412 else if (attr == &dev_attr_touchpad.attr) 1417 else if (attr == &dev_attr_touchpad.attr)
1413 devid = ASUS_WMI_DEVID_TOUCHPAD; 1418 devid = ASUS_WMI_DEVID_TOUCHPAD;
1419 else if (attr == &dev_attr_lid_resume.attr)
1420 devid = ASUS_WMI_DEVID_LID_RESUME;
1414 1421
1415 if (devid != -1) 1422 if (devid != -1)
1416 ok = !(asus_wmi_get_devstate_simple(asus, devid) < 0); 1423 ok = !(asus_wmi_get_devstate_simple(asus, devid) < 0);