mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'input-for-v6.17-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: - updates to several drivers consuming GPIO APIs to use setters returning error codes - an infrastructure allowing to define "overlays" for touchscreens carving out regions implementing buttons and other elements from a bigger sensors and a corresponding update to st1232 driver - an update to AT/PS2 keyboard driver to map F13-F24 by default - Samsung keypad driver got a facelift - evdev input handler will now bind to all devices using EV_SYN event instead of abusing id->driver_info - two new sub-drivers implementing 1A (capacitive buttons) and 21 (forcepad button) functions in Synaptics RMI driver - support for polling mode in Goodix touchscreen driver - support for support for FocalTech FT8716 in edt-ft5x06 driver - support for MT6359 in mtk-pmic-keys driver - removal of pcf50633-input driver since platform it was used on is gone - new definitions for game controller "grip" buttons (BTN_GRIP*) and corresponding changes to xpad and hid-steam controller drivers - a new definition for "performance" key * tag 'input-for-v6.17-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (38 commits) HID: hid-steam: Use new BTN_GRIP* buttons Input: add keycode for performance mode key Input: max77693 - convert to atomic pwm operation Input: st1232 - add touch-overlay handling dt-bindings: input: touchscreen: st1232: add touch-overlay example Input: touch-overlay - add touchscreen overlay handling dt-bindings: touchscreen: add touch-overlay property Input: atkbd - correctly map F13 - F24 Input: xpad - use new BTN_GRIP* buttons Input: Add and document BTN_GRIP* Input: xpad - change buttons the D-Pad gets mapped as to BTN_DPAD_* Documentation: Fix capitalization of XBox -> Xbox Input: synaptics-rmi4 - add support for F1A dt-bindings: input: syna,rmi4: Document F1A function Input: synaptics-rmi4 - add support for Forcepads (F21) Input: mtk-pmic-keys - add support for MT6359 PMIC keys Input: remove special handling of id->driver_info when matching Input: evdev - switch matching to EV_SYN Input: samsung-keypad - use BIT() and GENMASK() where appropriate Input: samsung-keypad - use per-chip parameters ...
This commit is contained in:
@@ -89,6 +89,24 @@ properties:
|
||||
required:
|
||||
- reg
|
||||
|
||||
rmi4-f1a@1a:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
$ref: input.yaml#
|
||||
description:
|
||||
RMI4 Function 1A is for capacitive keys.
|
||||
|
||||
properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
linux,keycodes:
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
patternProperties:
|
||||
"^rmi4-f1[12]@1[12]$":
|
||||
type: object
|
||||
@@ -201,6 +219,7 @@ allOf:
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/input/linux-event-codes.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
@@ -234,6 +253,7 @@ examples:
|
||||
|
||||
rmi4-f1a@1a {
|
||||
reg = <0x1a>;
|
||||
linux,keycodes = <KEY_BACK KEY_HOME KEY_MENU>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -43,6 +43,7 @@ properties:
|
||||
- focaltech,ft5452
|
||||
- focaltech,ft6236
|
||||
- focaltech,ft8201
|
||||
- focaltech,ft8716
|
||||
- focaltech,ft8719
|
||||
|
||||
reg:
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
* NXP LPC32xx SoC Touchscreen Controller (TSC)
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "nxp,lpc3220-tsc"
|
||||
- reg: physical base address of the controller and length of memory mapped
|
||||
region.
|
||||
- interrupts: The TSC/ADC interrupt
|
||||
|
||||
Example:
|
||||
|
||||
tsc@40048000 {
|
||||
compatible = "nxp,lpc3220-tsc";
|
||||
reg = <0x40048000 0x1000>;
|
||||
interrupt-parent = <&mic>;
|
||||
interrupts = <39 0>;
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/touchscreen/nxp,lpc3220-tsc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NXP LPC32xx SoC Touchscreen Controller (TSC)
|
||||
|
||||
maintainers:
|
||||
- Frank Li <Frank.Li@nxp.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: nxp,lpc3220-tsc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/lpc32xx-clock.h>
|
||||
|
||||
touchscreen@40048000 {
|
||||
compatible = "nxp,lpc3220-tsc";
|
||||
reg = <0x40048000 0x1000>;
|
||||
interrupt-parent = <&mic>;
|
||||
interrupts = <39 0>;
|
||||
clocks = <&clk LPC32XX_CLK_ADC>;
|
||||
};
|
||||
@@ -37,6 +37,7 @@ unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/input/linux-event-codes.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@@ -46,5 +47,33 @@ examples:
|
||||
reg = <0x55>;
|
||||
interrupts = <2 0>;
|
||||
gpios = <&gpio1 166 0>;
|
||||
|
||||
touch-overlay {
|
||||
segment-0 {
|
||||
label = "Touchscreen";
|
||||
x-origin = <0>;
|
||||
x-size = <240>;
|
||||
y-origin = <40>;
|
||||
y-size = <280>;
|
||||
};
|
||||
|
||||
segment-1a {
|
||||
label = "Camera light";
|
||||
linux,code = <KEY_LIGHTS_TOGGLE>;
|
||||
x-origin = <40>;
|
||||
x-size = <40>;
|
||||
y-origin = <0>;
|
||||
y-size = <40>;
|
||||
};
|
||||
|
||||
segment-2a {
|
||||
label = "Power";
|
||||
linux,code = <KEY_POWER>;
|
||||
x-origin = <160>;
|
||||
x-size = <40>;
|
||||
y-origin = <0>;
|
||||
y-size = <40>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/touchscreen/ti.tsc2007.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Texas Instruments tsc2007 touchscreen controller
|
||||
|
||||
maintainers:
|
||||
- Frank Li <Frank.Li@nxp.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: ti,tsc2007
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
ti,x-plate-ohms:
|
||||
description: X-plate resistance in ohms.
|
||||
|
||||
gpios: true
|
||||
|
||||
pendown-gpio: true
|
||||
|
||||
ti,max-rt:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: maximum pressure.
|
||||
|
||||
ti,fuzzx:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
specifies the absolute input fuzz x value.
|
||||
If set, it will permit noise in the data up to +- the value given to the fuzz
|
||||
parameter, that is used to filter noise from the event stream.
|
||||
|
||||
ti,fuzzy:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: specifies the absolute input fuzz y value.
|
||||
|
||||
ti,fuzzz:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: specifies the absolute input fuzz z value.
|
||||
|
||||
ti,poll-period:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
how much time to wait (in milliseconds) before reading again the
|
||||
values from the tsc2007.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- ti,x-plate-ohms
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
touch@49 {
|
||||
compatible = "ti,tsc2007";
|
||||
reg = <0x49>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <0x0 0x8>;
|
||||
gpios = <&gpio4 0 0>;
|
||||
ti,x-plate-ohms = <180>;
|
||||
};
|
||||
};
|
||||
@@ -87,6 +87,125 @@ properties:
|
||||
touchscreen-y-plate-ohms:
|
||||
description: Resistance of the Y-plate in Ohms
|
||||
|
||||
touch-overlay:
|
||||
description: |
|
||||
List of nodes defining segments (touch areas) on the touchscreen.
|
||||
|
||||
This object can be used to describe a series of segments to restrict
|
||||
the region within touch events are reported or buttons with a specific
|
||||
functionality.
|
||||
|
||||
This is of special interest if the touchscreen is shipped with a physical
|
||||
overlay on top of it with a frame that hides some part of the original
|
||||
touchscreen area. Printed buttons on that overlay are also a typical
|
||||
use case.
|
||||
|
||||
A new touchscreen area is defined as a sub-node without a key code. If a
|
||||
key code is defined in the sub-node, it will be interpreted as a button.
|
||||
|
||||
The x-origin and y-origin properties of a touchscreen area define the
|
||||
offset of a new origin from where the touchscreen events are referenced.
|
||||
This offset is applied to the events accordingly. The x-size and y-size
|
||||
properties define the size of the touchscreen effective area.
|
||||
|
||||
The following example shows a new touchscreen area with the new origin
|
||||
(0',0') for the touch events generated by the device.
|
||||
|
||||
Touchscreen (full area)
|
||||
┌────────────────────────────────────────┐
|
||||
│ ┌───────────────────────────────┐ │
|
||||
│ │ │ │
|
||||
│ ├ y-size │ │
|
||||
│ │ │ │
|
||||
│ │ touchscreen area │ │
|
||||
│ │ (no key code) │ │
|
||||
│ │ │ │
|
||||
│ │ x-size │ │
|
||||
│ ┌└──────────────┴────────────────┘ │
|
||||
│(0',0') │
|
||||
┌└────────────────────────────────────────┘
|
||||
(0,0)
|
||||
|
||||
where (0',0') = (0+x-origin,0+y-origin)
|
||||
|
||||
Sub-nodes with key codes report the touch events on their surface as key
|
||||
events instead.
|
||||
|
||||
The following example shows a touchscreen with a single button on it.
|
||||
|
||||
Touchscreen (full area)
|
||||
┌───────────────────────────────────┐
|
||||
│ │
|
||||
│ │
|
||||
│ ┌─────────┐ │
|
||||
│ │button 0 │ │
|
||||
│ │KEY_POWER│ │
|
||||
│ └─────────┘ │
|
||||
│ │
|
||||
│ │
|
||||
┌└───────────────────────────────────┘
|
||||
(0,0)
|
||||
|
||||
Segments defining buttons and clipped toushcreen areas can be combined
|
||||
as shown in the following example.
|
||||
In that case only the events within the touchscreen area are reported
|
||||
as touch events. Events within the button areas report their associated
|
||||
key code. Any events outside the defined areas are ignored.
|
||||
|
||||
Touchscreen (full area)
|
||||
┌─────────┬──────────────────────────────┐
|
||||
│ │ │
|
||||
│ │ ┌───────────────────────┐ │
|
||||
│ button 0│ │ │ │
|
||||
│KEY_POWER│ │ │ │
|
||||
│ │ │ │ │
|
||||
├─────────┤ │ touchscreen area │ │
|
||||
│ │ │ (no key code) │ │
|
||||
│ │ │ │ │
|
||||
│ button 1│ │ │ │
|
||||
│ KEY_INFO│ ┌└───────────────────────┘ │
|
||||
│ │(0',0') │
|
||||
┌└─────────┴──────────────────────────────┘
|
||||
(0,0)
|
||||
|
||||
type: object
|
||||
|
||||
patternProperties:
|
||||
'^segment-':
|
||||
type: object
|
||||
description:
|
||||
Each segment is represented as a sub-node.
|
||||
properties:
|
||||
x-origin:
|
||||
description: horizontal origin of the node area
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
y-origin:
|
||||
description: vertical origin of the node area
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
x-size:
|
||||
description: horizontal resolution of the node area
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
y-size:
|
||||
description: vertical resolution of the node area
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
label:
|
||||
description: descriptive name of the segment
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
|
||||
linux,code: true
|
||||
|
||||
required:
|
||||
- x-origin
|
||||
- y-origin
|
||||
- x-size
|
||||
- y-size
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
dependencies:
|
||||
touchscreen-size-x: [ touchscreen-size-y ]
|
||||
touchscreen-size-y: [ touchscreen-size-x ]
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
* Texas Instruments tsc2007 touchscreen controller
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "ti,tsc2007".
|
||||
- reg: I2C address of the chip.
|
||||
- ti,x-plate-ohms: X-plate resistance in ohms.
|
||||
|
||||
Optional properties:
|
||||
- gpios: the interrupt gpio the chip is connected to (through the penirq pin).
|
||||
The penirq pin goes to low when the panel is touched.
|
||||
(see GPIO binding[1] for more details).
|
||||
- interrupts: (gpio) interrupt to which the chip is connected
|
||||
(see interrupt binding[0]).
|
||||
- ti,max-rt: maximum pressure.
|
||||
- ti,fuzzx: specifies the absolute input fuzz x value.
|
||||
If set, it will permit noise in the data up to +- the value given to the fuzz
|
||||
parameter, that is used to filter noise from the event stream.
|
||||
- ti,fuzzy: specifies the absolute input fuzz y value.
|
||||
- ti,fuzzz: specifies the absolute input fuzz z value.
|
||||
- ti,poll-period: how much time to wait (in milliseconds) before reading again the
|
||||
values from the tsc2007.
|
||||
|
||||
[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
|
||||
[1]: Documentation/devicetree/bindings/gpio/gpio.txt
|
||||
|
||||
Example:
|
||||
&i2c1 {
|
||||
/* ... */
|
||||
tsc2007@49 {
|
||||
compatible = "ti,tsc2007";
|
||||
reg = <0x49>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <0x0 0x8>;
|
||||
gpios = <&gpio4 0 0>;
|
||||
ti,x-plate-ohms = <180>;
|
||||
};
|
||||
|
||||
/* ... */
|
||||
};
|
||||
@@ -29,8 +29,25 @@ The driver allows configuration of the touch screen via a set of sysfs files:
|
||||
|
||||
|
||||
For debugging purposes the driver provides a few files in the debug
|
||||
filesystem (if available in the kernel). In /sys/kernel/debug/edt_ft5x06
|
||||
you'll find the following files:
|
||||
filesystem (if available in the kernel). They are located in:
|
||||
|
||||
/sys/kernel/debug/i2c/<i2c-bus>/<i2c-device>/
|
||||
|
||||
If you don't know the bus and device numbers, you can look them up with this
|
||||
command:
|
||||
|
||||
$ ls -l /sys/bus/i2c/drivers/edt_ft5x06
|
||||
|
||||
The dereference of the symlink will contain the needed information. You will
|
||||
need the last two elements of its path:
|
||||
|
||||
0-0038 -> ../../../../devices/platform/soc/fcfee800.i2c/i2c-0/0-0038
|
||||
|
||||
So in this case, the location for the debug files is:
|
||||
|
||||
/sys/kernel/debug/i2c/i2c-0/0-0038/
|
||||
|
||||
There, you'll find the following files:
|
||||
|
||||
num_x, num_y:
|
||||
(readonly) contains the number of sensor fields in X- and
|
||||
|
||||
@@ -190,8 +190,21 @@ Gamepads report the following events:
|
||||
|
||||
Rumble is advertised as FF_RUMBLE.
|
||||
|
||||
- Grip buttons:
|
||||
|
||||
Many pads include buttons on the rear, usually referred to as either grip or
|
||||
rear buttons, or paddles. These are often reprogrammable by the firmware to
|
||||
appear as "normal" buttons, but are sometimes exposed to software too. Some
|
||||
notable examples of this are the Steam Deck, which has R4, R5, L4, and L5 on
|
||||
the back; the Xbox Elite pads, which have P1-P4; and the Switch 2 Pro
|
||||
Controller, which has GL and GR.
|
||||
|
||||
For these controllers, BTN_GRIPR and BTN_GRIPR2 should be used for the top
|
||||
and bottom (if present) right grip button(s), and BTN_GRIPL and BTN_GRIPL2
|
||||
should be used for the top and bottom (if present) left grip button(s).
|
||||
|
||||
- Profile:
|
||||
|
||||
Some pads provide a multi-value profile selection switch. An example is the
|
||||
XBox Adaptive and the XBox Elite 2 controllers. When the active profile is
|
||||
switched, its newly selected value is emitted as an ABS_PROFILE event.
|
||||
Some pads provide a multi-value profile selection switch. Examples include
|
||||
the Xbox Adaptive and the Xbox Elite 2 controllers. When the active profile
|
||||
is switched, its newly selected value is emitted as an ABS_PROFILE event.
|
||||
|
||||
@@ -449,6 +449,6 @@ the 32 bits.
|
||||
xbox-dvd (RC_PROTO_XBOX_DVD)
|
||||
----------------------------
|
||||
|
||||
This protocol is used by XBox DVD Remote, which was made for the original
|
||||
XBox. There is no in-kernel decoder or encoder for this protocol. The usb
|
||||
This protocol is used by Xbox DVD Remote, which was made for the original
|
||||
Xbox. There is no in-kernel decoder or encoder for this protocol. The usb
|
||||
device decodes the protocol. There is a BPF decoder available in v4l-utils.
|
||||
|
||||
@@ -25499,6 +25499,13 @@ L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/toshiba-wmi.c
|
||||
|
||||
TOUCH OVERLAY
|
||||
M: Javier Carrasco <javier.carrasco@wolfvision.net>
|
||||
L: linux-input@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/input/touch-overlay.c
|
||||
F: include/linux/input/touch-overlay.h
|
||||
|
||||
TPM DEVICE DRIVER
|
||||
M: Peter Huewe <peterhuewe@gmx.de>
|
||||
M: Jarkko Sakkinen <jarkko@kernel.org>
|
||||
|
||||
@@ -3291,6 +3291,8 @@ static const char *keys[KEY_MAX + 1] = {
|
||||
[BTN_TR2] = "BtnTR2", [BTN_SELECT] = "BtnSelect",
|
||||
[BTN_START] = "BtnStart", [BTN_MODE] = "BtnMode",
|
||||
[BTN_THUMBL] = "BtnThumbL", [BTN_THUMBR] = "BtnThumbR",
|
||||
[BTN_GRIPL] = "BtnGripL", [BTN_GRIPR] = "BtnGripR",
|
||||
[BTN_GRIPL2] = "BtnGripL2", [BTN_GRIPR2] = "BtnGripR2",
|
||||
[BTN_TOOL_PEN] = "ToolPen", [BTN_TOOL_RUBBER] = "ToolRubber",
|
||||
[BTN_TOOL_BRUSH] = "ToolBrush", [BTN_TOOL_PENCIL] = "ToolPencil",
|
||||
[BTN_TOOL_AIRBRUSH] = "ToolAirbrush", [BTN_TOOL_FINGER] = "ToolFinger",
|
||||
|
||||
+16
-19
@@ -755,15 +755,12 @@ static int steam_input_register(struct steam_device *steam)
|
||||
input_set_capability(input, EV_KEY, BTN_THUMBL);
|
||||
input_set_capability(input, EV_KEY, BTN_THUMB);
|
||||
input_set_capability(input, EV_KEY, BTN_THUMB2);
|
||||
input_set_capability(input, EV_KEY, BTN_GRIPL);
|
||||
input_set_capability(input, EV_KEY, BTN_GRIPR);
|
||||
if (steam->quirks & STEAM_QUIRK_DECK) {
|
||||
input_set_capability(input, EV_KEY, BTN_BASE);
|
||||
input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY1);
|
||||
input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY2);
|
||||
input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY3);
|
||||
input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY4);
|
||||
} else {
|
||||
input_set_capability(input, EV_KEY, BTN_GEAR_DOWN);
|
||||
input_set_capability(input, EV_KEY, BTN_GEAR_UP);
|
||||
input_set_capability(input, EV_KEY, BTN_GRIPL2);
|
||||
input_set_capability(input, EV_KEY, BTN_GRIPR2);
|
||||
}
|
||||
|
||||
input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0);
|
||||
@@ -1419,8 +1416,8 @@ static inline s16 steam_le16(u8 *data)
|
||||
* 9.4 | BTN_SELECT | menu left
|
||||
* 9.5 | BTN_MODE | steam logo
|
||||
* 9.6 | BTN_START | menu right
|
||||
* 9.7 | BTN_GEAR_DOWN | left back lever
|
||||
* 10.0 | BTN_GEAR_UP | right back lever
|
||||
* 9.7 | BTN_GRIPL | left back lever
|
||||
* 10.0 | BTN_GRIPR | right back lever
|
||||
* 10.1 | -- | left-pad clicked
|
||||
* 10.2 | BTN_THUMBR | right-pad clicked
|
||||
* 10.3 | BTN_THUMB | left-pad touched (but see explanation below)
|
||||
@@ -1485,8 +1482,8 @@ static void steam_do_input_event(struct steam_device *steam,
|
||||
input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4)));
|
||||
input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5)));
|
||||
input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6)));
|
||||
input_event(input, EV_KEY, BTN_GEAR_DOWN, !!(b9 & BIT(7)));
|
||||
input_event(input, EV_KEY, BTN_GEAR_UP, !!(b10 & BIT(0)));
|
||||
input_event(input, EV_KEY, BTN_GRIPL, !!(b9 & BIT(7)));
|
||||
input_event(input, EV_KEY, BTN_GRIPR, !!(b10 & BIT(0)));
|
||||
input_event(input, EV_KEY, BTN_THUMBR, !!(b10 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6)));
|
||||
input_event(input, EV_KEY, BTN_THUMB, lpad_touched || lpad_and_joy);
|
||||
@@ -1547,8 +1544,8 @@ static void steam_do_input_event(struct steam_device *steam,
|
||||
* 9.4 | BTN_SELECT | menu left
|
||||
* 9.5 | BTN_MODE | steam logo
|
||||
* 9.6 | BTN_START | menu right
|
||||
* 9.7 | BTN_TRIGGER_HAPPY3 | left bottom grip button
|
||||
* 10.0 | BTN_TRIGGER_HAPPY4 | right bottom grip button
|
||||
* 9.7 | BTN_GRIPL2 | left bottom grip button
|
||||
* 10.0 | BTN_GRIPR2 | right bottom grip button
|
||||
* 10.1 | BTN_THUMB | left pad pressed
|
||||
* 10.2 | BTN_THUMB2 | right pad pressed
|
||||
* 10.3 | -- | left pad touched
|
||||
@@ -1573,8 +1570,8 @@ static void steam_do_input_event(struct steam_device *steam,
|
||||
* 12.6 | -- | unknown
|
||||
* 12.7 | -- | unknown
|
||||
* 13.0 | -- | unknown
|
||||
* 13.1 | BTN_TRIGGER_HAPPY1 | left top grip button
|
||||
* 13.2 | BTN_TRIGGER_HAPPY2 | right top grip button
|
||||
* 13.1 | BTN_GRIPL | left top grip button
|
||||
* 13.2 | BTN_GRIPR | right top grip button
|
||||
* 13.3 | -- | unknown
|
||||
* 13.4 | -- | unknown
|
||||
* 13.5 | -- | unknown
|
||||
@@ -1659,8 +1656,8 @@ static void steam_do_deck_input_event(struct steam_device *steam,
|
||||
input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4)));
|
||||
input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5)));
|
||||
input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6)));
|
||||
input_event(input, EV_KEY, BTN_TRIGGER_HAPPY3, !!(b9 & BIT(7)));
|
||||
input_event(input, EV_KEY, BTN_TRIGGER_HAPPY4, !!(b10 & BIT(0)));
|
||||
input_event(input, EV_KEY, BTN_GRIPL2, !!(b9 & BIT(7)));
|
||||
input_event(input, EV_KEY, BTN_GRIPR2, !!(b10 & BIT(0)));
|
||||
input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6)));
|
||||
input_event(input, EV_KEY, BTN_THUMBR, !!(b11 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0)));
|
||||
@@ -1669,8 +1666,8 @@ static void steam_do_deck_input_event(struct steam_device *steam,
|
||||
input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3)));
|
||||
input_event(input, EV_KEY, BTN_THUMB, !!(b10 & BIT(1)));
|
||||
input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_TRIGGER_HAPPY1, !!(b13 & BIT(1)));
|
||||
input_event(input, EV_KEY, BTN_TRIGGER_HAPPY2, !!(b13 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_GRIPL, !!(b13 & BIT(1)));
|
||||
input_event(input, EV_KEY, BTN_GRIPR, !!(b13 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_BASE, !!(b14 & BIT(2)));
|
||||
|
||||
input_sync(input);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
obj-$(CONFIG_INPUT) += input-core.o
|
||||
input-core-y := input.o input-compat.o input-mt.o input-poller.o ff-core.o
|
||||
input-core-y += touchscreen.o
|
||||
input-core-y += touchscreen.o touch-overlay.o
|
||||
|
||||
obj-$(CONFIG_INPUT_FF_MEMLESS) += ff-memless.o
|
||||
obj-$(CONFIG_INPUT_SPARSEKMAP) += sparse-keymap.o
|
||||
|
||||
@@ -1408,8 +1408,12 @@ static void evdev_disconnect(struct input_handle *handle)
|
||||
}
|
||||
|
||||
static const struct input_device_id evdev_ids[] = {
|
||||
{ .driver_info = 1 }, /* Matches all devices */
|
||||
{ }, /* Terminating zero entry */
|
||||
{
|
||||
/* Matches all devices */
|
||||
.flags = INPUT_DEVICE_ID_MATCH_EVBIT,
|
||||
.evbit = { BIT_MASK(EV_SYN) },
|
||||
},
|
||||
{ } /* Terminating zero entry */
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(input, evdev_ids);
|
||||
|
||||
@@ -971,7 +971,7 @@ static const struct input_device_id *input_match_device(struct input_handler *ha
|
||||
{
|
||||
const struct input_device_id *id;
|
||||
|
||||
for (id = handler->id_table; id->flags || id->driver_info; id++) {
|
||||
for (id = handler->id_table; id->flags; id++) {
|
||||
if (input_match_device_id(dev, id) &&
|
||||
(!handler->match || handler->match(handler, dev))) {
|
||||
return id;
|
||||
|
||||
@@ -442,8 +442,8 @@ static const signed short xpad_btn[] = {
|
||||
|
||||
/* used when dpad is mapped to buttons */
|
||||
static const signed short xpad_btn_pad[] = {
|
||||
BTN_TRIGGER_HAPPY1, BTN_TRIGGER_HAPPY2, /* d-pad left, right */
|
||||
BTN_TRIGGER_HAPPY3, BTN_TRIGGER_HAPPY4, /* d-pad up, down */
|
||||
BTN_DPAD_LEFT, BTN_DPAD_RIGHT, /* d-pad left, right */
|
||||
BTN_DPAD_UP, BTN_DPAD_DOWN, /* d-pad up, down */
|
||||
-1 /* terminating entry */
|
||||
};
|
||||
|
||||
@@ -479,8 +479,8 @@ static const signed short xpad_abs_triggers[] = {
|
||||
|
||||
/* used when the controller has extra paddle buttons */
|
||||
static const signed short xpad_btn_paddles[] = {
|
||||
BTN_TRIGGER_HAPPY5, BTN_TRIGGER_HAPPY6, /* paddle upper right, lower right */
|
||||
BTN_TRIGGER_HAPPY7, BTN_TRIGGER_HAPPY8, /* paddle upper left, lower left */
|
||||
BTN_GRIPR, BTN_GRIPR2, /* paddle upper right, lower right */
|
||||
BTN_GRIPL, BTN_GRIPL2, /* paddle upper left, lower left */
|
||||
-1 /* terminating entry */
|
||||
};
|
||||
|
||||
@@ -840,10 +840,10 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *d
|
||||
/* digital pad */
|
||||
if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
|
||||
/* dpad as buttons (left, right, up, down) */
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY1, data[2] & BIT(2));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY2, data[2] & BIT(3));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY3, data[2] & BIT(0));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY4, data[2] & BIT(1));
|
||||
input_report_key(dev, BTN_DPAD_LEFT, data[2] & BIT(2));
|
||||
input_report_key(dev, BTN_DPAD_RIGHT, data[2] & BIT(3));
|
||||
input_report_key(dev, BTN_DPAD_UP, data[2] & BIT(0));
|
||||
input_report_key(dev, BTN_DPAD_DOWN, data[2] & BIT(1));
|
||||
} else {
|
||||
input_report_abs(dev, ABS_HAT0X,
|
||||
!!(data[2] & 0x08) - !!(data[2] & 0x04));
|
||||
@@ -891,10 +891,10 @@ static void xpad360_process_packet(struct usb_xpad *xpad, struct input_dev *dev,
|
||||
/* digital pad */
|
||||
if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
|
||||
/* dpad as buttons (left, right, up, down) */
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY1, data[2] & BIT(2));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY2, data[2] & BIT(3));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY3, data[2] & BIT(0));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY4, data[2] & BIT(1));
|
||||
input_report_key(dev, BTN_DPAD_LEFT, data[2] & BIT(2));
|
||||
input_report_key(dev, BTN_DPAD_RIGHT, data[2] & BIT(3));
|
||||
input_report_key(dev, BTN_DPAD_UP, data[2] & BIT(0));
|
||||
input_report_key(dev, BTN_DPAD_DOWN, data[2] & BIT(1));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1075,10 +1075,10 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
|
||||
data[18] = 0;
|
||||
|
||||
/* Elite Series 2 split packet paddle bits */
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY5, data[18] & BIT(0));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY6, data[18] & BIT(1));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY7, data[18] & BIT(2));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY8, data[18] & BIT(3));
|
||||
input_report_key(dev, BTN_GRIPR, data[18] & BIT(0));
|
||||
input_report_key(dev, BTN_GRIPR2, data[18] & BIT(1));
|
||||
input_report_key(dev, BTN_GRIPL, data[18] & BIT(2));
|
||||
input_report_key(dev, BTN_GRIPL2, data[18] & BIT(3));
|
||||
|
||||
do_sync = true;
|
||||
}
|
||||
@@ -1113,10 +1113,10 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
|
||||
/* digital pad */
|
||||
if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
|
||||
/* dpad as buttons (left, right, up, down) */
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY1, data[5] & BIT(2));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY2, data[5] & BIT(3));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY3, data[5] & BIT(0));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY4, data[5] & BIT(1));
|
||||
input_report_key(dev, BTN_DPAD_LEFT, data[5] & BIT(2));
|
||||
input_report_key(dev, BTN_DPAD_RIGHT, data[5] & BIT(3));
|
||||
input_report_key(dev, BTN_DPAD_UP, data[5] & BIT(0));
|
||||
input_report_key(dev, BTN_DPAD_DOWN, data[5] & BIT(1));
|
||||
} else {
|
||||
input_report_abs(dev, ABS_HAT0X,
|
||||
!!(data[5] & 0x08) - !!(data[5] & 0x04));
|
||||
@@ -1175,10 +1175,10 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
|
||||
data[32] = 0;
|
||||
|
||||
/* OG Elite Series Controller paddle bits */
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY5, data[32] & BIT(1));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY6, data[32] & BIT(3));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY7, data[32] & BIT(0));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY8, data[32] & BIT(2));
|
||||
input_report_key(dev, BTN_GRIPR, data[32] & BIT(1));
|
||||
input_report_key(dev, BTN_GRIPR2, data[32] & BIT(3));
|
||||
input_report_key(dev, BTN_GRIPL, data[32] & BIT(0));
|
||||
input_report_key(dev, BTN_GRIPL2, data[32] & BIT(2));
|
||||
} else if (xpad->packet_type == PKT_XBE2_FW_OLD) {
|
||||
/* Mute paddles if controller has a custom mapping applied.
|
||||
* Checked by comparing the current mapping
|
||||
@@ -1188,10 +1188,10 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
|
||||
data[18] = 0;
|
||||
|
||||
/* Elite Series 2 4.x firmware paddle bits */
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY5, data[18] & BIT(0));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY6, data[18] & BIT(1));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY7, data[18] & BIT(2));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY8, data[18] & BIT(3));
|
||||
input_report_key(dev, BTN_GRIPR, data[18] & BIT(0));
|
||||
input_report_key(dev, BTN_GRIPR2, data[18] & BIT(1));
|
||||
input_report_key(dev, BTN_GRIPL, data[18] & BIT(2));
|
||||
input_report_key(dev, BTN_GRIPL2, data[18] & BIT(3));
|
||||
} else if (xpad->packet_type == PKT_XBE2_FW_5_EARLY) {
|
||||
/* Mute paddles if controller has a custom mapping applied.
|
||||
* Checked by comparing the current mapping
|
||||
@@ -1203,10 +1203,10 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
|
||||
/* Elite Series 2 5.x firmware paddle bits
|
||||
* (before the packet was split)
|
||||
*/
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY5, data[22] & BIT(0));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY6, data[22] & BIT(1));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY7, data[22] & BIT(2));
|
||||
input_report_key(dev, BTN_TRIGGER_HAPPY8, data[22] & BIT(3));
|
||||
input_report_key(dev, BTN_GRIPR, data[22] & BIT(0));
|
||||
input_report_key(dev, BTN_GRIPR2, data[22] & BIT(1));
|
||||
input_report_key(dev, BTN_GRIPL, data[22] & BIT(2));
|
||||
input_report_key(dev, BTN_GRIPL2, data[22] & BIT(3));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -232,8 +232,8 @@ static int adp5588_gpio_get_value(struct gpio_chip *chip, unsigned int off)
|
||||
return !!(val & bit);
|
||||
}
|
||||
|
||||
static void adp5588_gpio_set_value(struct gpio_chip *chip,
|
||||
unsigned int off, int val)
|
||||
static int adp5588_gpio_set_value(struct gpio_chip *chip, unsigned int off,
|
||||
int val)
|
||||
{
|
||||
struct adp5588_kpad *kpad = gpiochip_get_data(chip);
|
||||
unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]);
|
||||
@@ -246,7 +246,8 @@ static void adp5588_gpio_set_value(struct gpio_chip *chip,
|
||||
else
|
||||
kpad->dat_out[bank] &= ~bit;
|
||||
|
||||
adp5588_write(kpad->client, GPIO_DAT_OUT1 + bank, kpad->dat_out[bank]);
|
||||
return adp5588_write(kpad->client, GPIO_DAT_OUT1 + bank,
|
||||
kpad->dat_out[bank]);
|
||||
}
|
||||
|
||||
static int adp5588_gpio_set_config(struct gpio_chip *chip, unsigned int off,
|
||||
@@ -424,7 +425,7 @@ static int adp5588_gpio_add(struct adp5588_kpad *kpad)
|
||||
kpad->gc.direction_input = adp5588_gpio_direction_input;
|
||||
kpad->gc.direction_output = adp5588_gpio_direction_output;
|
||||
kpad->gc.get = adp5588_gpio_get_value;
|
||||
kpad->gc.set = adp5588_gpio_set_value;
|
||||
kpad->gc.set_rv = adp5588_gpio_set_value;
|
||||
kpad->gc.set_config = adp5588_gpio_set_config;
|
||||
kpad->gc.can_sleep = 1;
|
||||
|
||||
|
||||
@@ -84,12 +84,12 @@ static const unsigned short atkbd_set2_keycode[ATKBD_KEYMAP_SIZE] = {
|
||||
#include "hpps2atkbd.h" /* include the keyboard scancodes */
|
||||
|
||||
#else
|
||||
0, 67, 65, 63, 61, 59, 60, 88, 0, 68, 66, 64, 62, 15, 41,117,
|
||||
0, 56, 42, 93, 29, 16, 2, 0, 0, 0, 44, 31, 30, 17, 3, 0,
|
||||
0, 46, 45, 32, 18, 5, 4, 95, 0, 57, 47, 33, 20, 19, 6,183,
|
||||
0, 49, 48, 35, 34, 21, 7,184, 0, 0, 50, 36, 22, 8, 9,185,
|
||||
0, 51, 37, 23, 24, 11, 10, 0, 0, 52, 53, 38, 39, 25, 12, 0,
|
||||
0, 89, 40, 0, 26, 13, 0,193, 58, 54, 28, 27, 0, 43, 0, 85,
|
||||
0, 67, 65, 63, 61, 59, 60, 88,183, 68, 66, 64, 62, 15, 41,117,
|
||||
184, 56, 42, 93, 29, 16, 2, 0,185, 0, 44, 31, 30, 17, 3, 0,
|
||||
186, 46, 45, 32, 18, 5, 4, 95,187, 57, 47, 33, 20, 19, 6,183,
|
||||
188, 49, 48, 35, 34, 21, 7,184,189, 0, 50, 36, 22, 8, 9,185,
|
||||
190, 51, 37, 23, 24, 11, 10, 0,191, 52, 53, 38, 39, 25, 12, 0,
|
||||
192, 89, 40, 0, 26, 13, 0,193, 58, 54, 28, 27, 0, 43, 0,194,
|
||||
0, 86, 91, 90, 92, 0, 14, 94, 0, 79,124, 75, 71,121, 0, 0,
|
||||
82, 83, 80, 76, 77, 72, 1, 69, 87, 78, 81, 74, 55, 73, 70, 99,
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user