Skip to content

Commit 69aea9d

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina: - support for "Unified Battery" feature on Logitech devices from Filipe Laíns - power management improvements for intel-ish driver from Zhang Lixu - support for Goodix devices from Douglas Anderson - improved handling of generic HID keyboard in order to make it easier for userspace to figure out the details of the device, from Dmitry Torokhov - Playstation DualSense support from Roderick Colenbrander - other assorted small fixes and device ID additions. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (49 commits) HID: playstation: add DualSense player LED support. HID: playstation: add microphone mute support for DualSense. HID: playstation: add initial DualSense lightbar support. HID: wacom: Ignore attempts to overwrite the touch_max value from HID HID: playstation: fix array size comparison (off-by-one) HID: playstation: fix unused variable in ps_battery_get_property. HID: playstation: report DualSense hardware and firmware version. HID: playstation: add DualSense classic rumble support. HID: playstation: add DualSense Bluetooth support. HID: playstation: track devices in list. HID: playstation: add DualSense accelerometer and gyroscope support. HID: playstation: add DualSense touchpad support. HID: playstation: add DualSense battery support. HID: playstation: use DualSense MAC address as unique identifier. HID: playstation: initial DualSense USB support. HID: ite: Enable QUIRK_TOUCHPAD_ON_OFF_REPORT on Acer Aspire Switch 10E HID: Ignore battery for Elan touchscreen on HP Spectre X360 15-df0xxx HID: logitech-dj: add support for the new lightspeed connection iteration HID: intel-ish-hid: ipc: Add Tiger Lake H PCI device ID HID: logitech-dj: add support for keyboard events in eQUAD step 4 Gaming ...
2 parents c3476d2 + 00522de commit 69aea9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2606
-419
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/goodix,gt7375p.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Goodix GT7375P touchscreen
8+
9+
maintainers:
10+
- Douglas Anderson <[email protected]>
11+
12+
description:
13+
Supports the Goodix GT7375P touchscreen.
14+
This touchscreen uses the i2c-hid protocol but has some non-standard
15+
power sequencing required.
16+
17+
properties:
18+
compatible:
19+
items:
20+
- const: goodix,gt7375p
21+
22+
reg:
23+
enum:
24+
- 0x5d
25+
- 0x14
26+
27+
interrupts:
28+
maxItems: 1
29+
30+
reset-gpios:
31+
true
32+
33+
vdd-supply:
34+
description: The 3.3V supply to the touchscreen.
35+
36+
required:
37+
- compatible
38+
- reg
39+
- interrupts
40+
- reset-gpios
41+
- vdd-supply
42+
43+
additionalProperties: false
44+
45+
examples:
46+
- |
47+
#include <dt-bindings/clock/qcom,rpmh.h>
48+
#include <dt-bindings/gpio/gpio.h>
49+
#include <dt-bindings/interrupt-controller/irq.h>
50+
51+
i2c {
52+
#address-cells = <1>;
53+
#size-cells = <0>;
54+
55+
ap_ts: touchscreen@5d {
56+
compatible = "goodix,gt7375p";
57+
reg = <0x5d>;
58+
59+
interrupt-parent = <&tlmm>;
60+
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
61+
62+
reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
63+
vdd-supply = <&pp3300_ts>;
64+
};
65+
};

Documentation/hid/amd-sfh-hid.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
44
AMD Sensor Fusion Hub
55
=====================
6-
AMD Sensor Fusion Hub (SFH) is part of an SOC starting from Ryzen based platforms.
6+
AMD Sensor Fusion Hub (SFH) is part of an SOC starting from Ryzen-based platforms.
77
The solution is working well on several OEM products. AMD SFH uses HID over PCIe bus.
88
In terms of architecture it resembles ISH, however the major difference is all
99
the HID reports are generated as part of the kernel driver.
1010

11-
1. Block Diagram
12-
================
11+
Block Diagram
12+
-------------
1313

1414
::
1515

