diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2007-07-18 22:45:34 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-07-21 23:38:31 -0400 |
commit | 7f5d1cd6287b7b29d210f85e2343207ac4310da2 (patch) | |
tree | 3f90f701043fab6086153f2a991ebdd0e54dddad /drivers/misc/thinkpad_acpi.h | |
parent | d54b7d7f8026300c612dd733d501fcbc22fd0370 (diff) |
ACPI: thinkpad-acpi: register input device
Register an input device to send input events to userspace.
This patch is based on a patch by Richard Hughes <hughsient@gmail.com>.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Hughes <hughsient@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc/thinkpad_acpi.h')
-rw-r--r-- | drivers/misc/thinkpad_acpi.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index 78ea4c88d560..00f1bd73df8f 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/platform_device.h> | 39 | #include <linux/platform_device.h> |
40 | #include <linux/hwmon.h> | 40 | #include <linux/hwmon.h> |
41 | #include <linux/hwmon-sysfs.h> | 41 | #include <linux/hwmon-sysfs.h> |
42 | #include <linux/input.h> | ||
42 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
43 | 44 | ||
44 | #include <linux/dmi.h> | 45 | #include <linux/dmi.h> |
@@ -48,6 +49,7 @@ | |||
48 | #include <acpi/acpi_drivers.h> | 49 | #include <acpi/acpi_drivers.h> |
49 | #include <acpi/acnamesp.h> | 50 | #include <acpi/acnamesp.h> |
50 | 51 | ||
52 | #include <linux/pci_ids.h> | ||
51 | 53 | ||
52 | /**************************************************************************** | 54 | /**************************************************************************** |
53 | * Main driver | 55 | * Main driver |
@@ -98,6 +100,11 @@ static const char *str_supported(int is_supported); | |||
98 | #define vdbg_printk(a_dbg_level, format, arg...) | 100 | #define vdbg_printk(a_dbg_level, format, arg...) |
99 | #endif | 101 | #endif |
100 | 102 | ||
103 | /* Input IDs */ | ||
104 | #define TPACPI_HKEY_INPUT_VENDOR PCI_VENDOR_ID_IBM | ||
105 | #define TPACPI_HKEY_INPUT_PRODUCT 0x5054 /* "TP" */ | ||
106 | #define TPACPI_HKEY_INPUT_VERSION 0x4101 | ||
107 | |||
101 | /* ACPI HIDs */ | 108 | /* ACPI HIDs */ |
102 | #define IBM_HKEY_HID "IBM0068" | 109 | #define IBM_HKEY_HID "IBM0068" |
103 | #define IBM_PCI_HID "PNP0A03" | 110 | #define IBM_PCI_HID "PNP0A03" |
@@ -161,6 +168,7 @@ static int parse_strtoul(const char *buf, unsigned long max, | |||
161 | static struct platform_device *tpacpi_pdev; | 168 | static struct platform_device *tpacpi_pdev; |
162 | static struct class_device *tpacpi_hwmon; | 169 | static struct class_device *tpacpi_hwmon; |
163 | static struct platform_driver tpacpi_pdriver; | 170 | static struct platform_driver tpacpi_pdriver; |
171 | static struct input_dev *tpacpi_inputdev; | ||
164 | static int tpacpi_create_driver_attributes(struct device_driver *drv); | 172 | static int tpacpi_create_driver_attributes(struct device_driver *drv); |
165 | static void tpacpi_remove_driver_attributes(struct device_driver *drv); | 173 | static void tpacpi_remove_driver_attributes(struct device_driver *drv); |
166 | 174 | ||
@@ -233,6 +241,7 @@ static struct { | |||
233 | u16 light_status:1; | 241 | u16 light_status:1; |
234 | u16 wan:1; | 242 | u16 wan:1; |
235 | u16 fan_ctrl_status_undef:1; | 243 | u16 fan_ctrl_status_undef:1; |
244 | u16 input_device_registered:1; | ||
236 | } tp_features; | 245 | } tp_features; |
237 | 246 | ||
238 | static struct list_head tpacpi_all_drivers; | 247 | static struct list_head tpacpi_all_drivers; |