linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Mansour Behabadi <mansour@oxplot.com>,
	Jiri Kosina <jkosina@suse.cz>, Sasha Levin <sashal@kernel.org>,
	linux-input@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 02/19] HID: apple: Add support for recent firmware on Magic Keyboards
Date: Thu,  5 Mar 2020 12:15:23 -0500	[thread overview]
Message-ID: <20200305171540.30250-2-sashal@kernel.org> (raw)
In-Reply-To: <20200305171540.30250-1-sashal@kernel.org>

From: Mansour Behabadi <mansour@oxplot.com>

[ 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>
---
 drivers/hid/hid-apple.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index d0a81a03ddbdd..8ab8f2350bbcd 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);
-- 
2.20.1


  reply	other threads:[~2020-03-05 17:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 17:15 [PATCH AUTOSEL 4.14 01/19] ACPI: watchdog: Allow disabling WDAT at boot Sasha Levin
2020-03-05 17:15 ` Sasha Levin [this message]
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 03/19] HID: core: fix off-by-one memset in hid_report_raw_event() Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 04/19] HID: core: increase HID report buffer size to 8KiB Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 05/19] HID: hiddev: Fix race in in hiddev_disconnect() Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 06/19] i2c: altera: Fix potential integer overflow Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 07/19] HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 08/19] MIPS: VPE: Fix a double free and a memory leak in 'release_vpe()' Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 09/19] cfg80211: check reg_rule for NULL in handle_channel_custom() Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 10/19] scsi: libfc: free response frame from GPN_ID Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 11/19] net: usb: qmi_wwan: restore mtu min/max values after raw_ip switch Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 12/19] net: ks8851-ml: Fix IRQ handling and locking Sasha Levin
2020-03-05 17:15 ` [PATCH AUTOSEL 4.14 13/19] mac80211: rx: avoid RCU list traversal under mutex Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200305171540.30250-2-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mansour@oxplot.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).