Commit 79d11de9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-2022100501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID updates from Benjamin Tissoires:

 - handle of all Logitech Bluetooth HID++ devices in the Logitech HID++
   drivers (Bastien Nocera)

 - fix broken atomic checks in hid-multitouch by adding memory barriers
   (Andri Yngvason)

 - better handling of devices with AMD SFH1.1 (Basavaraj Natikar)

 - better support of Nintendo clone controllers (Icenowy Zheng and
   Johnothan King)

 - Support for various RC controllers (Marcus Folkesson)

 - Add UGEEv2 support in hid-uclogic (XP-PEN Deco Pro S and Parblo A610
   PRO) (José Expósito)

 - some conversions to use dev_groups (Greg Kroah-Hartman)

 - HID-BPF preparatory patches, mostly to convert blank defines as enums
   (Benjamin Tissoires)

* tag 'for-linus-2022100501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (38 commits)
  HID: wacom: add three styli to wacom_intuos_get_tool_type
  HID: amd_sfh: Handle condition of "no sensors" for SFH1.1
  HID: amd_sfh: Change dev_err to dev_dbg for additional debug info
  HID: nintendo: check analog user calibration for plausibility
  HID: nintendo: deregister home LED when it fails
  HID: roccat: Fix use-after-free in roccat_read()
  hid: topre: Add driver fixing report descriptor
  HID: multitouch: Add memory barriers
  HID: convert defines of HID class requests into a proper enum
  HID: export hid_report_type to uapi
  HID: core: store the unique system identifier in hid_device
  HID: Add driver for PhoenixRC Flight Controller
  HID: Add driver for VRC-2 Car Controller
  HID: sony: Fix double word in comments
  hid: hid-logitech-hidpp: avoid unnecessary assignments in hidpp_connect_event
  HID: logitech-hidpp: Detect hi-res scrolling support
  HID: logitech-hidpp: Remove hard-coded "Sw. Id." for HID++ 2.0 commands
  HID: logitech-hidpp: Fix "Sw. Id." for HID++ 2.0 commands
  HID: logitech-hidpp: Remove special-casing of Bluetooth devices
  HID: logitech-hidpp: Enable HID++ for all the Logitech Bluetooth devices
  ...
