Commit graph

72 commits

Author SHA1 Message Date
José Expósito 7f52ece242 HID: apple: Use BIT to define quirks
Replace the existing quirk hardcoded values with the BIT macro in order
to simplify including new quirks.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-11-19 16:04:02 +01:00
José Expósito a5fe7864d8 HID: apple: Do not reset quirks when the Fn key is not found
When a keyboard without a function key is detected, instead of removing
all quirks, remove only the APPLE_HAS_FN quirk.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-11-19 16:04:02 +01:00
Jiri Kosina b9865081a5 Merge branch 'for-5.16/apple' into for-linus
- support for 2021 Magic Keyboard (Alex Henrie)
- tidle key quirk handling improvement (Alex Henrie)
2021-11-05 12:09:11 +01:00
Alex Henrie d58cf34a59 HID: apple: Bring back flag for Apple tilde key quirk
Some Apple ISO keyboards have a quirk where the backtick/tilde key is
swapped with the less-than/greater-than key. Unfortunately, there is no
perfectly reliable way to detect whether a keyboard has the quirk or
not, but the quirk appears to only be present on models that support
Bluetooth, and the affected keyboards usually report country code 13 in
the HID descriptor.

Therefore, the best we can do is to change
/sys/module/hid_apple/parameters/iso_layout to a ternary:

0 = Not ISO or ISO and not quirky
1 = ISO and quirky
-1 = Guess based on product ID and country code

Table of keyboards that José, Julian and I have tested:

Product    Model  Shape  Labels      Bus  Country  Quirky
=========================================================
05ac:0201  M2452  ANSI   Usonian     USB  0        No
05ac:020b  A1048  ANSI   Usonian     USB  0        No
05ac:020c  A1048  ISO    Québécois   USB  13       No
05ac:0221  A1243  ISO    Norwegian   USB  13       No
05ac:0221  A1243  ISO    Portuguese  USB  13       No
05ac:0221  A1243  ISO    Swedish     USB  13       No
05ac:0221  A1243  ISO    Swiss       USB  13       No
05ac:022c  A1255  ANSI   Usonian     BT   33       No
05ac:022d  A1255  ISO    Hebrew      BT   13       Yes
05ac:022d  A1255  ISO    Québécois   BT   13       Yes
05ac:022d  A1255  ISO    Spanish     BT   13       Yes
05ac:023a  A1314  ISO    Russian     BT   13       Yes
05ac:023a  A1314  ISO    Swiss       BT   13       Yes
05ac:024f  A1243  ANSI   Usonian     USB  0        No
05ac:0250  A1243  ISO    British     USB  13       No
05ac:0250  A1243  ISO    German      USB  13       No
05ac:0250  A1243  ISO    Italian     USB  13       No
05ac:0250  A1243  ISO    Québécois   USB  13       No
05ac:0251  A1243  JIS    Japanese    USB  15       No
05ac:0255  A1314  ANSI   Usonian     BT   33       No
05ac:0255  A1314  ANSI   Taiwanese   BT   33       No
05ac:0255  A1314  ANSI   Thai        BT   33       No
05ac:0256  A1314  ISO    Arabic      BT   13       Yes
05ac:0256  A1314  ISO    French      BT   13       Yes
05ac:0256  A1314  ISO    German      BT   13       Yes
05ac:0256  A1314  ISO    Norwegian   BT   13       Yes
05ac:0256  A1314  ISO    Spanish     BT   13       Yes
05ac:0256  A1314  ISO    Swiss       BT   13       Yes
05ac:0257  A1314  JIS    Japanese    BT   15       No
05ac:0267  A1644  ANSI   Usonian     USB  33       No
004c:0267  A1644  ANSI   Usonian     BT   0        No
05ac:0267  A1644  ISO    British     USB  13       Yes
004c:0267  A1644  ISO    British     BT   0        Yes
05ac:0267  A1644  ISO    Finnish     USB  13       Yes
004c:0267  A1644  ISO    Finnish     BT   0        Yes
05ac:0267  A1644  ISO    Québécois   USB  13       Yes
004c:0267  A1644  ISO    Québécois   BT   0        Yes
05ac:0267  A1644  ISO    Spanish     USB  13       Yes
004c:0267  A1644  ISO    Spanish     BT   0        Yes
05ac:0267  A1644  ISO    Swiss       USB  13       Yes
004c:0267  A1644  ISO    Swiss       BT   0        Yes
05ac:0267  A1644  JIS    Japanese    USB  15       No
004c:0267  A1644  JIS    Japanese    BT   0        No
05ac:029c  A2450  ANSI   Usonian     USB  33       No
004c:029c  A2450  ANSI   Usonian     BT   0        No
05ac:029c  A2450  ISO    Spanish     USB  13       Yes
004c:029c  A2450  ISO    Spanish     BT   0        Yes
05ac:029c  A2450  JIS    Japanese    USB  15       No
004c:029c  A2450  JIS    Japanese    BT   0        No

