mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] force key-release events for Samsung p560 and r560 laptops in  atkbd.c
@ 2009-06-15  9:07 Gordon
  2009-09-04 17:58 ` Gordon
  0 siblings, 1 reply; 2+ messages in thread
From: Gordon @ 2009-06-15  9:07 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 798 bytes --]

Hi all,
certain FN keys on the Samsung P560 and R560 laptops do not produce
"unknown key pressed" events in dmesg. But if I use setkeycodes to
make them known the keyboard gets 'stuck'. These keys seem to not send
keyrelease events.

Attached is a patch for the SAMSUNG P560 laptop, the DMI match just
needs to be modified to work for the R560 model as well. keycodes are
afaik (a colleague has the R560) the same for both. I modified an
existing patch for the NC10 from bugzilla as it is basically the same
problem.

Thread:
http://bugzilla.kernel.org/show_bug.cgi?id=12021

and here is my bug report:
https://bugs.launchpad.net/ubuntu/+source/hal-info/+bug/338182

I hope someone can include this patch into newer releases of the kernel :)

with best regards,
Gordon Köfner

[-- Attachment #2: atkbd-samsung-p560.patch --]
[-- Type: text/x-patch, Size: 1162 bytes --]

--- linux-2.6.28-old/drivers/input/keyboard/atkbd.c	2008-12-13 23:52:26.000000000 +0000
+++ linux-2.6.28/drivers/input/keyboard/atkbd.c	2008-12-14 18:16:23.000000000 +0000
@@ -884,6 +884,21 @@ static void atkbd_inventec_keymap_fixup(
 }
 
 /*
+ * Samsung P560 with Fn+F? key release not working
+ */
+static void atkbd_samsung_keymap_fixup(struct atkbd *atkbd)
+{
+	const unsigned int forced_release_keys[] = {
+		0x82, 0x83, 0x84, 0x86, 0x88, 0x89, 0xb1, 0xb3, 0xf7
+	};
+	int i;
+	if (atkbd->set == 2)
+		for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
+			__set_bit(forced_release_keys[i],
+				atkbd->force_release_mask);
+}
+
+/*
  * atkbd_set_keycode_table() initializes keyboard's keycode table
  * according to the selected scancode set
  */
@@ -1493,6 +1508,15 @@ static struct dmi_system_id atkbd_dmi_qu
 		.callback = atkbd_setup_fixup,
 		.driver_data = atkbd_inventec_keymap_fixup,
 	},
+	{
+		.ident = "Samsung P560",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "P560"),
+		},
+		.callback = atkbd_setup_fixup,
+		.driver_data = atkbd_samsung_keymap_fixup,
+	},
 	{ }
 };
 

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

end of thread, other threads:[~2009-09-04 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15  9:07 [PATCH] force key-release events for Samsung p560 and r560 laptops in atkbd.c Gordon
2009-09-04 17:58 ` Gordon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®