summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-apple.c
diff options
context:
space:
mode:
authorMansour Behabadi <mansour@oxplot.com>2020-01-29 09:26:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-20 12:54:23 +0300
commitf098e1a042b7f997d4348178df99a0f4821b86cf (patch)
treea549f9534251b57f2eddd2e5eff212f018df7c43 /drivers/hid/hid-apple.c
parent140421867f98b8d944562a01cff0a04298dc3ad2 (diff)
downloadlinux-f098e1a042b7f997d4348178df99a0f4821b86cf.tar.xz
HID: apple: Add support for recent firmware on Magic Keyboards
[ Upstream commit e433be929e63265b7412478eb7ff271467aee2d7 ] Magic Keyboards with more recent firmware (0x0100) report Fn key differently. Without this patch, Fn key may not behave as expected and may not be configurable via hid_apple fnmode module parameter. Signed-off-by: Mansour Behabadi <mansour@oxplot.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hid/hid-apple.c')
-rw-r--r--drivers/hid/hid-apple.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index d0a81a03ddbd..8ab8f2350bbc 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -343,7 +343,8 @@ static int apple_input_mapping(struct hid_device *hdev, struct hid_input *hi,
unsigned long **bit, int *max)
{
if (usage->hid == (HID_UP_CUSTOM | 0x0003) ||
- usage->hid == (HID_UP_MSVENDOR | 0x0003)) {
+ usage->hid == (HID_UP_MSVENDOR | 0x0003) ||
+ usage->hid == (HID_UP_HPVENDOR2 | 0x0003)) {
/* The fn key on Apple USB keyboards */
set_bit(EV_REP, hi->input->evbit);
hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_FN);