aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/thinkpad_acpi.h
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2007-07-18 23:45:34 -0300
committerLen Brown <len.brown@intel.com>2007-07-21 23:38:31 -0400
commit7f5d1cd6287b7b29d210f85e2343207ac4310da2 (patch)
tree3f90f701043fab6086153f2a991ebdd0e54dddad /drivers/misc/thinkpad_acpi.h
parentd54b7d7f8026300c612dd733d501fcbc22fd0370 (diff)
downloadkernel_samsung_smdk4412-7f5d1cd6287b7b29d210f85e2343207ac4310da2.zip
kernel_samsung_smdk4412-7f5d1cd6287b7b29d210f85e2343207ac4310da2.tar.gz
kernel_samsung_smdk4412-7f5d1cd6287b7b29d210f85e2343207ac4310da2.tar.bz2
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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index 78ea4c8..00f1bd7 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -39,6 +39,7 @@
#include <linux/platform_device.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
+#include <linux/input.h>
#include <asm/uaccess.h>
#include <linux/dmi.h>
@@ -48,6 +49,7 @@
#include <acpi/acpi_drivers.h>
#include <acpi/acnamesp.h>
+#include <linux/pci_ids.h>
/****************************************************************************
* Main driver
@@ -98,6 +100,11 @@ static const char *str_supported(int is_supported);
#define vdbg_printk(a_dbg_level, format, arg...)
#endif
+/* Input IDs */
+#define TPACPI_HKEY_INPUT_VENDOR PCI_VENDOR_ID_IBM
+#define TPACPI_HKEY_INPUT_PRODUCT 0x5054 /* "TP" */
+#define TPACPI_HKEY_INPUT_VERSION 0x4101
+
/* ACPI HIDs */
#define IBM_HKEY_HID "IBM0068"
#define IBM_PCI_HID "PNP0A03"
@@ -161,6 +168,7 @@ static int parse_strtoul(const char *buf, unsigned long max,
static struct platform_device *tpacpi_pdev;
static struct class_device *tpacpi_hwmon;
static struct platform_driver tpacpi_pdriver;
+static struct input_dev *tpacpi_inputdev;
static int tpacpi_create_driver_attributes(struct device_driver *drv);
static void tpacpi_remove_driver_attributes(struct device_driver *drv);
@@ -233,6 +241,7 @@ static struct {
u16 light_status:1;
u16 wan:1;
u16 fan_ctrl_status_undef:1;
+ u16 input_device_registered:1;
} tp_features;
static struct list_head tpacpi_all_drivers;