Reported-by: José Expósito <jose.exposito89@gmail.com>
Tested-by: José Expósito <jose.exposito89@gmail.com>
Tested-by: Julian Weigt <juw@posteo.de>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-10-19 10:59:21 +02:00
Alex Henrie 0cd3be5173 HID: apple: Add support for the 2021 Magic Keyboard
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-10-19 10:58:28 +02:00
Alex Henrie 371a9dcee7 HID: apple: Rename MAGIC_KEYBOARD_ANSI to MAGIC_KEYBOARD_2015
The ANSI, ISO, and JIS variants of this keyboard all have the same
product ID.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-10-19 10:58:28 +02:00
Alexander F. Lent cc84094218 HID: apple: Eliminate obsolete IR receiver quirks
This code has been dead since 2013, when the appleir driver was added by
commit 9a4a5574ce ("HID: appleir: add support for Apple ir devices"),
removing Apple IR receivers from this driver.

No other Apple devices use these quirks, so drop them.

Signed-off-by: Alexander F. Lent <lx@xanderlent.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-09-22 09:32:16 +02:00
Mizuho Mori 67fd71ba16 HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS
Apple Magic Keyboard(JIS)'s Logical Maximum and Usage Maximum are wrong.

Below is a report descriptor.

0x05, 0x01,         /*  Usage Page (Desktop),                           */
0x09, 0x06,         /*  Usage (Keyboard),                               */
0xA1, 0x01,         /*  Collection (Application),                       */
0x85, 0x01,         /*      Report ID (1),                              */
0x05, 0x07,         /*      Usage Page (Keyboard),                      */
0x15, 0x00,         /*      Logical Minimum (0),                        */
0x25, 0x01,         /*      Logical Maximum (1),                        */
0x19, 0xE0,         /*      Usage Minimum (KB Leftcontrol),             */
0x29, 0xE7,         /*      Usage Maximum (KB Right GUI),               */
0x75, 0x01,         /*      Report Size (1),                            */
0x95, 0x08,         /*      Report Count (8),                           */
0x81, 0x02,         /*      Input (Variable),                           */
0x95, 0x05,         /*      Report Count (5),                           */
0x75, 0x01,         /*      Report Size (1),                            */
0x05, 0x08,         /*      Usage Page (LED),                           */
0x19, 0x01,         /*      Usage Minimum (01h),                        */
0x29, 0x05,         /*      Usage Maximum (05h),                        */
0x91, 0x02,         /*      Output (Variable),                          */
0x95, 0x01,         /*      Report Count (1),                           */
0x75, 0x03,         /*      Report Size (3),                            */
0x91, 0x03,         /*      Output (Constant, Variable),                */
0x95, 0x08,         /*      Report Count (8),                           */
0x75, 0x01,         /*      Report Size (1),                            */
0x15, 0x00,         /*      Logical Minimum (0),                        */
0x25, 0x01,         /*      Logical Maximum (1),                        */

here is a report descriptor which is parsed one in kernel.
see sys/kernel/debug/hid/<dev>/rdesc

