@@ -183,6 +183,7 @@ enum tpacpi_hkey_event_t {
183
183
* directly in the sparse-keymap.
184
184
*/
185
185
TP_HKEY_EV_AMT_TOGGLE = 0x131a , /* Toggle AMT on/off */
186
+ TP_HKEY_EV_DOUBLETAP_TOGGLE = 0x131c , /* Toggle trackpoint doubletap on/off */
186
187
TP_HKEY_EV_PROFILE_TOGGLE = 0x131f , /* Toggle platform profile */
187
188
188
189
/* Reasons for waking up from S3/S4 */
@@ -372,6 +373,7 @@ static struct {
372
373
u32 hotkey_poll_active :1 ;
373
374
u32 has_adaptive_kbd :1 ;
374
375
u32 kbd_lang :1 ;
376
+ u32 trackpoint_doubletap :1 ;
375
377
struct quirk_entry * quirks ;
376
378
} tp_features ;
377
379
@@ -3527,6 +3529,9 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
3527
3529
3528
3530
hotkey_poll_setup_safe (true);
3529
3531
3532
+ /* Enable doubletap by default */
3533
+ tp_features .trackpoint_doubletap = 1 ;
3534
+
3530
3535
return 0 ;
3531
3536
}
3532
3537
@@ -3826,7 +3831,9 @@ static bool hotkey_notify_8xxx(const u32 hkey, bool *send_acpi_ev)
3826
3831
{
3827
3832
switch (hkey ) {
3828
3833
case TP_HKEY_EV_TRACK_DOUBLETAP :
3829
- tpacpi_input_send_key (hkey , send_acpi_ev );
3834
+ if (tp_features .trackpoint_doubletap )
3835
+ tpacpi_input_send_key (hkey , send_acpi_ev );
3836
+
3830
3837
return true;
3831
3838
default :
3832
3839
return false;
@@ -11033,6 +11040,9 @@ static bool tpacpi_driver_event(const unsigned int hkey_event)
11033
11040
else
11034
11041
dytc_control_amt (!dytc_amt_active );
11035
11042
11043
+ return true;
11044
+ case TP_HKEY_EV_DOUBLETAP_TOGGLE :
11045
+ tp_features .trackpoint_doubletap = !tp_features .trackpoint_doubletap ;
11036
11046
return true;
11037
11047
case TP_HKEY_EV_PROFILE_TOGGLE :
11038
11048
platform_profile_cycle ();
0 commit comments