Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0da5c9a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull HID updates from Jiri Kosina:
 - i2c-hid is not querying init reports any more, as it's not mandated
   by the spec, and annoys quite a few devices during enumeration, by
   Bibek Basu
 - a lot of fixes for Logitech devices, by Simon Wood
 - hid-apple now has an option to switch between Option and Command
   mode, by Nanno Langstraat
 - Some more workarounds for severely broken ELO devices, by Oliver
   Neukum
 - more devm conversions, by Benjamin Tissoires
 - wiimote correctness fixes, by David Herrmann
 - a lot of added support for various new device IDs and random small
   fixes here and there"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits)
  HID: enable Mayflash USB Gamecube Adapter
  HID: sony: Add force feedback support for Dualshock3 USB
  Input: usbtouchscreen: ignore eGalax/D-Wav/EETI HIDs
  HID: don't ignore eGalax/D-Wav/EETI HIDs
  HID: roccat: add missing special driver declarations
  HID:hid-lg4ff: Correct Auto-center strength for wheels other than MOMO and MOMO2
  HID:hid-lg4ff: Initialize device properties before we touch autocentering.
  HID:hid-lg4ff: ensure ConstantForce is disabled when set to 0
  HID:hid-lg4ff: Switch autocentering off when strength is set to zero.
  HID:hid-lg4ff: Scale autocentering force properly on Logitech wheel
  HID: roccat: fix Coverity CID 141438
  HID: multitouch: add manufacturer to Kconfig help text
  HID: logitech-dj: small cleanup in rdcat()
  HID: remove self-assignment from hid_input_report
  HID: hid-sensor-hub: fix report size
  HID: i2c-hid: Stop querying for init reports
  HID: roccat: add support for Ryos MK keyboards
  HID: roccat: generalize some common code
  HID: roccat: add new device return value
  HID: wiimote: add pro-controller analog stick calibration
  ...
parents 9073e1a8 7f9cc24a
Loading
Loading
Loading
Loading
+178 −0
Original line number Diff line number Diff line
What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/control
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one select which data from which
		profile will be	read next. The data has to be 3 bytes long.
		This file is writeonly.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/profile
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	The mouse can store 5 profiles which can be switched by the
		press of a button. profile holds index of actual profile.
		This value is persistent, so its value determines the profile
		that's active when the device is powered on next time.
		When written, the device activates the set profile immediately.
		The data has to be 3 bytes long.
		The device will reject invalid data.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_primary
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set the default of all keys for
		a specific profile. Profile index is included in written data.
		The data has to be 125 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_function
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set the function of the
		function keys for a specific profile. Profile index is included
		in written data. The data has to be 95 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_macro
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set the function of the macro
		keys for a specific profile. Profile index is included in
		written data. The data has to be 35 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_thumbster
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set the function of the
		thumbster keys for a specific profile. Profile index is included
		in written data. The data has to be 23 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_extra
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set the function of the
		capslock and function keys for a specific profile. Profile index
		is included in written data. The data has to be 8 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_easyzone
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set the function of the
		easyzone keys for a specific profile. Profile index is included
		in written data. The data has to be 294 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/key_mask
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one deactivate certain keys like
		windows and application keys, to prevent accidental presses.
		Profile index for which this settings occur is included in
		written data. The data has to be 6 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/light
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set the backlight intensity for
		a specific profile. Profile index is included in written data.
		This attribute is only valid for the glow and pro variant.
		The data has to be 16 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/macro
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one store macros with max 480
		keystrokes for a specific button for a specific profile.
		Button and profile indexes are included in written data.
		The data has to be 2002 bytes long.
		Before reading this file, control has to be written to select
		which profile and key to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/info
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When read, this file returns general data like firmware version.
		The data is 8 bytes long.
		This file is readonly.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/reset
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one reset the device.
		The data has to be 3 bytes long.
		This file is writeonly.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/talk
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one trigger easyshift functionality
		from the host.
		The data has to be 16 bytes long.
		This file is writeonly.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/light_control
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one switch between stored and custom
		light settings.
		This attribute is only valid for the pro variant.
		The data has to be 8 bytes long.
		This file is writeonly.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/stored_lights
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set per-key lighting for different
		layers.
		This attribute is only valid for the pro variant.
		The data has to be 1382 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/custom_lights
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set the actual per-key lighting.
		This attribute is only valid for the pro variant.
		The data has to be 20 bytes long.
		This file is writeonly.
Users:		http://roccat.sourceforge.net

What:		/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/light_macro
Date:		October 2013
Contact:	Stefan Achatz <erazor_de@users.sourceforge.net>
Description:	When written, this file lets one set a light macro that is looped
		whenever the device gets in dimness mode.
		This attribute is only valid for the pro variant.
		The data has to be 2002 bytes long.
		Before reading this file, control has to be written to select
		which profile to read.
Users:		http://roccat.sourceforge.net
+18 −0
Original line number Diff line number Diff line
@@ -57,3 +57,21 @@ Description: This attribute is only provided if the device was detected as a
		Calibration data is already applied by the kernel to all input
		values but may be used by user-space to perform other
		transformations.

What:		/sys/bus/hid/drivers/wiimote/<dev>/pro_calib
Date:		October 2013
KernelVersion:	3.13
Contact:	David Herrmann <dh.herrmann@gmail.com>
Description:	This attribute is only provided if the device was detected as a
		pro-controller. It provides a single line with 4 calibration
		values for all 4 analog sticks. Format is: "x1:y1 x2:y2". Data
		is prefixed with a +/-. Each value is a signed 16bit number.
		Data is encoded as decimal numbers and specifies the offsets of
		the analog sticks of the pro-controller.
		Calibration data is already applied by the kernel to all input
		values but may be used by user-space to perform other
		transformations.
		Calibration data is detected by the kernel during device setup.
		You can write "scan\n" into this file to re-trigger calibration.
		You can also write data directly in the form "x1:y1 x2:y2" to
		set the calibration values manually.
