Commit 4615bb661352acb7032796185c8c5573e47dfa1d

Authored by Corentin Chary
Committed by Matthew Garrett
1 parent 3b81cf9d55

eeepc-wmi: add touchpad sysfs file

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

Showing 2 changed files with 12 additions and 0 deletions Side-by-side Diff

Documentation/ABI/testing/sysfs-platform-eeepc-wmi
... ... @@ -22,4 +22,11 @@
22 22 Contact: "Corentin Chary" <corentincj@iksaif.net>
23 23 Description:
24 24 Control the card reader. 1 means on, 0 means off.
  25 +
  26 +What: /sys/devices/platform/eeepc-wmi/touchpad
  27 +Date: Jan 2010
  28 +KernelVersion: 2.6.39
  29 +Contact: "Corentin Chary" <corentincj@iksaif.net>
  30 +Description:
  31 + Control the card touchpad. 1 means on, 0 means off.
drivers/platform/x86/eeepc-wmi.c
... ... @@ -77,6 +77,7 @@
77 77 #define EEEPC_WMI_DEVID_BRIGHTNESS 0x00050012
78 78 #define EEEPC_WMI_DEVID_CAMERA 0x00060013
79 79 #define EEEPC_WMI_DEVID_CARDREADER 0x00080013
  80 +#define EEEPC_WMI_DEVID_TOUCHPAD 0x00100011
80 81 #define EEEPC_WMI_DEVID_TOUCHPAD_LED 0x00100012
81 82  
82 83 #define EEEPC_WMI_DSTS_STATUS_BIT 0x00000001
... ... @@ -1006,6 +1007,7 @@
1006 1007 .store = store_##_name, \
1007 1008 }
1008 1009  
  1010 +EEEPC_WMI_CREATE_DEVICE_ATTR(touchpad, 0644, EEEPC_WMI_DEVID_TOUCHPAD);
1009 1011 EEEPC_WMI_CREATE_DEVICE_ATTR(camera, 0644, EEEPC_WMI_DEVID_CAMERA);
1010 1012 EEEPC_WMI_CREATE_DEVICE_ATTR(cardr, 0644, EEEPC_WMI_DEVID_CARDREADER);
1011 1013  
... ... @@ -1036,6 +1038,7 @@
1036 1038 &dev_attr_cpufv.attr,
1037 1039 &dev_attr_camera.attr,
1038 1040 &dev_attr_cardr.attr,
  1041 + &dev_attr_touchpad.attr,
1039 1042 NULL
1040 1043 };
1041 1044  
... ... @@ -1050,6 +1053,8 @@
1050 1053 devid = EEEPC_WMI_DEVID_CAMERA;
1051 1054 else if (attr == &dev_attr_cardr.attr)
1052 1055 devid = EEEPC_WMI_DEVID_CARDREADER;
  1056 + else if (attr == &dev_attr_touchpad.attr)
  1057 + devid = EEEPC_WMI_DEVID_TOUCHPAD;
1053 1058  
1054 1059 if (devid != -1)
1055 1060 supported = eeepc_wmi_get_devstate_simple(devid) != -ENODEV;