All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] platform/x86: thinkpad_acpi: simplify known_ev handling
@ 2024-04-17 17:31 Mark Pearson
  2024-04-17 17:31 ` [PATCH v2 2/4] platform/x86: thinkpad_acpi: Support for trackpoint doubletap Mark Pearson
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Mark Pearson @ 2024-04-17 17:31 UTC (permalink / raw)
  To: mpearson-lenovo
  Cc: hdegoede, ilpo.jarvinen, hmh, ibm-acpi-devel,
	platform-driver-x86, linux-kernel, njoshi1, vsankar,
	peter.hutterer

Modify how known_ev event is handled in preparation for adding new keycode
range.

Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
---
Changes in v2: 
 - New addition to series based on recommendations from review.
 - Note previous input patch was dropped so in numbering gets replaced by this.

 drivers/platform/x86/thinkpad_acpi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 82429e59999d..3b48d893280f 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -4026,6 +4026,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
 
 		send_acpi_ev = true;
 		ignore_acpi_ev = false;
+		known_ev = false;
 
 		switch (hkey >> 12) {
 		case 1:
@@ -4051,8 +4052,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
 				/* FIXME: kick libata if SATA link offline */
 				known_ev = true;
 				break;
-			default:
-				known_ev = false;
 			}
 			break;
 		case 4:
@@ -4078,11 +4077,8 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
 				tpacpi_send_radiosw_update();
 				send_acpi_ev = 0;
 				known_ev = true;
-				break;
 			}
-			fallthrough;	/* to default */
-		default:
-			known_ev = false;
+			break;
 		}
 		if (!known_ev) {
 			pr_notice("unhandled HKEY event 0x%04x\n", hkey);
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-18 15:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 17:31 [PATCH v2 1/4] platform/x86: thinkpad_acpi: simplify known_ev handling Mark Pearson
2024-04-17 17:31 ` [PATCH v2 2/4] platform/x86: thinkpad_acpi: Support for trackpoint doubletap Mark Pearson
2024-04-17 19:39   ` Hans de Goede
2024-04-17 20:06     ` Hans de Goede
2024-04-17 23:57       ` Mark Pearson
2024-04-18 11:34         ` Hans de Goede
2024-04-18 12:24           ` Mark Pearson
2024-04-18 14:42             ` Hans de Goede
2024-04-18 15:03               ` Mark Pearson
2024-04-17 17:31 ` [PATCH v2 3/4] platform/x86: thinkpad_acpi: Support for system debug info hotkey Mark Pearson
2024-04-17 17:31 ` [PATCH v2 4/4] platform/x86: thinkpad_acpi: Support hotkey to disable trackpoint doubletap Mark Pearson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.