Commit 34da76dc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull HID updates from Jiri Kosina:

 - import a bunch of HID selftests from out-of-tree hid-tools project
   (Benjamin Tissoires)

 - drastically reducing Bluetooth disconnects on hid-nintendo driven
   devices (Daniel J. Ogorchock)

 - lazy initialization of battery interfaces in wacom driver (Jason
   Gerecke)

 - generic support for all Kye tablets (David Yang)

 - proper rumble queue overrun handling in hid-nintendo (Daniel J.
   Ogorchock)

 - support for ADC measurement in logitech-hidpp driver (Bastien Nocera)

 - reset GPIO support in i2c-hid (Hans de Goede)

 - improved handling of generic "Digitizer" usage (Jason Gerecke)

 - support for KEY_CAMERA_FOCUS (Feng Qi)

 - quirks for Apple Geyser 3 and Apple Geyser 4 (Alex Henrie)

 - assorted functional fixes and device ID additions

* tag 'for-linus-2023042601' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (54 commits)
  HID: amd_sfh: Fix max supported HID devices
  HID: wacom: generic: Set battery quirk only when we see battery data
  HID: wacom: Lazy-init batteries
  HID: Ignore battery for ELAN touchscreen on ROG Flow X13 GV301RA
  HID: asus: explicitly include linux/leds.h
  HID: lg-g15: explicitly include linux/leds.h
  HID: steelseries: explicitly include linux/leds.h
  HID: apple: Set the tilde quirk flag on the Geyser 3
  HID: apple: explicitly include linux/leds.h
  HID: mcp2221: fix get and get_direction for gpio
  HID: mcp2221: fix report layout for gpio get
  HID: wacom: Set a default resolution for older tablets
  HID: i2c-hid-of: Add reset GPIO support to i2c-hid-of
  HID: i2c-hid-of: Allow using i2c-hid-of on non OF platforms
  HID: i2c-hid-of: Consistenly use dev local variable in probe()
  HID: kye: Fix rdesc for kye tablets
  HID: amd_sfh: Support for additional light sensor
  HID: amd_sfh: Handle "no sensors" enabled for SFH1.1
  HID: amd_sfh: Increase sensor command timeout for SFH1.1
  HID: amd_sfh: Correct the stop all command
  ...
parents 725a345b c3a6ef33
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -166,6 +166,23 @@ Description:
		The file will be present for all speeds of USB devices, and will
		always read "no" for USB 1.1 and USB 2.0 devices.

What:		/sys/bus/usb/devices/<INTERFACE>/wireless_status
Date:		February 2023
Contact:	Bastien Nocera <hadess@hadess.net>
Description:
		Some USB devices use a USB receiver dongle to communicate
		wirelessly with their device using proprietary protocols. This
		attribute allows user-space to know whether the device is
		connected to its receiver dongle, and, for example, consider
		the device to be absent when choosing whether to show the
		device's battery, show a headset in a list of outputs, or show
		an on-screen keyboard if the only wireless keyboard is
		turned off.
		This attribute is not to be used to replace protocol specific
		statuses available in WWAN, WLAN/Wi-Fi, Bluetooth, etc.
		If the device does not use a receiver dongle with a wireless
		device, then this attribute will not exist.

What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>
Date:		August 2012
Contact:	Lan Tianyu <tianyu.lan@intel.com>
+1 −0
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ static const char *get_sensor_name(int idx)
	case mag_idx:
		return "magnetometer";
	case als_idx:
	case ACS_IDX: /* ambient color sensor */
		return "ALS";
	case HPD_IDX:
		return "HPD";
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
#ifndef AMDSFH_HID_H
#define AMDSFH_HID_H

#define MAX_HID_DEVICES		5
#define MAX_HID_DEVICES		6
#define AMD_SFH_HID_VENDOR	0x1022
#define AMD_SFH_HID_PRODUCT	0x0001

+13 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#define MAGNO_EN	BIT(2)
#define HPD_EN		BIT(16)
#define ALS_EN		BIT(19)
#define ACS_EN		BIT(22)

static int sensor_mask_override = -1;
module_param_named(sensor_mask, sensor_mask_override, int, 0444);
@@ -233,6 +234,9 @@ int amd_mp2_get_sensor_num(struct amd_mp2_dev *privdata, u8 *sensor_id)
	if (HPD_EN & activestatus)
		sensor_id[num_of_sensors++] = HPD_IDX;

	if (ACS_EN & activestatus)
		sensor_id[num_of_sensors++] = ACS_IDX;

	return num_of_sensors;
}

@@ -367,6 +371,14 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
	return devm_add_action_or_reset(&pdev->dev, privdata->mp2_ops->remove, privdata);
}

static void amd_sfh_shutdown(struct pci_dev *pdev)
{
	struct amd_mp2_dev *mp2 = pci_get_drvdata(pdev);

	if (mp2 && mp2->mp2_ops)
		mp2->mp2_ops->stop_all(mp2);
}

static int __maybe_unused amd_mp2_pci_resume(struct device *dev)
{
	struct amd_mp2_dev *mp2 = dev_get_drvdata(dev);
@@ -401,6 +413,7 @@ static struct pci_driver amd_mp2_pci_driver = {
	.id_table	= amd_mp2_pci_tbl,
	.probe		= amd_mp2_pci_probe,
	.driver.pm	= &amd_mp2_pm_ops,
	.shutdown	= amd_sfh_shutdown,
};
module_pci_driver(amd_mp2_pci_driver);

+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#define V2_STATUS	0x2

#define HPD_IDX		16
#define ACS_IDX		22

#define SENSOR_DISCOVERY_STATUS_MASK		GENMASK(5, 3)
#define SENSOR_DISCOVERY_STATUS_SHIFT		3
Loading