05 01 09 06 a1 01 85 01 05 07
15 00 25 01 19 e0 29 e7 75 01
95 08 81 02 95 05 75 01 05 08
19 01 29 05 91 02 95 01 75 03
91 03 95 08 75 01 15 00 25 01
06 00 ff 09 03 81 03 95 06 75
08 15 00 25 [65] 05 07 19 00 29
[65] 81 00 95 01 75 01 15 00 25
01 05 0c 09 b8 81 02 95 01 75
01 06 01 ff 09 03 81 02 95 01
75 06 81 03 06 02 ff 09 55 85
55 15 00 26 ff 00 75 08 95 40
b1 a2 c0 06 00 ff 09 14 a1 01
85 90 05 84 75 01 95 03 15 00
25 01 09 61 05 85 09 44 09 46
81 02 95 05 81 01 75 08 95 01
15 00 26 ff 00 09 65 81 02 c0
00

Position 64(Logical Maximum) and 70(Usage Maximum) are 101.
Both should be 0xE7 to support JIS specific keys(ろ, Eisu, Kana, |) support.
position 117 is also 101 but not related(it is Usage 65h).

There are no difference of product id between JIS and ANSI.
They are same 0x0267.

Signed-off-by: Mizuho Mori <morimolymoly@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-09-15 16:44:10 +02:00
Jiri Kosina 46a226b50e Merge branch 'for-5.15/apple' into for-linus
- Support proper EV_MSC emissions to hid-apple (Vincent Lefevre)
2021-09-01 22:11:24 +02:00
Vincent Lefevre 3b41fb4094 HID: apple: Add missing scan code event for keys handled by hid-apple
When an EV_KEY event is generated by hid-apple due to special key
mapping, the usual associated scan code event (EV_MSC) is missing.
This issue can be seen with the evtest utility.

Add the scan code event for these special keys.

BugLink: https://bugs.debian.org/757356
Co-developed-by: Daniel Lin <ephemient@gmail.com>
Signed-off-by: Daniel Lin <ephemient@gmail.com>
Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-07-28 11:53:50 +02:00
Haochen Tong ebe0b42a42 HID: apple: Add support for Keychron K1 wireless keyboard
The Keychron K1 wireless keyboard has a set of Apple-like function keys
and an Fn key that works like on an Apple bluetooth keyboard. It
identifies as an Apple Alu RevB ANSI keyboard (05ac:024f) over USB and
BT. Use hid-apple for it so the Fn key and function keys work correctly.

Signed-off-by: Haochen Tong <i@hexchain.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-07-28 11:40:43 +02:00
BALATON Zoltan 4c9454267e HID: apple: Add support for Matias wireless keyboard
The Matias Wireless keyboard has an Apple like layout and identifies
as ISO RevB Alu keyboard. Use hid-apple for it so Fn key and media
control functions work as expected.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2020-08-17 12:17:52 +02:00
Hans de Goede a5d81646fa HID: apple: Disable Fn-key key-re-mapping on clone keyboards
The Maxxter KB-BT-001 Bluetooth keyboard, which looks somewhat like the
Apple Wireless Keyboard, is using the vendor and product IDs (05AC:0239)
of the Apple Wireless Keyboard (2009 ANSI version) <sigh>.

But its F1 - F10 keys are marked as sending F1 - F10, not the special
functions hid-apple.c maps them too; and since its descriptors do not
contain the HID_UP_CUSTOM | 0x0003 usage apple-hid looks for for the
Fn-key, apple_setup_input() never gets called, so F1 - F6 are mapped
to key-codes which have not been set in the keybit array causing them
to not send any events at all.

The lack of a usage code matching the Fn key in the clone is actually
useful as this allows solving this problem in a generic way.

This commits adds a fn_found flag and it adds a input_configured
callback which checks if this flag is set once all usages have been
mapped. If it is not set, then assume this is a clone and clear the
quirks bitmap so that the hid-apple code does not add any special
handling to this keyboard.

This fixes F1 - F6 not sending anything at all and F7 - F12 sending
the wrong codes on the Maxxter KB-BT-001 Bluetooth keyboard and on
similar clones.

Cc: Joao Moreno <mail@joaomoreno.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2020-06-24 09:49:04 +02:00
free5lot 346338ef00 HID: apple: Swap the Fn and Left Control keys on Apple keyboards
This patch allows users to swap the Fn and left Control keys on all Apple
keyboards: internal (e.g. Macbooks) and external (both wired and wireless).
The patch adds a new hid-apple module param: swap_fn_leftctrl (off by default).

Signed-off-by: Zakhar Semenov <mail@free5lot.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2020-05-15 12:20:50 +02:00
Mansour Behabadi e433be929e HID: apple: Add support for recent firmware on Magic Keyboards
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>
2020-02-12 14:17:42 +01:00
Joao Moreno aec256d0ec HID: apple: Fix stuck function keys when using FN
This fixes an issue in which key down events for function keys would be
repeatedly emitted even after the user has raised the physical key. For
example, the driver fails to emit the F5 key up event when going through
the following steps:
- fnmode=1: hold FN, hold F5, release FN, release F5
- fnmode=2: hold F5, hold FN, release F5, release FN

The repeated F5 key down events can be easily verified using xev.

Signed-off-by: Joao Moreno <mail@joaomoreno.com>
Co-developed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-09-04 09:22:55 +02:00
Thomas Gleixner 2874c5fd28 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:26:32 -07:00
Sean O'Brien ee34549243 HID: add support for Apple Magic Keyboards
USB device
	Vendor 05ac (Apple)
	Device 026c (Magic Keyboard with Numeric Keypad)

Bluetooth devices
	Vendor 004c (Apple)
	Device 0267 (Magic Keyboard)
	Device 026c (Magic Keyboard with Numeric Keypad)

Support already exists for the Magic Keyboard over USB connection.
Add support for the Magic Keyboard over Bluetooth connection, and for
the Magic Keyboard with Numeric Keypad over Bluetooth and USB
connection.

Signed-off-by: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-08-28 13:52:50 +02:00
Alex Henrie bd77a0f08e HID: apple: Use country code to detect ISO keyboards
At least on newer laptops, Apple uses the same USB ID for both ISO and
ANSI keyboards. However, they have been good about filling in the
bCountryCode field in the HID descriptor on all of their keyboards. A
value of 13 indicates an ISO layout and other values indicate various
country-specific ANSI layouts.

With this patch, users of Apple US keyboards will no longer have to run
`echo 0 > /sys/module/hid_apple/parameters/iso_layout` to get a working
tilde key.

Please test this patch and send feedback if you have a Macbook or an
Apple keyboard.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-06-08 13:58:03 +02:00
Jean-Gabriel Gill-Couture b5d9427549 HID: add usb device id for Apple Magic Keyboard
USB device
	Vendor 05ac (Apple)
	Device 0267 (Magic Keyboard)

This keyboard supports both Bluetooth and USB connections, this patch
only covers USB.

Thanks to Maxime Poulin <maxpoulin64@gmail.com>

Signed-off-by: Jean-Gabriel Gill-Couture <jeangab@jeangab.fr.nf>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-07-11 17:41:31 +02:00
Henrik Rydberg a4a2c54560 HID: apple: Add support for the 2015 Macbook Pro
This patch adds keyboard support for MacbookPro12,1 as WELLSPRING9
(0x0272, 0x0273, 0x0274). The touchpad is handled in a separate
bcm5974 patch, as usual.

Tested-by: John Horan <knasher@gmail.com>
Tested-by: Jochen Radmacher <jradmacher@gmx.de>
Tested-by: Yang Hongyang <burnef@gmail.com>
Tested-by: Yen-Chin, Lee <coldnew.tw@gmail.com>
Tested-by: George Hilios <ghilios@gmail.com>
Tested-by: Janez Urevc <janez@janezurevc.name>
Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
Acked-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-27 15:43:46 -07:00
Huei-Horng Yo bd4a7ce1da HID: apple: add Apple wireless keyboard 2011 JIS model support
Add Apple wireless keyboard 2011 JIS model (05ac:0257).

