Commit dae9ada9 authored by Natanael Copa's avatar Natanael Copa

main/linux-vanilla: build fix. update config

parent 0b528761
From 0a802b5595bc6769a8984ad83662204db79c5e31 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 4 Sep 2017 19:44:18 +0000
Subject: [PATCH] HID: apple: fix Fn key Magic Keyboard on bluetooth
The vendor id is 0x004c, when Magic Keyboard is connected via bluetooth.
This appears to be the bluetooth fendor id for Apple.
We also need to check against HID_UP_MSVENDOR to get the Fn key working
properly.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
drivers/hid/hid-apple.c | 4 +++-
drivers/hid/hid-core.c | 1 +
drivers/hid/hid-ids.h | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 25b7bd56ae11..c79dbf836925 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -335,7 +335,7 @@ static int apple_input_mapping(struct hid_device *hdev, struct hid_input *hi,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
{
- if (usage->hid == (HID_UP_CUSTOM | 0x0003)) {
+ if (usage->hid == (HID_UP_CUSTOM | 0x0003) || usage->hid == (HID_UP_MSVENDOR | 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);
@@ -472,6 +472,8 @@ static const struct hid_device_id apple_devices[] = {
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI),
.driver_data = APPLE_HAS_FN },
+ { HID_BLUETOOTH_DEVICE(BLUETOOTH_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI),
+ .driver_data = APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
.driver_data = APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO),
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 9017dcc14502..36e43986f415 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1964,6 +1964,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
+ { HID_BLUETOOTH_DEVICE(BLUETOOTH_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
#endif
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index c9ba4c6db74c..3f654444c011 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -85,6 +85,7 @@
#define USB_DEVICE_ID_ANTON_TOUCH_PAD 0x3101
#define USB_VENDOR_ID_APPLE 0x05ac
+#define BLUETOOTH_VENDOR_ID_APPLE 0x004c
#define USB_DEVICE_ID_APPLE_MIGHTYMOUSE 0x0304
#define USB_DEVICE_ID_APPLE_MAGICMOUSE 0x030d
#define USB_DEVICE_ID_APPLE_MAGICTRACKPAD 0x030e
--
2.14.1
......@@ -175,11 +175,11 @@ dev() {
}
sha512sums="bf67ff812cc3cb7e5059e82cc5db0d9a7c5637f7ed9a42e4730c715bf7047c81ed3a571225f92a33ef0b6d65f35595bc32d773356646df2627da55e9bc7f1f1a linux-4.9.tar.xz
d552c5ab3b128cb1b4185aaa3ed27cd92070c2ba5f414747730c1915da432d1f930f81543737b902771967b02da8b41374d8b39518e5443aeaadeaa28153ae36 config-vanilla.aarch64
8db3d9029dffc972d881ffdccbb6afcc02cdb5ccf6a571634e1c1b72552617903ee3e1c87b8971ef1c7143c0ddfcb8e1f21b45c68afeef88d5ff36bb768c8c96 config-vanilla.armhf
6e1d79ebd2113e02881aec39eb4d243761d78be9c736b0ce5ddf1721e65d411a17c866c9f5f9a253e46017d6e7c0b93b7220233780e46e18e29de705f2e543f7 config-vanilla.x86
30a1ec682dd8df025151a7e76e83917d7ead6d2e730e85b0e87941f82dcb45f69afe928472e595997f373460f6c958b802c54663dab7ee9241ecaaf7cd13c769 config-vanilla.x86_64
bb38d1334ab1933aa822c961e1286ae076e3f63620b5075a42e445246599448323bad974107ec5d4ada7ea58052ae797ae9ef7e1715b40cba19022e9fbb45123 config-vanilla.aarch64
d5eb99a2f8fc3908e35a80473361aac7d8700471a35453949d46010d3dc827d229aee7563c53b6654829a0333f1881ba9bfe1ee2dad51441b5208cb72cea974a config-vanilla.armhf
f086ebe7d9ff9d5f29194986836d95b04445adcbaec5130169437b16375e069250b2b2a4324070e11c8508cd53eefa9501ca02944a45be4f8cb49743980fbdeb config-vanilla.x86
40fe2f296404b829efefb0187c504ae7def71436162cf578303965d5802db5fa17392c02d3d91abecbb9b49085214b770e0d8bc9ddea583df64ce40e228187eb config-vanilla.x86_64
ee565e219530bcfaf5cade2622432cfb83743bdbbfc388781901461f19ca553b7fdee3c81ce6b34225ef78a209eb60088630284fcbb0430947aad77a5d8a0865 config-vanilla.ppc
faf5216f916946025041c5b8ffacce2586c88c7d796c17fb9762a8a58986dce7e923a7eb7a413cbd830afef022b18c40b25f4dcd4c9c81253c9aa3e98001b2b0 config-vanilla.ppc64le
26969c1ed93cb88a8b12330a2984954d6c20ef973ef619cf92c0543ab075f4e3342c7d6275ccecd475c5b6129ccfdd6054b41f504bd82e14eb9cefbd74aa1b90 config-vanilla.s390x
aa46333ffd38e701d4819ee95c7c33eaabfe6da12b10451d0439200a261ff274586880f8383f3d3a61f764bad5531489719beae7758adc17d1df6ce52b6d5be6 config-vanilla.ppc64le
50a1f5c3ff3d133aa81e3c9353772f97b4f73aac200546410350dc016ef2ef8c82cc58e056b547b702de7cf5f50fb173eeb40e079953cb7f5e400f87cfafdede config-vanilla.s390x
bd67ec8cbfb5975fb057984ded67c7866f94d8f9a72262be99cc32668e219c15b41c22802d0dca680ea07fbeaf4f13966184c2faa48ebfeecace207c32a6ddcb patch-4.9.161.xz"
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.9.54 Kernel Configuration
# Linux/arm64 4.9.161 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
......@@ -446,6 +446,7 @@ CONFIG_ARM64_ERRATUM_832075=y
CONFIG_ARM64_ERRATUM_834220=y
CONFIG_ARM64_ERRATUM_845719=y
CONFIG_ARM64_ERRATUM_843419=y
CONFIG_ARM64_ERRATUM_1024718=y
CONFIG_CAVIUM_ERRATUM_22375=y
CONFIG_CAVIUM_ERRATUM_23144=y
CONFIG_CAVIUM_ERRATUM_23154=y
......@@ -531,6 +532,9 @@ CONFIG_PARAVIRT=y
CONFIG_XEN_DOM0=y
CONFIG_XEN=y
CONFIG_FORCE_MAX_ZONEORDER=11
CONFIG_UNMAP_KERNEL_AT_EL0=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
CONFIG_ARM64_SSBD=y
CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
......@@ -6745,6 +6749,7 @@ CONFIG_DEBUG_SET_MODULE_RONX=y
# Security options
#
CONFIG_KEYS=y
CONFIG_KEYS_COMPAT=y
# CONFIG_PERSISTENT_KEYRINGS is not set
# CONFIG_BIG_KEYS is not set
CONFIG_TRUSTED_KEYS=m
......
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 4.9.63 Kernel Configuration
# Linux/arm 4.9.161 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_ARM_HAS_SG_CHAIN=y
......@@ -488,6 +488,8 @@ CONFIG_SWP_EMULATE=y
# CONFIG_CPU_BIG_ENDIAN is not set
# CONFIG_CPU_ICACHE_DISABLE is not set
# CONFIG_CPU_BPREDICT_DISABLE is not set
CONFIG_CPU_SPECTRE=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
CONFIG_KUSER_HELPERS=y
CONFIG_VDSO=y
CONFIG_OUTER_CACHE=y
......
#
# Automatically generated file; DO NOT EDIT.
# Linux/powerpc 4.9.63 Kernel Configuration
# Linux/powerpc 4.9.161 Kernel Configuration
#
CONFIG_PPC64=y
......@@ -1125,6 +1125,7 @@ CONFIG_ALLOW_DEV_COREDUMP=y
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_GENERIC_CPU_DEVICES is not set
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_DMA_SHARED_BUFFER=y
......@@ -1853,7 +1854,6 @@ CONFIG_USB_NET_DRIVERS=m
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
# CONFIG_WAN is not set
# CONFIG_VMXNET3 is not set
# CONFIG_ISDN is not set
# CONFIG_NVM is not set
......
#
# Automatically generated file; DO NOT EDIT.
# Linux/s390 4.9.63 Kernel Configuration
# Linux/s390 4.9.161 Kernel Configuration
#
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
......@@ -179,6 +179,7 @@ CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_BPF_SYSCALL=y
# CONFIG_BPF_JIT_ALWAYS_ON is not set
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_ADVISE_SYSCALLS=y
......@@ -560,6 +561,8 @@ CONFIG_BINFMT_SCRIPT=y
CONFIG_BINFMT_MISC=m
CONFIG_COREDUMP=y
CONFIG_SECCOMP=y
# CONFIG_KERNEL_NOBP is not set
# CONFIG_EXPOLINE is not set
#
# Power Management
......@@ -1248,6 +1251,7 @@ CONFIG_ALLOW_DEV_COREDUMP=y
CONFIG_SYS_HYPERVISOR=y
# CONFIG_GENERIC_CPU_DEVICES is not set
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_DMA_SHARED_BUFFER=y
# CONFIG_FENCE_TRACE is not set
......
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.9.54 Kernel Configuration
# Linux/x86 4.9.161 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
......@@ -228,6 +228,7 @@ CONFIG_SLUB_CPU_PARTIAL=y
# CONFIG_SYSTEM_DATA_VERIFICATION is not set
CONFIG_PROFILING=y
CONFIG_TRACEPOINTS=y
CONFIG_HOTPLUG_SMT=y
CONFIG_OPROFILE=m
# CONFIG_OPROFILE_EVENT_MULTIPLEX is not set
CONFIG_HAVE_OPROFILE=y
......@@ -385,6 +386,7 @@ CONFIG_X86_FAST_FEATURE_TESTS=y
CONFIG_X86_MPPARSE=y
CONFIG_X86_BIGSMP=y
# CONFIG_GOLDFISH is not set
CONFIG_RETPOLINE=y
CONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_GOLDFISH is not set
# CONFIG_X86_INTEL_MID is not set
......@@ -1672,6 +1674,7 @@ CONFIG_DEBUG_DEVRES=y
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_GENERIC_CPU_DEVICES is not set
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=m
CONFIG_REGMAP_SPI=m
......
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 4.9.54 Kernel Configuration
# Linux/x86_64 4.9.161 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
......@@ -240,6 +240,7 @@ CONFIG_SLUB_CPU_PARTIAL=y
# CONFIG_SYSTEM_DATA_VERIFICATION is not set
CONFIG_PROFILING=y
CONFIG_TRACEPOINTS=y
CONFIG_HOTPLUG_SMT=y
CONFIG_OPROFILE=m
# CONFIG_OPROFILE_EVENT_MULTIPLEX is not set
CONFIG_HAVE_OPROFILE=y
......@@ -407,6 +408,7 @@ CONFIG_X86_FAST_FEATURE_TESTS=y
CONFIG_X86_X2APIC=y
CONFIG_X86_MPPARSE=y
# CONFIG_GOLDFISH is not set
CONFIG_RETPOLINE=y
CONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_VSMP is not set
# CONFIG_X86_GOLDFISH is not set
......@@ -791,7 +793,6 @@ CONFIG_IA32_EMULATION=y
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_KEYS_COMPAT=y
CONFIG_X86_DEV_DMA_OPS=y
CONFIG_PMC_ATOM=y
CONFIG_NET=y
......@@ -1687,6 +1688,7 @@ CONFIG_DEBUG_DEVRES=y
CONFIG_SYS_HYPERVISOR=y
# CONFIG_GENERIC_CPU_DEVICES is not set
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=m
CONFIG_REGMAP_SPI=m
......@@ -6682,6 +6684,7 @@ CONFIG_X86_DEBUG_FPU=y
# Security options
#
CONFIG_KEYS=y
CONFIG_KEYS_COMPAT=y
# CONFIG_PERSISTENT_KEYRINGS is not set
# CONFIG_BIG_KEYS is not set
CONFIG_TRUSTED_KEYS=m
......@@ -6689,6 +6692,7 @@ CONFIG_ENCRYPTED_KEYS=m
CONFIG_KEY_DH_OPERATIONS=y
# CONFIG_SECURITY_DMESG_RESTRICT is not set
CONFIG_SECURITY=y
CONFIG_PAGE_TABLE_ISOLATION=y
CONFIG_SECURITYFS=y
# CONFIG_SECURITY_NETWORK is not set
# CONFIG_SECURITY_PATH is not set
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment