summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/eeepc-wmi.c
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2011-02-06 15:28:42 +0300
committerMatthew Garrett <mjg@redhat.com>2011-03-28 14:05:20 +0400
commit4615bb661352acb7032796185c8c5573e47dfa1d (patch)
treebe803b5f5ea84a128cf7d0c8f2c9a73300f07b22 /drivers/platform/x86/eeepc-wmi.c
parent3b81cf9d558c57406b4ed9b0d2639113d1d428b6 (diff)
downloadlinux-4615bb661352acb7032796185c8c5573e47dfa1d.tar.xz
eeepc-wmi: add touchpad sysfs file
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform/x86/eeepc-wmi.c')
-rw-r--r--drivers/platform/x86/eeepc-wmi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index a78a90d886da..16c7f2d62515 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -77,6 +77,7 @@ MODULE_ALIAS("wmi:"EEEPC_WMI_MGMT_GUID);
#define EEEPC_WMI_DEVID_BRIGHTNESS 0x00050012
#define EEEPC_WMI_DEVID_CAMERA 0x00060013
#define EEEPC_WMI_DEVID_CARDREADER 0x00080013
+#define EEEPC_WMI_DEVID_TOUCHPAD 0x00100011
#define EEEPC_WMI_DEVID_TOUCHPAD_LED 0x00100012
#define EEEPC_WMI_DSTS_STATUS_BIT 0x00000001
@@ -1006,6 +1007,7 @@ static ssize_t show_sys_wmi(int devid, char *buf)
.store = store_##_name, \
}
+EEEPC_WMI_CREATE_DEVICE_ATTR(touchpad, 0644, EEEPC_WMI_DEVID_TOUCHPAD);
EEEPC_WMI_CREATE_DEVICE_ATTR(camera, 0644, EEEPC_WMI_DEVID_CAMERA);
EEEPC_WMI_CREATE_DEVICE_ATTR(cardr, 0644, EEEPC_WMI_DEVID_CARDREADER);
@@ -1036,6 +1038,7 @@ static struct attribute *platform_attributes[] = {
&dev_attr_cpufv.attr,
&dev_attr_camera.attr,
&dev_attr_cardr.attr,
+ &dev_attr_touchpad.attr,
NULL
};
@@ -1050,6 +1053,8 @@ static mode_t eeepc_sysfs_is_visible(struct kobject *kobj,
devid = EEEPC_WMI_DEVID_CAMERA;
else if (attr == &dev_attr_cardr.attr)
devid = EEEPC_WMI_DEVID_CARDREADER;
+ else if (attr == &dev_attr_touchpad.attr)
+ devid = EEEPC_WMI_DEVID_TOUCHPAD;
if (devid != -1)
supported = eeepc_wmi_get_devstate_simple(devid) != -ENODEV;