Signed-off-by: Huei-Horng Yo <hiroshi@ghostsinthelab.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-06 14:35:18 +01:00
Jiri Kosina a94c79bdc9 HID: apple: swap_opt_cmd is already zero-initialized
Global static variable is already zero-initialized.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-14 16:07:42 +02:00
Nanno Langstraat 43c831468b HID: apple: option to swap the 'Option' ("Alt") and 'Command' ("Flag") keys.
Use case: people who use both Apple and PC keyboards regularly, and desire to
keep&use their PC muscle memory.

A particular use case: an Apple compact external keyboard connected to a PC
laptop. (This use case can't be covered well by X.org key remappings etc.)

Signed-off-by: Nanno Langstraat <langstr@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-14 16:07:18 +02:00
Jiri Kosina 63faf15dba Merge branches 'for-3.12/devm', 'for-3.12/i2c-hid', 'for-3.12/i2c-hid-dt', 'for-3.12/logitech', 'for-3.12/multitouch-win8', 'for-3.12/trasnport-driver-cleanup', 'for-3.12/uhid', 'for-3.12/upstream' and 'for-3.12/wiimote' into for-linus 2013-09-06 11:58:37 +02:00
Benjamin Tissoires abf832bfc3 HID: trivial devm conversion for special hid drivers
It is safe to use devres allocation within the hid subsystem:
- the devres release is called _after_ the call to .remove(), meaning
  that no freed pointers will exists while removing the device
- if a .probe() fails, devres releases all the allocated ressources
  before going to the next driver: there will not be ghost ressources
  attached to a hid device if several drivers are probed.

Given that, we can clean up a little some of the HID drivers. These ones
are trivial:
- there is only one kzalloc in the driver
- the .remove() callback contains only one kfree on top of hid_hw_stop()
- the error path in the probe is easy enough to be manually checked

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-07-31 10:12:28 +02:00
Dmitry Torokhov 9d9a04ee75 HID: apple: Add support for the 2013 Macbook Air
This patch adds keyboard support for MacbookAir6,2 as WELLSPRING8
(0x0291, 0x0292, 0x0293). The touchpad is handled in a separate
bcm5974 patch, as usual.

Cc: stable@vger.kernel.org
Reported-and-tested-by: Brad Ford <plymouthffl@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02 20:39:29 -07:00
Jiri Kosina 4f5a810429 Merge branches 'for-3.10/appleir', 'for-3.10/hid-debug', 'for-3.10/hid-driver-transport-cleanups', 'for-3.10/i2c-hid' and 'for-3.10/logitech' into for-linus 2013-04-30 10:12:44 +02:00
Benjamin Tissoires 9a4a5574ce HID: appleir: add support for Apple ir devices
This driver was originally written by James McKenzie, updated by
Greg Kroah-Hartman, further updated by Bastien Nocera, with suspend
support added.
I ported it to the HID subsystem, in order to simplify it a litle
and allow lirc to use it through hiddev.

More recent versions of the IR receiver are also supported through
a patch by Alex Karpenko. The patch also adds support for the 2nd
and 5th generation of the controller, and the menu key on newer
brushed metal remotes.

Tested-by: Fabien André <fabien.andre@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-04-18 19:06:20 -07:00
Benjamin Tissoires f3757cea18 HID: Kconfig: Remove explicit transport layer dependencies
Most HID drivers (rightfully) only depend on the HID bus, not the
specific transport layer. Remove such dependencies where applicable.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-02-25 13:26:40 +01:00
H Hartley Sweeten f425458eaf HID: Use module_hid_driver macro
Use the new module_hid_driver macro in all HID drivers that have
a simple register/unregister init/exit.

This also converts the hid drivers that test for a failure of
hid_register_driver() and report the failure. Using module_hid_driver
in those drivers removes the failure message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-01-03 10:27:31 +01:00
Jiri Kosina 818b930bc1 Merge branches 'for-3.7/upstream-fixes', 'for-3.8/hidraw', 'for-3.8/i2c-hid', 'for-3.8/multitouch', 'for-3.8/roccat', 'for-3.8/sensors' and 'for-3.8/upstream' into for-linus
Conflicts:
	drivers/hid/hid-core.c
2012-12-12 21:41:55 +01:00
Johannes Thumshirn 537b6643dc HID: apple: Set APPLE_ISO_KEYBOARD at USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO
Set APPLE_ISO_KEYBOARD flag on USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO so we get
the ISO translation on German keyboards for the MacBook4,1 as well.

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-11-04 01:42:22 +01:00
Dirk Hohndel 8d80da90f5 HID: Add support for the MacBook Pro 10,2 keyboard / touchpad
This enables the existing drivers for keyboard and touchpad with the new
USB IDs found on the MBP 13" Reasonable Resolution (also known as the
Retina Display).

