]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/misc/thinkpad_acpi.h
ACPI: thinkpad-acpi: checkpoint sysfs interface version due to input layer
[linux-2.6-omap-h63xx.git] / drivers / misc / thinkpad_acpi.h
index 440145a026174c90bfcf85a05bc434d5504a3c21..c5c1316ae3a66a4fe02b6cfe4a9a7894b1d9179e 100644 (file)
@@ -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);
 
@@ -197,6 +205,7 @@ struct ibm_struct {
        int (*read) (char *);
        int (*write) (char *);
        void (*exit) (void);
+       void (*resume) (void);
 
        struct list_head all_drivers;
 
@@ -228,10 +237,12 @@ static struct {
        u16 bluetooth:1;
        u16 hotkey:1;
        u16 hotkey_mask:1;
+       u16 hotkey_wlsw:1;
        u16 light:1;
        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;
@@ -278,8 +289,6 @@ static int beep_write(char *buf);
  * Bluetooth subdriver
  */
 
-#define TPACPI_BLUETH_SYSFS_GROUP "bluetooth"
-
 enum {
        /* ACPI GBDC/SBDC bits */
        TP_ACPI_BLUETOOTH_HWPRESENT     = 0x01, /* Bluetooth hw available */
@@ -416,17 +425,15 @@ static int fan_write_cmd_watchdog(const char *cmd, int *rc);
  * Hotkey subdriver
  */
 
-#define TPACPI_HOTKEY_SYSFS_GROUP "hotkey"
-
 static int hotkey_orig_status;
-static int hotkey_orig_mask;
+static u32 hotkey_orig_mask;
 
 static struct mutex hotkey_mutex;
 
 static int hotkey_init(struct ibm_init_struct *iibm);
 static void hotkey_exit(void);
-static int hotkey_get(int *status, int *mask);
-static int hotkey_set(int status, int mask);
+static int hotkey_get(int *status, u32 *mask);
+static int hotkey_set(int status, u32 mask);
 static void hotkey_notify(struct ibm_struct *ibm, u32 event);
 static int hotkey_read(char *p);
 static int hotkey_write(char *buf);
@@ -553,8 +560,6 @@ static int volume_write(char *buf);
  * Wan subdriver
  */
 
-#define TPACPI_WAN_SYSFS_GROUP "wwan"
-
 enum {
        /* ACPI GWAN/SWAN bits */
        TP_ACPI_WANCARD_HWPRESENT       = 0x01, /* Wan hw available */