@@ -45,20 +45,20 @@ the HID reports are generated as part of the kernel driver.
4545
AMD HID Transport Layer
4646
-----------------------
4747
AMD SFH transport is also implemented as a bus. Each client application executing in the AMD MP2 is
48-
registered as a device on this bus. Here: MP2 which is an ARM core connected to x86 for processing
48+
registered as a device on this bus. Here, MP2 is an ARM core connected to x86 for processing
4949
sensor data. The layer, which binds each device (AMD SFH HID driver) identifies the device type and
50-
registers with the hid core. Transport layer attach a constant "struct hid_ll_driver" object with
50+
registers with the HID core. Transport layer attaches a constant "struct hid_ll_driver" object with
5151
each device. Once a device is registered with HID core, the callbacks provided via this struct are
5252
used by HID core to communicate with the device. AMD HID Transport layer implements the synchronous calls.
5353

5454
AMD HID Client Layer
5555
--------------------
56-
This layer is responsible to implement HID request and descriptors. As firmware is OS agnostic, HID
56+
This layer is responsible to implement HID requests and descriptors. As firmware is OS agnostic, HID
5757
client layer fills the HID request structure and descriptors. HID client layer is complex as it is
58-
interface between MP2 PCIe layer and HID. HID client layer initialized the MP2 PCIe layer and holds
59-
the instance of MP2 layer. It identifies the number of sensors connected using MP2-PCIe layer. Base
60-
on that allocates the DRAM address for each and every sensor and pass it to MP2-PCIe driver.On
61-
enumeration of each the sensor, client layer fills the HID Descriptor structure and HID input repor
58+
interface between MP2 PCIe layer and HID. HID client layer initializes the MP2 PCIe layer and holds
59+
the instance of MP2 layer. It identifies the number of sensors connected using MP2-PCIe layer. Based
60+
on that allocates the DRAM address for each and every sensor and passes it to MP2-PCIe driver. On
61+
enumeration of each sensor, client layer fills the HID Descriptor structure and HID input report
6262
structure. HID Feature report structure is optional. The report descriptor structure varies from
6363
sensor to sensor.
6464

@@ -72,7 +72,7 @@ The communication between X86 and MP2 is split into three parts.
7272
2. Data transfer via DRAM.
7373
3. Supported sensor info via P2C registers.
7474

75-
Commands are sent to MP2 using C2P Mailbox registers. Writing into C2P Message registers generate
75+
Commands are sent to MP2 using C2P Mailbox registers. Writing into C2P Message registers generates
7676
interrupt to MP2. The client layer allocates the physical memory and the same is sent to MP2 via
7777
the PCI layer. MP2 firmware writes the command output to the access DRAM memory which the client
7878
layer has allocated. Firmware always writes minimum of 32 bytes into DRAM. So as a protocol driver

Documentation/hid/hid-alps.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Case2 ReportID_3 TP Absolute
6464

6565
Command Read/Write
6666
------------------
67-
To read/write to RAM, need to send a commands to the device.
67+
To read/write to RAM, need to send a command to the device.
6868

6969
The command format is as below.
7070

@@ -80,7 +80,7 @@ Byte6 Value Byte
8080
Byte7 Checksum
8181
===== ======================
8282

83-
Command Byte is read=0xD1/write=0xD2 .
83+
Command Byte is read=0xD1/write=0xD2.
8484

8585
Address is read/write RAM address.
8686

Documentation/hid/hid-sensor.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ for different sensors. For example an accelerometer can send X,Y and Z data, whe
4848
an ambient light sensor can send illumination data.
4949
So the implementation has two parts:
5050

51-
- Core hid driver
51+
- Core HID driver
5252
- Individual sensor processing part (sensor drivers)
5353

5454
Core driver
5555
-----------
56-
The core driver registers (hid-sensor-hub) registers as a HID driver. It parses
56+
The core driver (hid-sensor-hub) registers as a HID driver. It parses
5757
report descriptors and identifies all the sensors present. It adds an MFD device
5858
with name HID-SENSOR-xxxx (where xxxx is usage id from the specification).
5959

@@ -95,14 +95,14 @@ Registration functions::
9595
u32 usage_id,
9696
struct hid_sensor_hub_callbacks *usage_callback):
9797

98-
Registers callbacks for an usage id. The callback functions are not allowed
98+
Registers callbacks for a usage id. The callback functions are not allowed
9999
to sleep::
100100

101101

102102
int sensor_hub_remove_callback(struct hid_sensor_hub_device *hsdev,
103103
u32 usage_id):
104104

105-
Removes callbacks for an usage id.
105+
Removes callbacks for a usage id.
106106

107107

108108
Parsing function::
@@ -166,7 +166,7 @@ This allows some differentiating use cases, where vendor can provide application
166166
Some common use cases are debug other sensors or to provide some events like
167167
keyboard attached/detached or lid open/close.
168168

169-
To allow application to utilize these sensors, here they are exported uses sysfs
169+
To allow application to utilize these sensors, here they are exported using sysfs
170170
attribute groups, attributes and misc device interface.
171171

172172
An example of this representation on sysfs::
@@ -207,9 +207,9 @@ An example of this representation on sysfs::
207207
│   │   │   ├── input-1-200202-units
208208
│   │   │   ├── input-1-200202-value
209209

210-
Here there is a custom sensors with four fields, two feature and two inputs.
210+
Here there is a custom sensor with four fields: two feature and two inputs.
211211
Each field is represented by a set of attributes. All fields except the "value"
212-
are read only. The value field is a RW field.
212+
are read only. The value field is a read-write field.
213213

214214
Example::
215215

@@ -237,6 +237,6 @@ These reports are pushed using misc device interface in a FIFO order::
237237
│   │   │   ├── 10:53 -> ../HID-SENSOR-2000e1.6.auto
238238
│   ├── HID-SENSOR-2000e1.6.auto
239239

240-
Each reports can be of variable length preceded by a header. This header
241-
consist of a 32 bit usage id, 64 bit time stamp and 32 bit length field of raw
240+
Each report can be of variable length preceded by a header. This header
241+
consists of a 32-bit usage id, 64-bit time stamp and 32-bit length field of raw
242242
data.

Documentation/hid/hid-transport.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Bluetooth, I2C and user-space I/O drivers.
1212

1313
The HID subsystem is designed as a bus. Any I/O subsystem may provide HID
1414
devices and register them with the HID bus. HID core then loads generic device
15-
drivers on top of it. The transport drivers are responsible of raw data
16-
transport and device setup/management. HID core is responsible of
15+
drivers on top of it. The transport drivers are responsible for raw data
16+
transport and device setup/management. HID core is responsible for
1717
report-parsing, report interpretation and the user-space API. Device specifics
1818
and quirks are handled by all layers depending on the quirk.
1919

@@ -67,7 +67,7 @@ Transport drivers attach a constant "struct hid_ll_driver" object with each
6767
device. Once a device is registered with HID core, the callbacks provided via
6868
this struct are used by HID core to communicate with the device.
6969

70-
Transport drivers are responsible of detecting device failures and unplugging.
70+
Transport drivers are responsible for detecting device failures and unplugging.
7171
HID core will operate a device as long as it is registered regardless of any
7272
device failures. Once transport drivers detect unplug or failure events, they
7373
must unregister the device from HID core and HID core will stop using the
@@ -101,7 +101,7 @@ properties in common.
101101
channel. Any unrequested incoming or outgoing data report must be sent on
102102
this channel and is never acknowledged by the remote side. Devices usually
103103
send their input events on this channel. Outgoing events are normally
104-
not send via intr, except if high throughput is required.
104+
not sent via intr, except if high throughput is required.
105105
- Control Channel (ctrl): The ctrl channel is used for synchronous requests and
106106
device management. Unrequested data input events must not be sent on this
107107
channel and are normally ignored. Instead, devices only send management
@@ -161,7 +161,7 @@ allowed on the intr channel and are the only means of data there.
161161
payload may be blocked by the underlying transport driver if the
162162
specification does not allow them.
163163
- SET_REPORT: A SET_REPORT request has a report ID plus data as payload. It is
164-
sent from host to device and a device must update it's current report state
164+
sent from host to device and a device must update its current report state
165165
according to the given data. Any of the 3 report types can be used. However,
166166
INPUT reports as payload might be blocked by the underlying transport driver
167167
if the specification does not allow them.
@@ -294,7 +294,7 @@ The available HID callbacks are:
294294
void (*request) (struct hid_device *hdev, struct hid_report *report,
295295
int reqtype)
296296

297-
Send an HID request on the ctrl channel. "report" contains the report that
297+
Send a HID request on the ctrl channel. "report" contains the report that
298298
should be sent and "reqtype" the request type. Request-type can be
299299
HID_REQ_SET_REPORT or HID_REQ_GET_REPORT.
300300

Documentation/hid/hiddev.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ the following::
2727
--> hiddev.c ----> POWER / MONITOR CONTROL
2828

2929
In addition, other subsystems (apart from USB) can potentially feed
30-
events into the input subsystem, but these have no effect on the hid
30+
events into the input subsystem, but these have no effect on the HID
3131
device interface.
3232

3333
Using the HID Device Interface
@@ -73,7 +73,7 @@ The hiddev API uses a read() interface, and a set of ioctl() calls.
7373
HID devices exchange data with the host computer using data
7474
bundles called "reports". Each report is divided into "fields",
7575
each of which can have one or more "usages". In the hid-core,
76-
each one of these usages has a single signed 32 bit value.
76+
each one of these usages has a single signed 32-bit value.
7777

7878
read():
7979
-------
@@ -113,7 +113,7 @@ HIDIOCAPPLICATION
113113
- (none)
114114

115115
This ioctl call returns the HID application usage associated with the
116-
hid device. The third argument to ioctl() specifies which application
116+
HID device. The third argument to ioctl() specifies which application
117117
index to get. This is useful when the device has more than one
118118
application collection. If the index is invalid (greater or equal to
119119
the number of application collections this device has) the ioctl
@@ -181,7 +181,7 @@ looked up by type (input, output or feature) and id, so these fields
181181
must be filled in by the user. The ID can be absolute -- the actual
182182
report id as reported by the device -- or relative --
183183
HID_REPORT_ID_FIRST for the first report, and (HID_REPORT_ID_NEXT |
184-
report_id) for the next report after report_id. Without a-priori
184+
report_id) for the next report after report_id. Without a priori
185185
information about report ids, the right way to use this ioctl is to
186186
use the relative IDs above to enumerate the valid IDs. The ioctl
187187
returns non-zero when there is no more next ID. The real report ID is
@@ -200,7 +200,7 @@ HIDIOCGUCODE
200200
- struct hiddev_usage_ref (read/write)
201201

202202
Returns the usage_code in a hiddev_usage_ref structure, given that
203-
given its report type, report id, field index, and index within the
203+
its report type, report id, field index, and index within the
204204
field have already been filled into the structure.
205205

206206
HIDIOCGUSAGE

Documentation/hid/hidraw.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Hidraw is the only alternative, short of writing a custom kernel driver, for
2121
these non-conformant devices.
2222

2323
A benefit of hidraw is that its use by userspace applications is independent
24-
of the underlying hardware type. Currently, Hidraw is implemented for USB
24+
of the underlying hardware type. Currently, hidraw is implemented for USB
2525
and Bluetooth. In the future, as new hardware bus types are developed which
2626
use the HID specification, hidraw will be expanded to add support for these
2727
new bus types.
@@ -31,9 +31,10 @@ create hidraw device nodes. Udev will typically create the device nodes
3131
directly under /dev (eg: /dev/hidraw0). As this location is distribution-
3232
and udev rule-dependent, applications should use libudev to locate hidraw
3333
devices attached to the system. There is a tutorial on libudev with a
34-
working example at:
34+
working example at::
3535

3636
http://www.signal11.us/oss/udev/
37+
https://web.archive.org/web/2019*/www.signal11.us
3738

3839
The HIDRAW API
3940
---------------

0 commit comments

Comments
 (0)