linux-stable/drivers/hid
Mizuho Mori e7c87023b8 HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS
[ Upstream commit 67fd71ba16 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-17 10:08:34 +02:00
..
i2c-hid HID: i2c-hid: fix format string mismatch 2021-06-10 12:43:50 +02:00
intel-ish-hid HID: intel-ish-hid: fixes incorrect error handling 2019-12-05 15:37:26 +01:00
usbhid HID: usbhid: free raw_report buffers in usbhid_stop 2021-10-06 15:05:11 +02:00
hid-a4tech.c HID: input: fix a4tech horizontal wheel custom usage 2019-08-29 08:26:40 +02:00
hid-accutouch.c HID: Accutouch: Add driver for ELO Accutouch 2216 USB Touchscreens 2017-03-21 15:03:55 +01:00
hid-alps.c HID: alps: fix error return code in alps_input_configured() 2021-04-28 12:08:43 +02:00
hid-apple.c HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS 2021-10-17 10:08:34 +02:00
hid-appleir.c
hid-asus.c HID: asus: Add T100CHI bluetooth keyboard dock touchpad support 2017-08-08 10:05:23 +02:00
hid-aureal.c
hid-axff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-belkin.c
hid-betopff.c HID: betop: fix slab-out-of-bounds Write in betop_probe 2021-10-06 15:05:10 +02:00
hid-cherry.c
hid-chicony.c HID: move Asus keyboard support from hid-chicony to hid-asus 2017-06-08 13:47:52 +02:00
hid-cmedia.c
hid-core.c HID: do not use down_interruptible() when unbinding devices 2021-07-20 16:17:32 +02:00
hid-corsair.c HID: corsair: Add driver Scimitar Pro RGB gaming mouse 1b1c:1b3e support to hid-corsair 2017-03-21 14:46:15 +01:00
hid-cp2112.c HID: cp2112: prevent sleeping function called from invalid context 2019-09-10 10:32:17 +01:00
hid-cypress.c HID: cypress: Support Varmilo Keyboards' media hotkeys 2020-12-02 08:34:41 +01:00
hid-debug.c HID: debug: fix race condition with between rdesc_show() and device removal 2019-05-08 07:20:47 +02:00
hid-dr.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-elecom.c HID: hid-elecom: extend to fix descriptor for HUGE trackball 2017-10-11 15:46:22 +02:00
hid-elo.c HID: elo: clear BTN_LEFT mapping 2018-03-19 08:42:47 +01:00
hid-emsff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-ezkey.c
hid-gaff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-gembird.c
hid-generic.c
hid-gfrm.c
hid-gt683r.c HID: gt683r: add missing MODULE_DEVICE_TABLE 2021-06-30 08:48:46 -04:00
hid-gyration.c
hid-holtek-kbd.c HID: holtek: test for sanity of intfdata 2019-08-25 10:50:06 +02:00
hid-holtek-mouse.c
hid-holtekff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-hyperv.c HID: hyperv: Use in-place iterator API in the channel callback 2019-11-06 12:43:06 +01:00
hid-icade.c
hid-ids.h HID: plantronics: Workaround for double volume key presses 2021-05-22 10:57:31 +02:00
hid-input.c HID: input: do not report stylus battery state as "full" 2021-09-22 11:45:26 +02:00
hid-ite.c HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock 2020-03-11 18:02:49 +01:00
hid-kensington.c
hid-keytouch.c
hid-kye.c scripts/spelling.txt: add "comsume(r)" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
hid-lcpower.c
hid-led.c HID: hid-led: fix issue with transfer buffer not being dma capable 2016-10-10 10:47:03 +02:00
hid-lenovo.c HID: lenovo: Add checks to fix of_led_classdev_register 2019-02-12 19:46:09 +01:00
hid-lg.c HID: logitech: Fix general protection fault caused by Logitech driver 2019-10-05 12:47:33 +02:00
hid-lg.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hid-lg2ff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-lg3ff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-lg4ff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-lg4ff.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hid-lgff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-logitech-dj.c HID: logitech-dj: allow devices to request full pairing information 2017-04-06 14:36:36 +02:00
hid-logitech-hidpp.c HID: logitech-hidpp: Silence intermittent get_battery_capacity errors 2020-01-04 13:59:45 +01:00
hid-magicmouse.c HID: magicmouse: do not set up autorepeat 2020-07-22 09:22:25 +02:00
hid-mf.c HID: hid-mf: add force feedback support for Mayflash DolphinBar and GameCube 2017-01-11 22:12:44 +01:00
hid-microsoft.c HID: multitouch: enable Surface 3 Type Cover Pro to report multitouch data 2017-01-20 15:17:19 +01:00
hid-monterey.c
hid-multitouch.c HID: core: Sanitize event code and type when mapping input 2020-09-09 19:03:06 +02:00
hid-nti.c HID: Add quirk driver for NTI USB-SUN adapter 2017-03-06 13:16:33 +01:00
hid-ntrig.c HID: hid-ntrig: add error handling for sysfs_create_group 2018-10-03 17:00:52 -07:00
hid-ortek.c HID: ortek: add one more buggy device 2017-07-24 17:38:21 +02:00
hid-penmount.c
hid-petalynx.c
hid-picolcd.h
hid-picolcd_backlight.c
hid-picolcd_cir.c media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_* 2017-08-20 10:02:48 -04:00
hid-picolcd_core.c
hid-picolcd_debugfs.c HID: picoLCD: Spelling s/REPORT_WRTIE_MEMORY/REPORT_WRITE_MEMORY/ 2017-03-24 15:45:04 +01:00
hid-picolcd_fb.c
hid-picolcd_lcd.c
hid-picolcd_leds.c
hid-pl.c
hid-plantronics.c HID: plantronics: Workaround for double volume key presses 2021-05-22 10:57:31 +02:00
hid-primax.c
hid-prodikeys.c HID: prodikeys: Fix general protection fault during probe 2019-10-05 12:47:32 +02:00
hid-retrode.c HID: Add driver for Retrode2 joypad adapter 2017-06-22 14:44:11 +02:00
hid-rmi.c HID: Fix hid_report_len usage 2018-04-24 09:36:28 +02:00
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c HID: roccat: add bounds checking in kone_sysfs_write_settings() 2020-10-29 09:07:05 +01:00
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-konepure.c
hid-roccat-kovaplus.c HID: roccat: prevent an out of bounds read in kovaplus_profile_activated() 2018-04-26 11:02:10 +02:00
hid-roccat-kovaplus.h
hid-roccat-lua.c
hid-roccat-lua.h
hid-roccat-pyra.c
hid-roccat-pyra.h
hid-roccat-ryos.c
hid-roccat-savu.c
hid-roccat-savu.h
hid-roccat.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
hid-saitek.c HID: hid-saitek: Add device ID for RAT 7 Contagion 2018-10-10 08:54:23 +02:00
hid-samsung.c
hid-sensor-custom.c iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-17 09:28:49 +01:00
hid-sensor-hub.c HID: hid-sensor-hub: Return error for hid_set_field() failure 2021-06-30 08:48:45 -04:00
hid-sjoy.c
hid-sony.c HID: sony: Fix for broken buttons on DS3 USB dongles 2020-06-11 09:22:57 +02:00
hid-speedlink.c
hid-steelseries.c
hid-sunplus.c
hid-tivo.c
hid-tmff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-topseed.c
hid-twinhan.c
hid-uclogic.c HID: uclogic: add support for Ugee Tablet EX07S 2017-04-06 14:50:11 +02:00
hid-udraw-ps3.c HID: udraw-ps3: accel_limits is local to the driver 2016-11-15 14:23:17 +01:00
hid-waltop.c HID: Remove broken links to tablet descriptions 2016-09-19 14:32:21 +02:00
hid-wiimote-core.c
hid-wiimote-debug.c
hid-wiimote-modules.c
hid-wiimote.h
hid-xinmo.c HID: xinmo: fix for out of range for THT 2P arcade controller. 2017-03-24 15:43:03 +01:00
hid-zpff.c HID: Fix assumption that devices have inputs 2019-11-06 12:43:33 +01:00
hid-zydacron.c
hidraw.c HID: hidraw, uhid: Always report EPOLLOUT 2020-01-17 19:45:40 +01:00
Kconfig HID: lenovo: Add support for IBM/Lenovo Scrollpoint mice 2018-06-21 04:02:48 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uhid.c HID: hidraw, uhid: Always report EPOLLOUT 2020-01-17 19:45:40 +01:00
wacom.h HID: wacom: generic: Treat serial number and related fields as unsigned 2019-11-12 19:18:04 +01:00
wacom_sys.c HID: wacom: Read HID_DG_CONTACTMAX directly for non-generic devices 2020-05-20 08:16:57 +02:00
wacom_wac.c HID: wacom: Assign boolean values to a bool variable 2021-04-28 12:08:43 +02:00
wacom_wac.h HID: wacom: Correct base usage for capacitive ExpressKey status bits 2021-07-20 16:17:34 +02:00