parents 5d435a3f cb7c02e9
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -9082,6 +9082,12 @@ L: linux-input@vger.kernel.org
S:	Supported
F:	drivers/hid/hid-playstation.c
HID PHOENIX RC FLIGHT CONTROLLER
M:	Marcus Folkesson <marcus.folkesson@gmail.com>
L:	linux-input@vger.kernel.org
S:	Maintained
F:	drivers/hid/hid-pxrc.c
HID SENSOR HUB DRIVERS
M:	Jiri Kosina <jikos@kernel.org>
M:	Jonathan Cameron <jic23@kernel.org>
@@ -9094,6 +9100,12 @@ F: drivers/hid/hid-sensor-*
F:	drivers/iio/*/hid-*
F:	include/linux/hid-sensor-*
HID VRC-2 CAR CONTROLLER DRIVER
M:	Marcus Folkesson <marcus.folkesson@gmail.com>
L:	linux-input@vger.kernel.org
S:	Maintained
F:	drivers/hid/hid-vrc2.c
HID WACOM DRIVER
M:	Ping Cheng <ping.cheng@wacom.com>
M:	Jason Gerecke  <jason.gerecke@wacom.com>
+27 −73
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ if HID

config HID_BATTERY_STRENGTH
	bool "Battery level reporting for HID devices"
	depends on HID
	select POWER_SUPPLY
	default n
	help
@@ -38,7 +37,6 @@ config HID_BATTERY_STRENGTH

config HIDRAW
	bool "/dev/hidraw raw HID device support"
	depends on HID
	help
	Say Y here if you want to support HID devices (from the USB
	specification standpoint) that aren't strictly user interface
@@ -57,7 +55,6 @@ config HIDRAW

config UHID
	tristate "User-space I/O driver support for HID subsystem"
	depends on HID
	default n
	help
	Say Y here if you want to provide HID I/O Drivers from user-space.
@@ -78,7 +75,6 @@ config UHID

config HID_GENERIC
	tristate "Generic HID driver"
	depends on HID
	default HID
	help
	Support for generic devices on the HID bus. This includes most
@@ -90,11 +86,9 @@ config HID_GENERIC
	If unsure, say Y.

menu "Special HID drivers"
	depends on HID

config HID_A4TECH
	tristate "A4TECH mice"
	depends on HID
	default !EXPERT
	help
	Support for some A4TECH mice with two scroll wheels.
@@ -113,7 +107,6 @@ config HID_ACCUTOUCH

config HID_ACRUX
	tristate "ACRUX game controller support"
	depends on HID
	help
	Say Y here if you want to enable support for ACRUX game controllers.

@@ -127,7 +120,6 @@ config HID_ACRUX_FF

config HID_APPLE
	tristate "Apple {i,Power,Mac}Books"
	depends on HID
	depends on LEDS_CLASS
	depends on NEW_LEDS
	default !EXPERT
@@ -167,13 +159,11 @@ config HID_ASUS

config HID_AUREAL
	tristate "Aureal"
	depends on HID
	help
	Support for Aureal Cy se W-01RN Remote Controller and other Aureal derived remotes.

config HID_BELKIN
	tristate "Belkin Flip KVM and Wireless keyboard"
	depends on HID
	default !EXPERT
	help
	Support for Belkin Flip KVM and Wireless keyboard.
@@ -202,7 +192,6 @@ config HID_BIGBEN_FF

config HID_CHERRY
	tristate "Cherry Cymotion keyboard"
	depends on HID
	default !EXPERT
	help
	Support for Cherry Cymotion keyboard.
@@ -227,7 +216,6 @@ config HID_CORSAIR

config HID_COUGAR
	tristate "Cougar devices"
	depends on HID
	help
	Support for Cougar devices that are not fully compliant with the
	HID standard.
@@ -237,7 +225,6 @@ config HID_COUGAR

config HID_MACALLY
	tristate "Macally devices"
	depends on HID
	help
	Support for Macally devices that are not fully compliant with the
	HID standard.
@@ -262,7 +249,6 @@ config HID_PRODIKEYS

config HID_CMEDIA
	tristate "CMedia audio chips"
	depends on HID
	help
	Support for CMedia CM6533 HID audio jack controls
        and HS100B mute buttons.
@@ -288,14 +274,12 @@ config HID_CREATIVE_SB0540

config HID_CYPRESS
	tristate "Cypress mouse and barcode readers"
	depends on HID
	default !EXPERT
	help
	Support for cypress mouse and barcode readers.

config HID_DRAGONRISE
	tristate "DragonRise Inc. game controller"
	depends on HID
	help
	Say Y here if you have DragonRise Inc. game controllers.
	These might be branded as:
@@ -314,7 +298,6 @@ config DRAGONRISE_FF

config HID_EMS_FF
	tristate "EMS Production Inc. force feedback support"
	depends on HID
	select INPUT_FF_MEMLESS
	help
	Say Y here if you want to enable force feedback support for devices by
@@ -332,7 +315,6 @@ config HID_ELAN

config HID_ELECOM
	tristate "ELECOM HID devices"
	depends on HID
	help
	Support for ELECOM devices:
	  - BM084 Bluetooth Mouse
@@ -349,7 +331,6 @@ config HID_ELO

config HID_EZKEY
	tristate "Ezkey BTC 8193 keyboard"
	depends on HID
	default !EXPERT
	help
	Support for Ezkey BTC 8193 keyboard.
@@ -367,19 +348,16 @@ config HID_FT260

config HID_GEMBIRD
	tristate "Gembird Joypad"
	depends on HID
	help
	Support for Gembird JPD-DualForce 2.

config HID_GFRM
	tristate "Google Fiber TV Box remote control support"
	depends on HID
	help
	Support for Google Fiber TV Box remote controls

config HID_GLORIOUS
	tristate "Glorious PC Gaming Race mice"
	depends on HID
	help
	  Support for Glorious PC Gaming Race mice such as
	  the Glorious Model O, O- and D.
@@ -424,7 +402,6 @@ config HID_VIVALDI
	tristate "Vivaldi Keyboard"
	select HID_VIVALDI_COMMON
	select INPUT_VIVALDIFMAP
	depends on HID
	help
	  Say Y here if you want to enable support for Vivaldi keyboards.

@@ -447,7 +424,6 @@ config HID_GT683R

config HID_KEYTOUCH
	tristate "Keytouch HID devices"
	depends on HID
	help
	Support for Keytouch HID devices not fully compliant with
	the specification. Currently supported:
@@ -455,7 +431,6 @@ config HID_KEYTOUCH

config HID_KYE
	tristate "KYE/Genius devices"
	depends on HID
	help
	Support for KYE/Genius devices not fully compliant with HID standard:
	- Ergo Mouse
@@ -471,32 +446,37 @@ config HID_UCLOGIC

config HID_WALTOP
	tristate "Waltop"
	depends on HID
	help
	Support for Waltop tablets.

config HID_VIEWSONIC
	tristate "ViewSonic/Signotec"
	depends on HID
	help
	  Support for ViewSonic/Signotec PD1011 signature pad.

config HID_VRC2
	tristate "VRC-2 Car Controller"
	depends on HID
	help
        Support for VRC-2 which is a 2-axis controller often used in
        car simulators.

        To compile this driver as a module, choose M here: the
        module will be called hid-vrc2.

config HID_XIAOMI
	tristate "Xiaomi"
	depends on HID
	help
	  Adds support for side buttons of Xiaomi Mi Dual Mode Wireless
	  Mouse Silent Edition.

config HID_GYRATION
	tristate "Gyration remote control"
	depends on HID
	help
	Support for Gyration remote control.

config HID_ICADE
	tristate "ION iCade arcade controller"
	depends on HID
	help
	Support for the ION iCade arcade controller to work as a joystick.

@@ -505,14 +485,12 @@ config HID_ICADE

config HID_ITE
	tristate "ITE devices"
	depends on HID
	default !EXPERT
	help
	Support for ITE devices not fully compliant with HID standard.

config HID_JABRA
	tristate "Jabra USB HID Driver"
	depends on HID
	help
	Support for Jabra USB HID devices.

@@ -523,26 +501,22 @@ config HID_JABRA

config HID_TWINHAN
	tristate "Twinhan IR remote control"
	depends on HID
	help
	Support for Twinhan IR remote control.

config HID_KENSINGTON
	tristate "Kensington Slimblade Trackball"
	depends on HID
	default !EXPERT
	help
	Support for Kensington Slimblade Trackball.

config HID_LCPOWER
	tristate "LC-Power"
	depends on HID
	help
	Support for LC-Power RC1000MCE RF remote control.

config HID_LED
	tristate "Simple RGB LED support"
	depends on HID
	depends on LEDS_CLASS
	help
	Support for simple RGB LED devices. Currently supported are:
@@ -557,7 +531,6 @@ config HID_LED

config HID_LENOVO
	tristate "Lenovo / Thinkpad devices"
	depends on HID
	select NEW_LEDS
	select LEDS_CLASS
	help
@@ -675,7 +648,6 @@ config LOGIWHEELS_FF

config HID_MAGICMOUSE
	tristate "Apple Magic Mouse/Trackpad multi-touch support"
	depends on HID
	help
	Support for the Apple Magic Mouse/Trackpad multi-touch.

@@ -684,14 +656,12 @@ config HID_MAGICMOUSE

config HID_MALTRON
	tristate "Maltron L90 keyboard"
	depends on HID
	help
	Adds support for the volume up, volume down, mute, and play/pause buttons
	of the Maltron L90 keyboard.

config HID_MAYFLASH
	tristate "Mayflash game controller adapter force feedback"
	depends on HID
	select INPUT_FF_MEMLESS
	help
	Say Y here if you have HJZ Mayflash PS3 game controller adapters
@@ -707,14 +677,12 @@ config HID_MEGAWORLD_FF

config HID_REDRAGON
	tristate "Redragon keyboards"
	depends on HID
	default !EXPERT
	help
    Support for Redragon keyboards that need fix-ups to work properly.

config HID_MICROSOFT
	tristate "Microsoft non-fully HID-compliant devices"
	depends on HID
	default !EXPERT
	select INPUT_FF_MEMLESS
	help
@@ -722,14 +690,12 @@ config HID_MICROSOFT

config HID_MONTEREY
	tristate "Monterey Genius KB29E keyboard"
	depends on HID
	default !EXPERT
	help
	Support for Monterey Genius KB29E.

config HID_MULTITOUCH
	tristate "HID Multitouch panels"
	depends on HID
	help
	  Generic support for HID multitouch panels.

@@ -775,7 +741,6 @@ config HID_MULTITOUCH

config HID_NINTENDO
	tristate "Nintendo Joy-Con and Pro Controller support"
	depends on HID
	depends on NEW_LEDS
	depends on LEDS_CLASS
	select POWER_SUPPLY
@@ -811,7 +776,6 @@ config HID_NTRIG

config HID_ORTEK
	tristate "Ortek PKB-1700/WKB-2000/Skycable wireless keyboard and mouse trackpad"
	depends on HID
	help
	There are certain devices which have LogicalMaximum wrong in the keyboard
	usage page of their report descriptor. The most prevailing ones so far
@@ -824,7 +788,6 @@ config HID_ORTEK

config HID_PANTHERLORD
	tristate "Pantherlord/GreenAsia game controller"
	depends on HID
	help
	  Say Y here if you have a PantherLord/GreenAsia based game controller
	  or adapter.
@@ -850,13 +813,11 @@ config HID_PENMOUNT

config HID_PETALYNX
	tristate "Petalynx Maxter remote control"
	depends on HID
	help
	Support for Petalynx Maxter remote control.

config HID_PICOLCD
	tristate "PicoLCD (graphic version)"
	depends on HID
	help
	  This provides support for Minibox PicoLCD devices, currently
	  only the graphical ones are supported.
@@ -922,7 +883,6 @@ config HID_PICOLCD_CIR

config HID_PLANTRONICS
	tristate "Plantronics USB HID Driver"
	depends on HID
	help
	  Provides HID support for Plantronics USB audio devices.
	  Correctly maps vendor unique volume up/down HID usages to
@@ -933,7 +893,6 @@ config HID_PLANTRONICS

config HID_PLAYSTATION
	tristate "PlayStation HID Driver"
	depends on HID
	depends on LEDS_CLASS_MULTICOLOR
	select CRC32
	select POWER_SUPPLY
@@ -950,16 +909,23 @@ config PLAYSTATION_FF
	  Say Y here if you would like to enable force feedback support for
	  PlayStation game controllers.

config HID_PXRC
       tristate "PhoenixRC HID Flight Controller"
       depends on HID
       help
       Support for PhoenixRC HID Flight Controller, a 8-axis flight controller.

       To compile this driver as a module, choose M here: the
       module will be called hid-pxrc.

config HID_RAZER
	tristate "Razer non-fully HID-compliant devices"
	depends on HID
	help
	Support for Razer devices that are not fully compliant with the
	HID standard.

config HID_PRIMAX
	tristate "Primax non-fully HID-compliant devices"
	depends on HID
	help
	Support for Primax devices that are not fully compliant with the
	HID standard.
@@ -981,7 +947,6 @@ config HID_ROCCAT

config HID_SAITEK
	tristate "Saitek (Mad Catz) non-fully HID-compliant devices"
	depends on HID
	help
	Support for Saitek devices that are not fully compliant with the
	HID standard.
@@ -999,7 +964,6 @@ config HID_SAMSUNG

config HID_SEMITEK
	tristate "Semitek USB keyboards"
	depends on HID
	help
	Support for Semitek USB keyboards that are not fully compliant
	with the HID standard.
@@ -1050,13 +1014,11 @@ config SONY_FF

config HID_SPEEDLINK
	tristate "Speedlink VAD Cezanne mouse support"
	depends on HID
	help
	Support for Speedlink Vicious and Divine Cezanne mouse.

config HID_STEAM
	tristate "Steam Controller support"
	depends on HID
	select POWER_SUPPLY
	help
	Say Y here if you have a Steam Controller if you want to use it
@@ -1065,19 +1027,16 @@ config HID_STEAM

config HID_STEELSERIES
	tristate "Steelseries SRW-S1 steering wheel support"
	depends on HID
	help
	Support for Steelseries SRW-S1 steering wheel

config HID_SUNPLUS
	tristate "Sunplus wireless desktop"
	depends on HID
	help
	Support for Sunplus wireless desktop.

config HID_RMI
	tristate "Synaptics RMI4 device support"
	depends on HID
	select RMI4_CORE
	select RMI4_F03
	select RMI4_F11
@@ -1090,7 +1049,6 @@ config HID_RMI

config HID_GREENASIA
	tristate "GreenAsia (Product ID 0x12) game controller support"
	depends on HID
	help
	  Say Y here if you have a GreenAsia (Product ID 0x12) based game
	  controller or adapter.
@@ -1112,7 +1070,6 @@ config HID_HYPERV_MOUSE

config HID_SMARTJOYPLUS
	tristate "SmartJoy PLUS PS2/USB adapter support"
	depends on HID
	help
	Support for SmartJoy PLUS PS2/USB adapter, Super Dual Box,
	Super Joy Box 3 Pro, Super Dual Box Pro, and Super Joy Box 5 Pro.
@@ -1130,20 +1087,23 @@ config SMARTJOYPLUS_FF

config HID_TIVO
	tristate "TiVo Slide Bluetooth remote control support"
	depends on HID
	help
	Say Y if you have a TiVo Slide Bluetooth remote control.

config HID_TOPSEED
	tristate "TopSeed Cyberlink, BTC Emprex, Conceptronic remote control support"
	depends on HID
	help
	Say Y if you have a TopSeed Cyberlink or BTC Emprex or Conceptronic
	CLLRCMCE remote control.

config HID_TOPRE
	tristate "Topre REALFORCE keyboards"
	depends on HID
	help
	  Say Y for N-key rollover support on Topre REALFORCE R2 108 key keyboards.

config HID_THINGM
	tristate "ThingM blink(1) USB RGB LED"
	depends on HID
	depends on LEDS_CLASS
	select HID_LED
	help
@@ -1170,7 +1130,6 @@ config THRUSTMASTER_FF

config HID_UDRAW_PS3
	tristate "THQ PS3 uDraw tablet"
	depends on HID
	help
	  Say Y here if you want to use the THQ uDraw gaming tablet for
	  the PS3.
@@ -1207,7 +1166,6 @@ config HID_WACOM

config HID_WIIMOTE
	tristate "Nintendo Wii / Wii U peripherals"
	depends on HID
	depends on LEDS_CLASS
	select POWER_SUPPLY
	select INPUT_FF_MEMLESS
@@ -1232,7 +1190,6 @@ config HID_WIIMOTE

config HID_XINMO
	tristate "Xin-Mo non-fully compliant devices"
	depends on HID
	help
	Support for Xin-Mo devices that are not fully compliant with the HID
	standard. Currently only supports the Xin-Mo Dual Arcade. Say Y here
@@ -1240,7 +1197,6 @@ config HID_XINMO

config HID_ZEROPLUS
	tristate "Zeroplus based game controller support"
	depends on HID
	help
	  Say Y here if you have a Zeroplus based game controller.

@@ -1254,13 +1210,12 @@ config ZEROPLUS_FF

config HID_ZYDACRON
	tristate "Zydacron remote control support"
	depends on HID
	help
	Support for Zydacron remote control.

config HID_SENSOR_HUB
	tristate "HID Sensors framework support"
	depends on HID && HAS_IOMEM
	depends on HAS_IOMEM
	select MFD_CORE
	default n
	help
@@ -1289,7 +1244,6 @@ config HID_SENSOR_CUSTOM_SENSOR

config HID_ALPS
	tristate "Alps HID device support"
	depends on HID
	help
	Support for Alps I2C HID touchpads and StickPointer.
	Say Y here if you have a Alps touchpads over i2c-hid or usbhid
@@ -1307,7 +1261,7 @@ config HID_MCP2221
	will be called hid-mcp2221.ko.

config HID_KUNIT_TEST
	bool "KUnit tests for HID" if !KUNIT_ALL_TESTS
	tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS
	depends on KUNIT=y
	depends on HID_UCLOGIC
	default KUNIT_ALL_TESTS
+6 −1
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ hid-picolcd-$(CONFIG_DEBUG_FS) += hid-picolcd_debugfs.o
obj-$(CONFIG_HID_PLANTRONICS)	+= hid-plantronics.o
obj-$(CONFIG_HID_PLAYSTATION)	+= hid-playstation.o
obj-$(CONFIG_HID_PRIMAX)	+= hid-primax.o
obj-$(CONFIG_HID_PXRC)		+= hid-pxrc.o
obj-$(CONFIG_HID_RAZER)	+= hid-razer.o
obj-$(CONFIG_HID_REDRAGON)	+= hid-redragon.o
obj-$(CONFIG_HID_RETRODE)	+= hid-retrode.o
@@ -123,6 +124,7 @@ obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o
obj-$(CONFIG_HID_THRUSTMASTER)	+= hid-tmff.o hid-thrustmaster.o
obj-$(CONFIG_HID_TIVO)		+= hid-tivo.o
obj-$(CONFIG_HID_TOPSEED)	+= hid-topseed.o
obj-$(CONFIG_HID_TOPRE)	+= hid-topre.o
obj-$(CONFIG_HID_TWINHAN)	+= hid-twinhan.o
obj-$(CONFIG_HID_U2FZERO)	+= hid-u2fzero.o
hid-uclogic-objs		:= hid-uclogic-core.o \
@@ -136,6 +138,7 @@ obj-$(CONFIG_HID_XINMO) += hid-xinmo.o
obj-$(CONFIG_HID_ZEROPLUS)	+= hid-zpff.o
obj-$(CONFIG_HID_ZYDACRON)	+= hid-zydacron.o
obj-$(CONFIG_HID_VIEWSONIC)	+= hid-viewsonic.o
obj-$(CONFIG_HID_VRC2)		+= hid-vrc2.o

wacom-objs			:= wacom_wac.o wacom_sys.o
obj-$(CONFIG_HID_WACOM)		+= wacom.o
@@ -144,8 +147,10 @@ obj-$(CONFIG_HID_WIIMOTE) += hid-wiimote.o
obj-$(CONFIG_HID_SENSOR_HUB)	+= hid-sensor-hub.o
obj-$(CONFIG_HID_SENSOR_CUSTOM_SENSOR)	+= hid-sensor-custom.o

obj-$(CONFIG_HID_KUNIT_TEST)	+= hid-uclogic-rdesc.o \
hid-uclogic-test-objs		:= hid-uclogic-rdesc.o \
				   hid-uclogic-params.o \
				   hid-uclogic-rdesc-test.o
obj-$(CONFIG_HID_KUNIT_TEST)	+= hid-uclogic-test.o

obj-$(CONFIG_USB_HID)		+= usbhid/
obj-$(CONFIG_USB_MOUSE)		+= usbhid/
+5 −3
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ static int amd_sfh1_1_hid_client_init(struct amd_mp2_dev *privdata)
	amd_sfh1_1_set_desc_ops(mp2_ops);

	cl_data->num_hid_devices = amd_sfh_get_sensor_num(privdata, &cl_data->sensor_idx[0]);
	if (cl_data->num_hid_devices == 0)
		return -ENODEV;

	INIT_DELAYED_WORK(&cl_data->work, amd_sfh_work);
	INIT_DELAYED_WORK(&cl_data->work_buffer, amd_sfh_work_buffer);
@@ -286,13 +288,13 @@ int amd_sfh1_1_init(struct amd_mp2_dev *mp2)

	phy_base <<= 21;
	if (!devm_request_mem_region(dev, phy_base, 128 * 1024, "amd_sfh")) {
		dev_err(dev, "can't reserve mmio registers\n");
		dev_dbg(dev, "can't reserve mmio registers\n");
		return -ENOMEM;
	}

	mp2->vsbase = devm_ioremap(dev, phy_base, 128 * 1024);
	if (!mp2->vsbase) {
		dev_err(dev, "failed to remap vsbase\n");
		dev_dbg(dev, "failed to remap vsbase\n");
		return -ENOMEM;
	}

@@ -301,7 +303,7 @@ int amd_sfh1_1_init(struct amd_mp2_dev *mp2)

	memcpy_fromio(&binfo, mp2->vsbase, sizeof(struct sfh_base_info));
	if (binfo.sbase.fw_info.fw_ver == 0 || binfo.sbase.s_list.sl.sensors == 0) {
		dev_err(dev, "failed to get sensors\n");
		dev_dbg(dev, "failed to get sensors\n");
		return -EOPNOTSUPP;
	}
	dev_dbg(dev, "firmware version 0x%x\n", binfo.sbase.fw_info.fw_ver);
+13 −9
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ MODULE_PARM_DESC(ignore_special_drivers, "Ignore any special drivers and handle
 */

