From 0c6a61657da78098472fd0eb71cc01f2387fa1bb Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Mon, 15 Apr 2013 13:49:34 -0700 Subject: Input: trackpoint - Optimize trackpoint init to use power-on reset The trackpoint driver sets various parameter default values, all of which happen to be power-on defaults (Source: IBM TrackPoint Engineering Specification, Version 4.0. Also confirmed by empirical data). By sending the power-on reset command to reset all parameters to power-on state, we can skip the lengthy process of programming all parameters. In testing, ~2.5 secs of time writing parameters was reduced to .35 seconds waiting for power-on reset to complete. Signed-off-by: Shawn Nematbakhsh Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/trackpoint.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/input/mouse/trackpoint.h') diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h index e558a7096618..ecd0547964a5 100644 --- a/drivers/input/mouse/trackpoint.h +++ b/drivers/input/mouse/trackpoint.h @@ -126,6 +126,8 @@ #define TP_DEF_PTSON 0x00 #define TP_DEF_SKIPBACK 0x00 #define TP_DEF_EXT_DEV 0x00 /* 0 means enabled */ +#define TP_DEF_TWOHAND 0x00 +#define TP_DEF_SOURCE_TAG 0x00 #define MAKE_PS2_CMD(params, results, cmd) ((params<<12) | (results<<8) | (cmd)) @@ -136,9 +138,9 @@ struct trackpoint_data unsigned char thresh, upthresh; unsigned char ztime, jenks; + /* toggles */ unsigned char press_to_select; unsigned char skipback; - unsigned char ext_dev; }; -- cgit v1.2.3