View | Details | Raw Unified | Return to bug 19950
Collapse All | Expand All

(-)a/drivers/input/keyboard/atkbd.c (-1 / +51 lines)
Lines 1068-1073 static unsigned int atkbd_volume_forced_release_keys[] = { Link Here
1068
	0xae, 0xb0, -1U
1068
	0xae, 0xb0, -1U
1069
};
1069
};
1070
1070
1071
/*
1072
 * Positron notebooks where scancode 0x6e is used by the Fn key and should
1073
 * not generate KEY_F23 events.
1074
 *
1075
 * Commit dc8c9c171ef3 ("Input: atkbd - map F23 key to support default
1076
 * copilot shortcut") mapped scancode 0x6e to KEY_F23 for Copilot support.
1077
 * However, on Positron notebooks scancode 0x6e is generated by the Fn
1078
 * modifier key and should be unmapped to allow firmware/hardware to
1079
 * process Fn+F5 and other Fn combinations properly.
1080
 */
1081
static unsigned int atkbd_positron_fn_keymap_fixup_scancodes[] = {
1082
	0x6e, -1U
1083
};
1084
1085
/*
1086
 * Fixup to remap scancodes to 0 (no keycode) for machines where
1087
 * the default keymap incorrectly assigns keys that should be unused.
1088
 * This is needed when BIOS/firmware uses certain scancodes for
1089
 * internal purposes (e.g., Fn modifier) and they should not generate
1090
 * keyboard events.
1091
 */
1092
static void atkbd_apply_keymap_fixup(struct atkbd *atkbd, const void *data)
1093
{
1094
	const unsigned int *scancodes = data;
1095
	unsigned int i;
1096
1097
	for (i = 0; scancodes[i] != -1U; i++) {
1098
		unsigned int scancode = scancodes[i];
1099
1100
		if (scancode < ATKBD_KEYMAP_SIZE)
1101
			atkbd->keycode[scancode] = 0;
1102
	}
1103
}
1104
1071
/*
1105
/*
1072
 * OQO 01+ multimedia keys (64--66) generate e0 6x upon release whereas
1106
 * OQO 01+ multimedia keys (64--66) generate e0 6x upon release whereas
1073
 * they should be generating e4-e6 (0x80 | code).
1107
 * they should be generating e4-e6 (0x80 | code).
Lines 1775-1780 static int __init atkbd_setup_forced_release(const struct dmi_system_id *id) Link Here
1775
	return 1;
1809
	return 1;
1776
}
1810
}
1777
1811
1812
static int __init atkbd_setup_keymap_fixup(const struct dmi_system_id *id)
1813
{
1814
	atkbd_platform_fixup = atkbd_apply_keymap_fixup;
1815
	atkbd_platform_fixup_data = id->driver_data;
1816
1817
	return 1;
1818
}
1819
1778
static int __init atkbd_setup_scancode_fixup(const struct dmi_system_id *id)
1820
static int __init atkbd_setup_scancode_fixup(const struct dmi_system_id *id)
1779
{
1821
{
1780
	atkbd_platform_scancode_fixup = id->driver_data;
1822
	atkbd_platform_scancode_fixup = id->driver_data;
Lines 1937-1942 static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { Link Here
1937
		},
1979
		},
1938
		.callback = atkbd_deactivate_fixup,
1980
		.callback = atkbd_deactivate_fixup,
1939
	},
1981
	},
1982
	{
1983
		/* Positron Proxima 15 - Fn key (0x6e) should not generate F23 */
1984
		.matches = {
1985
			DMI_MATCH(DMI_SYS_VENDOR, "LNPO Positron LLC"),
1986
			DMI_MATCH(DMI_PRODUCT_NAME, "G1569"),
1987
		},
1988
		.callback = atkbd_setup_keymap_fixup,
1989
		.driver_data = atkbd_positron_fn_keymap_fixup_scancodes,
1990
	},
1940
	{ }
1991
	{ }
1941
};
1992
};
1942
1993
1943
- 

Return to bug 19950