+17 −5
Original line number Diff line number Diff line
@@ -242,6 +242,7 @@ config HID_HOLTEK
	  - Tracer Sniper TRM-503 / NOVA Gaming Slider X200 /
	    Zalman ZM-GM1
	  - SHARKOON DarkGlider Gaming mouse
	  - LEETGION Hellion Gaming Mouse

config HOLTEK_FF
	bool "Holtek On Line Grip force feedback support"
@@ -323,7 +324,7 @@ config HID_LCPOWER

config HID_LENOVO_TPKBD
	tristate "Lenovo ThinkPad USB Keyboard with TrackPoint"
	depends on USB_HID
	depends on HID
	select NEW_LEDS
	select LEDS_CLASS
	---help---
@@ -362,19 +363,20 @@ config LOGITECH_FF
	  - Logitech WingMan Force 3D
	  - Logitech Formula Force EX
	  - Logitech WingMan Formula Force GP
	  - Logitech MOMO Force wheel

	  and if you want to enable force feedback for them.
	  Note: if you say N here, this device will still be supported, but without
	  force feedback.

config LOGIRUMBLEPAD2_FF
	bool "Logitech RumblePad/Rumblepad 2 force feedback support"
	bool "Logitech force feedback support (variant 2)"
	depends on HID_LOGITECH
	select INPUT_FF_MEMLESS
	help
	  Say Y here if you want to enable force feedback support for Logitech
	  RumblePad and Rumblepad 2 devices.
	  Say Y here if you want to enable force feedback support for:
	  - Logitech RumblePad
	  - Logitech Rumblepad 2
	  - Logitech Formula Vibration Feedback Wheel

config LOGIG940_FF
	bool "Logitech Flight System G940 force feedback support"
@@ -437,6 +439,7 @@ config HID_MULTITOUCH
	  - Chunghwa panels
	  - CVTouch panels
	  - Cypress TrueTouch panels
	  - Elan Microelectronics touch panels
	  - Elo TouchSystems IntelliTouch Plus panels
	  - GeneralTouch 'Sensing Win7-TwoFinger' panels
	  - GoodTouch panels
@@ -453,6 +456,7 @@ config HID_MULTITOUCH
	  - Pixcir dual touch panels
	  - Quanta panels
	  - eGalax dual-touch panels, including the Joojoo and Wetab tablets
	  - SiS multitouch panels
	  - Stantum multitouch panels
	  - Touch International Panels
	  - Unitec Panels
@@ -614,6 +618,14 @@ config HID_SONY
	  * Sony PS3 Blue-ray Disk Remote Control (Bluetooth)
	  * Logitech Harmony adapter for Sony Playstation 3 (Bluetooth)

config SONY_FF
	bool "Sony PS2/3 accessories force feedback support"
	depends on HID_SONY
	select INPUT_FF_MEMLESS
	---help---
	Say Y here if you have a Sony PS2/3 accessory and want to enable force
	feedback support for it.

config HID_SPEEDLINK
	tristate "Speedlink VAD Cezanne mouse support"
	depends on HID
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
obj-$(CONFIG_HID_ROCCAT)	+= hid-roccat.o hid-roccat-common.o \
	hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o \
	hid-roccat-koneplus.o hid-roccat-konepure.o hid-roccat-kovaplus.o \
	hid-roccat-lua.o hid-roccat-pyra.o hid-roccat-savu.o
	hid-roccat-lua.o hid-roccat-pyra.o hid-roccat-ryos.o hid-roccat-savu.o
obj-$(CONFIG_HID_SAITEK)	+= hid-saitek.o
obj-$(CONFIG_HID_SAMSUNG)	+= hid-samsung.o
obj-$(CONFIG_HID_SMARTJOYPLUS)	+= hid-sjoy.o
+22 −0
Original line number Diff line number Diff line
@@ -46,6 +46,12 @@ module_param(iso_layout, uint, 0644);
MODULE_PARM_DESC(iso_layout, "Enable/Disable hardcoded ISO-layout of the keyboard. "
		"(0 = disabled, [1] = enabled)");

static unsigned int swap_opt_cmd;
module_param(swap_opt_cmd, uint, 0644);
MODULE_PARM_DESC(swap_opt_cmd, "Swap the Option (\"Alt\") and Command (\"Flag\") keys. "
		"(For people who want to keep Windows PC keyboard muscle memory. "
		"[0] = as-is, Mac layout. 1 = swapped, Windows layout.)");

struct apple_sc {
	unsigned long quirks;
	unsigned int fn_on;
@@ -150,6 +156,14 @@ static const struct apple_key_translation apple_iso_keyboard[] = {
	{ }
};

static const struct apple_key_translation swapped_option_cmd_keys[] = {
	{ KEY_LEFTALT,	KEY_LEFTMETA },
	{ KEY_LEFTMETA,	KEY_LEFTALT },
	{ KEY_RIGHTALT,	KEY_RIGHTMETA },
	{ KEY_RIGHTMETA,KEY_RIGHTALT },
	{ }
};

static const struct apple_key_translation *apple_find_translation(
		const struct apple_key_translation *table, u16 from)
{
@@ -242,6 +256,14 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
		}
	}

	if (swap_opt_cmd) {
		trans = apple_find_translation(swapped_option_cmd_keys, usage->code);
		if (trans) {
			input_event(input, usage->type, trans->to, value);
			return 1;
		}
	}

	return 0;
}

Loading