Added entries to both keyboard and mouse ignore lists.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-10-31 10:42:33 +01:00
Jiri Kosina 2f43f8749e HID: remove Paul Walmsley's copyright from places where it shouldn't be
Paul Walmsley has implemented dynamic quirk handling back in 2007 through
commits:

2eb5dc30eb ("USB HID: encapsulate quirk handling into hid-quirks.c")
8222fbe67c ("USB HID: clarify static quirk handling as squirks")
8cef908235 ("USB HID: add support for dynamically-created quirks")
876b9276b9 ("USB HID: add 'quirks' module parameter")

and as such, his copyright rightly belongs to
drivers/hid/usbhid/hid-quirks.c file.

However when generic HID code has been converted to bus and individual
quirks separated out to individual drivers on the bus, the copyright has
been blindly transfered into all the tiny drivers, which actually don't
contain any of Pauls' copyrighted code.

Remove the copyright from those sub-drivers.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Paul Walmsley <paul@pwsan.com>
2012-09-05 10:46:36 +02:00
Linus Torvalds 39ea32ca7e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov:
 "The changes are limited to adding new VID/PID combinations to drivers
  to enable support for new versions of hardware, most notably hardware
  found in new MacBook Pro Retina boxes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: xpad - add Andamiro Pump It Up pad
  Input: xpad - add signature for Razer Onza Tournament Edition
  Input: xpad - handle all variations of Mad Catz Beat Pad
  Input: bcm5974 - Add support for 2012 MacBook Pro Retina
  HID: add support for 2012 MacBook Pro Retina
2012-07-13 10:33:18 -07:00
Ryan Bourgeois b2e6ad7dfe HID: add support for 2012 MacBook Pro Retina
Add support for the 15'' MacBook Pro Retina. The keyboard is
the same as recent models.

The patch needs to be synchronized with the bcm5974 patch for
the trackpad - as usual.

Patch originally written by clipcarl (forums.opensuse.org).

[rydberg@euromail.se: Amended mouse ignore lines]
Signed-off-by: Ryan Bourgeois <bluedragonx@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-10 09:44:59 -07:00
Jiri Kosina 99ce58ddc4 Merge branches 'upstream-fixes', 'wacom' and 'waltop' into for-linus
Conflicts:
	drivers/hid/hid-core.c
2012-05-22 11:35:11 +02:00
Alexey Kaminsky 0a97e1e9f9 HID: apple: Add Apple wireless keyboard 2011 ANSI PID
Signed-off-by: Alexey Kaminsky <me@akaminsky.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-04-23 18:02:18 +02:00
Benedikt Bergenthal 9f1f463ae5 HID: hid-apple: fix a tab width style issue
Fixed a style issue.

Signed-off-by: Benedikt Bergenthal <benedikt@kdrennert.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-04-18 12:30:05 +02:00
Linus Torvalds 21404b772a hid/apple: modern macbook airs use the standard apple function key translations
This removes the use of the special "macbookair_fn_keys" keyboard
translation table for the MacBookAir4,x models (ie the 2011 refresh).
They use the standard apple_fn_keys[] translation.  Apparently only the
old MacBook Air's need a different translation table.