struct hid_report *hid_register_report(struct hid_device *device,
				       unsigned int type, unsigned int id,
				       enum hid_report_type type, unsigned int id,
				       unsigned int application)
{
	struct hid_report_enum *report_enum = device->report_enum + type;
@@ -967,7 +967,7 @@ static const char * const hid_report_names[] = {
 * parsing.
 */
struct hid_report *hid_validate_values(struct hid_device *hid,
				       unsigned int type, unsigned int id,
				       enum hid_report_type type, unsigned int id,
				       unsigned int field_index,
				       unsigned int report_counts)
{
@@ -1921,7 +1921,7 @@ static struct hid_report *hid_get_report(struct hid_report_enum *report_enum,
 * DO NOT USE in hid drivers directly, but through hid_hw_request instead.
 */
int __hid_request(struct hid_device *hid, struct hid_report *report,
		int reqtype)
		enum hid_class_request reqtype)
{
	char *buf;
	int ret;
@@ -1954,7 +1954,7 @@ int __hid_request(struct hid_device *hid, struct hid_report *report,
}
EXPORT_SYMBOL_GPL(__hid_request);

int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 *data, u32 size,
			 int interrupt)
{
	struct hid_report_enum *report_enum = hid->report_enum + type;
@@ -2019,7 +2019,8 @@ EXPORT_SYMBOL_GPL(hid_report_raw_event);
 *
 * This is data entry for lower layers.
 */
int hid_input_report(struct hid_device *hid, int type, u8 *data, u32 size, int interrupt)
int hid_input_report(struct hid_device *hid, enum hid_report_type type, u8 *data, u32 size,
		     int interrupt)
{
	struct hid_report_enum *report_enum;
	struct hid_driver *hdrv;
@@ -2088,6 +2089,7 @@ const struct hid_device_id *hid_match_id(const struct hid_device *hdev,

	return NULL;
}
EXPORT_SYMBOL_GPL(hid_match_id);

static const struct hid_device_id hid_hiddev_list[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS) },
@@ -2352,7 +2354,7 @@ EXPORT_SYMBOL_GPL(hid_hw_close);
 * @reqtype: hid request type
 */
void hid_hw_request(struct hid_device *hdev,
		    struct hid_report *report, int reqtype)
		    struct hid_report *report, enum hid_class_request reqtype)
{
	if (hdev->ll_driver->request)
		return hdev->ll_driver->request(hdev, report, reqtype);
@@ -2377,7 +2379,7 @@ EXPORT_SYMBOL_GPL(hid_hw_request);
 */
int hid_hw_raw_request(struct hid_device *hdev,
		       unsigned char reportnum, __u8 *buf,
		       size_t len, unsigned char rtype, int reqtype)
		       size_t len, enum hid_report_type rtype, enum hid_class_request reqtype)
{
	if (len < 1 || len > HID_MAX_BUFFER_SIZE || !buf)
		return -EINVAL;
@@ -2739,10 +2741,12 @@ int hid_add_device(struct hid_device *hdev)
			hid_warn(hdev, "bad device descriptor (%d)\n", ret);
	}

	hdev->id = atomic_inc_return(&id);

	/* XXX hack, any other cleaner solution after the driver core
	 * is converted to allow more than 20 bytes as the device name? */
	dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
		     hdev->vendor, hdev->product, atomic_inc_return(&id));
		     hdev->vendor, hdev->product, hdev->id);

	hid_debug_register(hdev, dev_name(&hdev->dev));
	ret = device_add(&hdev->dev);
Loading