From nobody Sat Feb 7 19:45:16 2026 Received: from mail-io1-f74.google.com (mail-io1-f74.google.com [209.85.166.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 651B532692A for ; Tue, 11 Nov 2025 21:34:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762896857; cv=none; b=ntR1BYa6RbpOTUKKjwHB+g0WUTXH3bXNSTMPPh5AxVQt1jBCMLS1OaiR5ITz2GIuFGXBfYizH6t9Ht2cxyUP86AxV3rvg7Af9RPVaG/2pzCWAiIeAqupXr7HcGUJ9K8DOJgk+TDWjKa45+CJojPdQ6HcemmP939k4gKJ4PgPj3s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762896857; c=relaxed/simple; bh=AnByqz1bsGNOs4HLx4XQOtBMS6f5gX7qFPGQCvk1TLA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CIV0AxXZoFMvmaahqqAsz/K5yVh4rQGQLNngNunu6dkKACcfacEprnWUsEmCYXgZ+fKYESeJZg9bm51vhtd5MZkDEZoRomG4YygbzYHhROF/cW6E9Gb9+6HwIsASJ4BkOrDRvL8MeWvzkVJN3sCI+oO71X1o6FN+733e0clQ2MY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jdenose.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=iQo/Z0Bd; arc=none smtp.client-ip=209.85.166.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jdenose.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iQo/Z0Bd" Received: by mail-io1-f74.google.com with SMTP id ca18e2360f4ac-9486920a552so34337739f.3 for ; Tue, 11 Nov 2025 13:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762896854; x=1763501654; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Na3+uPKcwDcTaL/Dq2WsexmKJ67v5tFMZ2PH94guhSY=; b=iQo/Z0Bdk+9qF1i+uEPLYprQJmOJ8LtchKO+bW8h2F9MsbuUZRb9DNjEaIzTj82J27 xzK4f3mFNLcvcoc9YkeuLxC5K5g5dLqCDeKwGujckFQAOgkuXkAWWIRTx6/VFWDyzcSl knEhsLbPXQ0KiN7/AiU5X5Hg/3MYq9uzwspLIf3/G6RlO/5Is74wmDJYbuZUeWcHhsjU pNFFN8+Mw4z0A+7UGmzTwNrRyi4XcrtGUSdhRJwkc/+/vbMaWnyikOyRX/TsKlK6tSbi VIresbxIl5/CyO2YKV8EaRGZVo5NgDR4p1mLa+fp2Chmz7pwhdli1cs8xSQHTcfaizOF PtSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762896854; x=1763501654; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Na3+uPKcwDcTaL/Dq2WsexmKJ67v5tFMZ2PH94guhSY=; b=pNRWqnDFdH6j9q6oOVieAP7bBxGDwvLEy2rar4EtbUTjt/VGQKcPr75EKdsGItXzO3 2tupwrtV0HmX+Y9qYvUNzSTh3e//IVDrskw2RsJnxuxcp78FVqlZ5XmjqgaaPtOSYssz jUN9ynFChtt6Mnp/rA5+ld4DCmsP5jFwCjxKDIG5JZcpNiemBkSkqEN2Njw6eYSchARb pnnMXszeDiEoC6l0cFh9bWtYOU/MWwVnevNQyreF3QglP2jEdiWSgHSeSMntNd3F6l6K cvCaL+ytHUC+LGDlV7YM0XA/nyPX45bWVUE35fizWzkpO8OUvKn53LPTy+NAxL9C0fwg mAcQ== X-Forwarded-Encrypted: i=1; AJvYcCUgrS5XN5BR4EP+Sykf+Bt2mfnrr8iodxef8FpbMgFqnUTrCVM8GzLgeMld06zVYeLJNy6sorTJ3sioU70=@vger.kernel.org X-Gm-Message-State: AOJu0Ywplro3Yfbkalg04OpcjN25M/UVKRP1L0RWrnF75uMkv6Qpy4f0 kzQxEFHZTIYSQooYcz8AWEgQNCHFkevbrYAsYh9yDuo9nsRNxCDOEeE26ZUckkOWIKO48oqABmE GNsDUGTsmww== X-Google-Smtp-Source: AGHT+IG5Y1zQcwRPyoiX7OW8d2M0A0XY9OUzEt5RJmXGBYW7vPztaaHhQmLph8kZZjliKinJZ3XSFbfZVabL X-Received: from jabbs11.prod.google.com ([2002:a05:6638:450b:b0:5b7:5e9c:2b4e]) (user=jdenose job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6602:1411:b0:948:26e8:c3c6 with SMTP id ca18e2360f4ac-948c4711b8fmr99553139f.17.1762896854532; Tue, 11 Nov 2025 13:34:14 -0800 (PST) Date: Tue, 11 Nov 2025 21:34:06 +0000 In-Reply-To: <20251111-lid-switch-notifier-v2-0-789723d78d89@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251111-lid-switch-notifier-v2-0-789723d78d89@google.com> X-Mailer: b4 0.14.2 Message-ID: <20251111-lid-switch-notifier-v2-1-789723d78d89@google.com> Subject: [PATCH v2 1/2] Input: Add lid switch notifier From: Jonathan Denose To: Dmitry Torokhov , Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Denose Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This change creates a new input handler which can be included in the build via a new Kconfig option CONFIG_INPUT_LID_NOTIFIER. This input handler listens for lid switch events and publishes them through an atomic notification chain. Other modules may register for events through this notification chain with register_lid_notifier. Signed-off-by: Jonathan Denose --- drivers/input/Kconfig | 11 +++++ drivers/input/Makefile | 1 + drivers/input/lid-notifier.c | 98 ++++++++++++++++++++++++++++++++++++++++= ++++ include/linux/input.h | 2 + 4 files changed, 112 insertions(+) diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index 88ecdf5218ee9ba35e1efec6341f8605b621bd49..16f6d24fd04ac8cb5af9d36cc47= 155ea9be0e177 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -38,6 +38,17 @@ config INPUT_LEDS To compile this driver as a module, choose M here: the module will be called input-leds. =20 +config INPUT_LID_NOTIFIER + tristate "Include notifier for lid switch events" + help + Say Y here if you would like to create a notifier to publish lid switch + events. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called lid-notifier. + config INPUT_FF_MEMLESS tristate "Support for memoryless force-feedback devices" help diff --git a/drivers/input/Makefile b/drivers/input/Makefile index 2cd6e1c9a77844fe09cd3d99533e5d3efb038c7d..1efdba04f79a97e2a122b919834= 1b18a1855b4b9 100644 --- a/drivers/input/Makefile +++ b/drivers/input/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_INPUT_MATRIXKMAP) +=3D matrix-keymap.o obj-$(CONFIG_INPUT_VIVALDIFMAP) +=3D vivaldi-fmap.o =20 obj-$(CONFIG_INPUT_LEDS) +=3D input-leds.o +obj-$(CONFIG_INPUT_LID_NOTIFIER) +=3D lid-notifier.o obj-$(CONFIG_INPUT_MOUSEDEV) +=3D mousedev.o obj-$(CONFIG_INPUT_JOYDEV) +=3D joydev.o obj-$(CONFIG_INPUT_EVDEV) +=3D evdev.o diff --git a/drivers/input/lid-notifier.c b/drivers/input/lid-notifier.c new file mode 100644 index 0000000000000000000000000000000000000000..954b9855532dbd0514860e309d0= b76982e947673 --- /dev/null +++ b/drivers/input/lid-notifier.c @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Lid event notifier + * + * Copyright (c) 2025 Jonathan Denose + */ + +#include +#include +#include + +static struct input_handler lid_handler; +static struct atomic_notifier_head input_notifier_head; + +int register_lid_notifier(struct notifier_block *notifier) +{ + return atomic_notifier_chain_register(&input_notifier_head, notifier); +} +EXPORT_SYMBOL(register_lid_notifier); + +static int lid_handler_connect(struct input_handler *handler, + struct input_dev *input_dev, const struct input_device_id *id) +{ + struct input_handle *handle; + int error; + + handle =3D devm_kzalloc(&input_dev->dev, sizeof(struct input_handle), GFP= _KERNEL); + if (!handle) + return -ENOMEM; + + handle->dev =3D input_dev; + handle->handler =3D handler; + handle->name =3D "lid"; + + error =3D input_register_handle(handle); + if (error) + goto err_free_handle; + + error =3D input_open_device(handle); + if (error) + goto err_unregister_handle; + + return 0; + + err_unregister_handle: + input_unregister_handle(handle); + err_free_handle: + kfree(handle); + return error; +} + +static void lid_handler_disconnect(struct input_handle *handle) +{ + input_close_device(handle); + input_unregister_handle(handle); +} + +static void lid_handler_event(struct input_handle *handle, unsigned int ty= pe, + unsigned int code, int value) +{ + if (type =3D=3D EV_SW && code =3D=3D SW_LID) + atomic_notifier_call_chain(&input_notifier_head, value, handle->dev); +} + +static const struct input_device_id lid_handler_ids[] =3D { + { + .flags =3D INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_SWBIT + | INPUT_DEVICE_ID_MATCH_BUS, + .evbit =3D { BIT_MASK(EV_SW) }, + .swbit =3D { [BIT_WORD(SW_LID)] =3D BIT_MASK(SW_LID) }, + .bustype =3D 0x19 + }, + { }, +}; + +static struct input_handler lid_handler =3D { + .connect =3D lid_handler_connect, + .disconnect =3D lid_handler_disconnect, + .event =3D lid_handler_event, + .name =3D "lid", + .id_table =3D lid_handler_ids +}; + +static int __init lid_notifier_init(void) +{ + return input_register_handler(&lid_handler); +} +module_init(lid_notifier_init); + +static void __exit lid_notifier_exit(void) +{ + input_unregister_handler(&lid_handler); +} +module_exit(lid_notifier_exit); + +MODULE_AUTHOR("Jonathan Denose "); +MODULE_DESCRIPTION("Lid event notifier"); +MODULE_LICENSE("GPL"); diff --git a/include/linux/input.h b/include/linux/input.h index 7d7cb0593a63e93c4906c49cde430188db2d1ab5..023eb92c77d9e8721d482b97876= 32a671671de08 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -592,3 +592,5 @@ int input_ff_create_memless(struct input_dev *dev, void= *data, int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); =20 #endif + +int register_lid_notifier(struct notifier_block *notifier); --=20 2.51.2.1041.gc1ab5b90ca-goog From nobody Sat Feb 7 19:45:16 2026 Received: from mail-oa1-f73.google.com (mail-oa1-f73.google.com [209.85.160.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2567326953 for ; Tue, 11 Nov 2025 21:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762896858; cv=none; b=m5atBlOpY3F0GfX+L2KZQXFl6OH54/bMSjR2os9Z7Ifv7C4pK9xRaP4aNG/8ldj8N41KZ3MpfWuX9MVI3xLanR22Owez9/0j4ZRltQ4/i0Tati3WoPjzJCQPNTxfFhWB2N7lrIzC26LLGxVZIh/KBtBdtPu9dP6kxV0XRJwoADs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762896858; c=relaxed/simple; bh=pM90KdOVsx60/1xAcxMTwwy+eboy8y718ax5DgEnRwA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=IPGFwg2Ri8PEkqf6XfvEpR5MRn1BjagXgu2yaJyUc2CxzdDqnDYb6mgCkp5+VvIK8gExONjNQo7q3x1qBvmydyhTdU1W2YlZtof1/uDSFRw6HEs/V126iZf8tVmLclBj0Dqe6IWILM8FNcu2JqCt9D+XB5Ysz26+nrvWhr7I9eo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jdenose.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=hSda865D; arc=none smtp.client-ip=209.85.160.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jdenose.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="hSda865D" Received: by mail-oa1-f73.google.com with SMTP id 586e51a60fabf-3d303f6e35cso185065fac.3 for ; Tue, 11 Nov 2025 13:34:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762896856; x=1763501656; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=f/cYCc4RTNOJkKd7yZrii8gnbE8VkJGmYPFJwXfRCz4=; b=hSda865DX/cbUgoQ1juPvXUP//DWGiWazu/k7BAL+/ayH8d/+Zc0lrUKKn52o6QvYo rjMeMZUjZ/+iCwKwexfh3nsKn/tk6vkbdUXctEvmTb6fjpLoYY9JfbJsLrQ3VeRog1Eu k3iYg/CO7/Nzpc3i1OarG8a0J2SRSYCmvtnhxNu6wen9h5MJK2JvqdjYgEva0bJNDLzK HbC6evIqHmR7kYGEWD8h6M6qB1m2IEwbnJeKtZ4Yyo3pIE2K5FxIQoy9rDgj0TuBNzNN N6DaL/ykUPj5e7kKsN1Hnmv/b4jVzlO97PnApScyTFl1ZVtUH+7834a34u6iLP4+mIEm BBHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762896856; x=1763501656; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f/cYCc4RTNOJkKd7yZrii8gnbE8VkJGmYPFJwXfRCz4=; b=QWzVRpypoa8nNkh5EyE1JlH+b2s/rfk2rfLUflBQ0/Sv5/C7T1Cu/wjgbERJVLL2z6 PjdWsXefndkPkYUOmfKvZfgMGDz2oVhN4ZrLouOSSRX2Y20GQ/OLaJC4h94kKzYhPHFU IWtXi4iShvPanQFvWU+ZxqJeNK8wZ+BMyTRUsuMDwAia/xJwDFYeT2lhk4+Dw2sduGo5 sj+xtHMt7NsgBn4EAzIXWJJMPF+5HILBBFFoVUw3+554+mDOwrawkSWJk3pU8zk+x6nB rD/QFU1jpltAOd59digRu85MEnP3vjND+bhG80Hz40P2/pkK2K2vFVXv2+jfv3rg7arj Vx2A== X-Forwarded-Encrypted: i=1; AJvYcCXeXtEzAjzzB6bYGsTjMzIFdWc4NSiNuf0TsnYQgyoudTvf3HFlCaAgHKpwiyXz0fHjHXuLcNCdY6J8RYw=@vger.kernel.org X-Gm-Message-State: AOJu0YzLh3lWF+rAXBDXoVPKet8G6RLDvgDfhvzmwhZMHwS7LyRgWGNc wBX1QxazxwEuIW4KXIFGnL8O72Saupl9Q0p++G0KAmN/WUGs/SA5GBm9osdYsYjsEdJSVFctlVT +KRaxxUXVnw== X-Google-Smtp-Source: AGHT+IEEfcrIwR/YKdvBhQZUMOIfTbg7kdffQiDZuJnymnK2OVm1uebo2yYpONP3k/NS++BoHsazcG1du0jX X-Received: from oacsi16.prod.google.com ([2002:a05:6871:eb10:b0:3e0:6d19:652f]) (user=jdenose job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6871:580a:b0:3d9:7dc4:3c21 with SMTP id 586e51a60fabf-3e833f18264mr319992fac.2.1762896855754; Tue, 11 Nov 2025 13:34:15 -0800 (PST) Date: Tue, 11 Nov 2025 21:34:07 +0000 In-Reply-To: <20251111-lid-switch-notifier-v2-0-789723d78d89@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251111-lid-switch-notifier-v2-0-789723d78d89@google.com> X-Mailer: b4 0.14.2 Message-ID: <20251111-lid-switch-notifier-v2-2-789723d78d89@google.com> Subject: [PATCH v2 2/2] HID: multitouch: Toggle touch surface on Elan touchpad on lid event From: Jonathan Denose To: Dmitry Torokhov , Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Denose Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Many touchpad modules have a pin which is expected to be connected to the lid angle sensor in laptops. The pin sends a signal to the touchpad module about the lid state and each touchpad vendor handles this notification in their firmware. The Elan touchpad with VID 323b does not always have this aforementioned pin, which then causes interference between the lid and the touchpad when the lid is closed. This interference causes a few seconds delay before the touchpad works again, or it causes it to be come completely unresponsive. To circumvent this hardware issue in software, implement a device quirk which will allow the hid-multitouch driver to register a notifier_block to listen for lid switch events. When the lid switch closes, the touchpad surface will be turned off and when the lid switch opens, the touchpad surgace will be turned on. This triggers recalibration which resolves interference issues when the lid is closed. Signed-off-by: Jonathan Denose --- drivers/hid/hid-multitouch.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 2879e65cf303b1456311ac06115adda5a78a2600..9a89913c193bc110a0a821a901a= ebd97892c66bd 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -76,6 +77,7 @@ MODULE_LICENSE("GPL"); #define MT_QUIRK_DISABLE_WAKEUP BIT(21) #define MT_QUIRK_ORIENTATION_INVERT BIT(22) #define MT_QUIRK_APPLE_TOUCHBAR BIT(23) +#define MT_QUIRK_REGISTER_LID_NOTIFIER BIT(24) =20 #define MT_INPUTMODE_TOUCHSCREEN 0x02 #define MT_INPUTMODE_TOUCHPAD 0x03 @@ -183,6 +185,8 @@ struct mt_device { struct list_head reports; }; =20 +static struct hid_device *lid_notify_hdev; + static void mt_post_parse_default_settings(struct mt_device *td, struct mt_application *app); static void mt_post_parse(struct mt_device *td, struct mt_application *app= ); @@ -227,6 +231,7 @@ static void mt_post_parse(struct mt_device *td, struct = mt_application *app); #define MT_CLS_SMART_TECH 0x0113 #define MT_CLS_APPLE_TOUCHBAR 0x0114 #define MT_CLS_SIS 0x0457 +#define MT_CLS_REGISTER_LID_NOTIFIER 0x0115 =20 #define MT_DEFAULT_MAXCONTACT 10 #define MT_MAX_MAXCONTACT 250 @@ -327,7 +332,9 @@ static const struct mt_class mt_classes[] =3D { MT_QUIRK_CONTACT_CNT_ACCURATE | MT_QUIRK_WIN8_PTP_BUTTONS, .export_all_inputs =3D true }, - + { .name =3D MT_CLS_REGISTER_LID_NOTIFIER, + .quirks =3D MT_QUIRK_REGISTER_LID_NOTIFIER, + .export_all_inputs =3D true }, /* * vendor specific classes */ @@ -1840,6 +1847,20 @@ static void mt_expired_timeout(struct timer_list *t) clear_bit_unlock(MT_IO_FLAGS_RUNNING, &td->mt_io_flags); } =20 +static int mt_input_notifier(struct notifier_block *nb, unsigned long acti= on, void *dev) +{ + if (action) + mt_set_modes(lid_notify_hdev, HID_LATENCY_NORMAL, TOUCHPAD_REPORT_NONE); + else if (!action) + mt_set_modes(lid_notify_hdev, HID_LATENCY_NORMAL, TOUCHPAD_REPORT_ALL); + + return 0; +} + +static struct notifier_block mt_lid_notifier_block =3D { + .notifier_call =3D mt_input_notifier +}; + static int mt_probe(struct hid_device *hdev, const struct hid_device_id *i= d) { int ret, i; @@ -1920,6 +1941,11 @@ static int mt_probe(struct hid_device *hdev, const s= truct hid_device_id *id) if (hdev->vendor =3D=3D USB_VENDOR_ID_SIS_TOUCH) hdev->quirks |=3D HID_QUIRK_NOGET; =20 + if (mtclass->quirks & MT_CLS_REGISTER_LID_NOTIFIER) { + lid_notify_hdev =3D hdev; + register_lid_notifier(&mt_lid_notifier_block); + } + ret =3D hid_hw_start(hdev, HID_CONNECT_DEFAULT); if (ret) return ret; @@ -2150,6 +2176,10 @@ static const struct hid_device_id mt_devices[] =3D { HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8, USB_VENDOR_ID_ELAN, 0x32ae) }, =20 + { .driver_data =3D MT_CLS_REGISTER_LID_NOTIFIER, + HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8, + USB_VENDOR_ID_ELAN, 0x323b) }, + /* Elitegroup panel */ { .driver_data =3D MT_CLS_SERIAL, MT_USB_DEVICE(USB_VENDOR_ID_ELITEGROUP, --=20 2.51.2.1041.gc1ab5b90ca-goog