This mirrors the change that commit da617c7cb9 ("HID: consolidate
MacbookAir 4,1 mappings") did for the WELLSPRING6A ones, but does it for
the WELLSPRING6 model used on the MacBookAir4,2.

Reported-and-tested-by: Dirk Hohndel <hohndel@infradead.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Joshua V Dillon <jvdillon@gmail.com>
Cc: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-06 18:34:03 -08:00
Andreas Krist ad734bc156 HID: hid-apple: add device ID of another wireless aluminium
I've recently bought a Apple wireless aluminum keyboard (model 2011) which is
not yet supported by the kernel - it seems they just changed the device id.
After applying the attached patch, the device is fully functional.

Signed-off-by: Andreas Krist <andreas.krist@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-28 18:54:56 +02:00
Gökçen Eraslan 213f9da805 HID: Add device IDs for Macbook Pro 8 keyboards
This patch adds keyboard support for Macbook Pro 8 models which has
WELLSPRING5A model name and 0x0252, 0x0253 and 0x0254 USB IDs. Trackpad
support for those models are added to bcm5974 in
c331eb580a ("Input: bcm5974 - Add
support for newer MacBookPro8,2).

Signed-off-by: Gökçen Eraslan <gokcen@pardus.org.tr>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-28 17:42:49 +02:00
Jiri Kosina b3aec7b686 Merge branch 'upstream' into for-linus
Conflicts:
	drivers/hid/hid-core.c
	drivers/hid/hid-ids.h
2011-10-25 09:59:04 +02:00
Jiri Kosina da617c7cb9 HID: consolidate MacbookAir 4,1 mappings
MacbookAir 4,1 doesn't require extra mapping table, as the mappings
are identical to apple_fn_keys[].

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-05 16:54:45 +02:00
Nobuhiro Iwamatsu d762cc290b HID: Add support MacbookAir 4,1 keyboard
Added USB device IDs and keyboard map for MacBookAir 4,1 keyboard.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-03 14:00:05 +02:00
Joshua V. Dillon 5d922baa63 HID: add support for MacBookAir4,2 keyboard.
Added USB device IDs for MacBookAir4,2 keyboard. Device constants were
copied from the MacBookAir3,2 constants. The 4,2 device specification is
reportedly unchanged from the 3,2 predecessor and seems to work well.

Signed-off-by: Joshua V Dillon <jvdillon@gmail.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-08-10 14:12:07 +02:00
Dan Bastone 4a4c879904 HID: add support for new revision of Apple aluminum keyboard
Add USB device ids for the new revision (MB110LL/B) of Apple's wired aluminum
keyboard.  I have only confirmed that the ANSI version is correct - it is
assumed that the ISO and JIS versions follow the standard numbering convention.

Signed-off-by: Dan Bastone <dan@pwienterprises.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-08-01 23:18:26 +02:00
Andy Botting 47340bd9fe Input: bcm5974 - add support for MacBookPro8
This patch add multitouch support for the MacBookPro8,1 and
MacBookPro8,2 models.

Cc: stable@kernel.org
Signed-off-by: Andy Botting <andy@andybotting.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:37:30 -08:00
Joe Perches 4291ee305e HID: Add and use hid_<level>: dev_<level> equivalents
Neaten current uses of dev_<level> by adding and using
hid specific hid_<level> macros.

Convert existing uses of dev_<level> uses to hid_<level>.
Convert hid-pidff printk uses to hid_<level>.

Remove err_hid and use hid_err instead.

Add missing newlines to logging messages where necessary.
Coalesce format strings.

Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Other miscellaneous changes:

Add const struct hid_device * argument to hid-core functions
extract() and implement() so hid_<level> can be used by them.
Fix bad indentation in hid-core hid_input_field function
that calls extract() function above.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-12-10 15:10:38 +01:00