Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319669
b: refs/heads/master
c: c0b91b6
h: refs/heads/master
i:
  319667: a19f754
v: v3
  • Loading branch information
AceLan Kao authored and Matthew Garrett committed Jul 28, 2012
1 parent ed1617e commit 66c9130
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 272c77d55672ef92eda9d5e24a5a7ac62df9c431
refs/heads/master: c0b91b6d5226247fa4fe894eb592bcc56bc7e9fd
7 changes: 7 additions & 0 deletions trunk/Documentation/ABI/testing/sysfs-platform-asus-wmi
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ KernelVersion: 2.6.39
Contact: "Corentin Chary" <corentincj@iksaif.net>
Description:
Control the card touchpad. 1 means on, 0 means off.

What: /sys/devices/platform/<platform>/lid_resume
Date: May 2012
KernelVersion: 3.5
Contact: "AceLan Kao" <acelan.kao@canonical.com>
Description:
Resume on lid open. 1 means on, 0 means off.
7 changes: 7 additions & 0 deletions trunk/drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ MODULE_LICENSE("GPL");
/* Power */
#define ASUS_WMI_DEVID_PROCESSOR_STATE 0x00120012

/* Deep S3 / Resume on LID open */
#define ASUS_WMI_DEVID_LID_RESUME 0x00120031

/* DSTS masks */
#define ASUS_WMI_DSTS_STATUS_BIT 0x00000001
#define ASUS_WMI_DSTS_UNKNOWN_BIT 0x00000002
Expand Down Expand Up @@ -1368,6 +1371,7 @@ static ssize_t show_sys_wmi(struct asus_wmi *asus, int devid, char *buf)
ASUS_WMI_CREATE_DEVICE_ATTR(touchpad, 0644, ASUS_WMI_DEVID_TOUCHPAD);
ASUS_WMI_CREATE_DEVICE_ATTR(camera, 0644, ASUS_WMI_DEVID_CAMERA);
ASUS_WMI_CREATE_DEVICE_ATTR(cardr, 0644, ASUS_WMI_DEVID_CARDREADER);
ASUS_WMI_CREATE_DEVICE_ATTR(lid_resume, 0644, ASUS_WMI_DEVID_LID_RESUME);

static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
Expand All @@ -1393,6 +1397,7 @@ static struct attribute *platform_attributes[] = {
&dev_attr_camera.attr,
&dev_attr_cardr.attr,
&dev_attr_touchpad.attr,
&dev_attr_lid_resume.attr,
NULL
};

Expand All @@ -1411,6 +1416,8 @@ static umode_t asus_sysfs_is_visible(struct kobject *kobj,
devid = ASUS_WMI_DEVID_CARDREADER;
else if (attr == &dev_attr_touchpad.attr)
devid = ASUS_WMI_DEVID_TOUCHPAD;
else if (attr == &dev_attr_lid_resume.attr)
devid = ASUS_WMI_DEVID_LID_RESUME;

if (devid != -1)
ok = !(asus_wmi_get_devstate_simple(asus, devid) < 0);
Expand Down

0 comments on commit 66c9130

Please sign in to comment.