aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/synaptics.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-03-05 15:51:33 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-03-25 10:37:29 -0700
commit6c53694fb2223746738d1d0cea71456ca88c8fb2 (patch)
tree27911d851eeab46de47f45b73a0992a4c81002bf /drivers/input/mouse/synaptics.h
parentInput: psmouse - add support for SMBus companions (diff)
downloadlinux-dev-6c53694fb2223746738d1d0cea71456ca88c8fb2.tar.xz
linux-dev-6c53694fb2223746738d1d0cea71456ca88c8fb2.zip
Input: synaptics - split device info into a separate structure
In preparation for SMBus/Intertouch device support, move static device information that we query form the touchpad upon initialization into separate structure. This will allow us to query the device without allocating memory first. Also stop using "unsigned long", everything fits into 32 bit chunks. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/synaptics.h')
-rw-r--r--drivers/input/mouse/synaptics.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
index b76bb7a38472..d9b824fbddc2 100644
--- a/drivers/input/mouse/synaptics.h
+++ b/drivers/input/mouse/synaptics.h
@@ -161,19 +161,23 @@ struct synaptics_hw_state {
signed char scroll;
};
+/* Data read from the touchpad */
+struct synaptics_device_info {
+ u32 model_id; /* Model-ID */
+ u32 firmware_id; /* Firmware-ID */
+ u32 board_id; /* Board-ID */
+ u32 capabilities; /* Capabilities */
+ u32 ext_cap; /* Extended Capabilities */
+ u32 ext_cap_0c; /* Ext Caps from 0x0c query */
+ u32 ext_cap_10; /* Ext Caps from 0x10 query */
+ u32 identity; /* Identification */
+ u32 x_res, y_res; /* X/Y resolution in units/mm */
+ u32 x_max, y_max; /* Max coordinates (from FW) */
+ u32 x_min, y_min; /* Min coordinates (from FW) */
+};
+
struct synaptics_data {
- /* Data read from the touchpad */
- unsigned long int model_id; /* Model-ID */
- unsigned long int firmware_id; /* Firmware-ID */
- unsigned long int board_id; /* Board-ID */
- unsigned long int capabilities; /* Capabilities */
- unsigned long int ext_cap; /* Extended Capabilities */
- unsigned long int ext_cap_0c; /* Ext Caps from 0x0c query */
- unsigned long int ext_cap_10; /* Ext Caps from 0x10 query */
- unsigned long int identity; /* Identification */
- unsigned int x_res, y_res; /* X/Y resolution in units/mm */
- unsigned int x_max, y_max; /* Max coordinates (from FW) */
- unsigned int x_min, y_min; /* Min coordinates (from FW) */
+ struct synaptics_device_info info;
unsigned char pkt_type; /* packet type - old, new, etc */
unsigned char mode; /* current mode byte */