mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
Merge tag 'input-for-v6.5-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: - improvements to PS/2 handling for case when EC has already latched a scancode in the data register, but the kernel expects to receive an ACK to a command it sent to a device (such as keyboard LED toggle) - input drivers for devices connected over I2C bus have been switched back to using [new] .probe() - uinput allows userspace to inject timestamps for input events - support for capacitive keys in Atmel touch controller driver - assorted fixes to drv260x, pwm-vibra, ili210x, adxl34x, and other drivers * tag 'input-for-v6.5-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits) Input: pm8941-powerkey - fix debounce on gen2+ PMICs MAINTAINERS: Adjust Qualcomm driver globbing Input: gameport - provide default trigger() and read() Input: tps65219-pwrbutton - use regmap_set_bits() Input: tps65219-pwrbutton - convert to .remove_new() Input: tests - add test to cover all input_grab_device() function Input: gpio-keys - use input_report_key() Input: xpad - spelling fixes for "Xbox" Input: add HAS_IOPORT dependencies Input: libps2 - do not discard non-ack bytes when controlling LEDs Input: libps2 - introduce common interrupt handler Input: libps2 - fix aborting PS/2 commands Input: libps2 - fix NAK handling Input: libps2 - rework handling of command response Input: libps2 - remove special handling of ACK for command byte Input: libps2 - attach ps2dev instances as serio port's drvdata Input: Switch i2c drivers back to use .probe() dt-bindings: input: cypress,cyapa: convert to dtschema Input: adxl34x - do not hardcode interrupt trigger type Input: pwm-vibra - add support for enable GPIO ...
This commit is contained in:
@@ -14,6 +14,9 @@ description: |
|
||||
Atmel maXTouch touchscreen or touchpads such as the mXT244
|
||||
and similar devices.
|
||||
|
||||
allOf:
|
||||
- $ref: input.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: atmel,maxtouch
|
||||
@@ -60,6 +63,10 @@ properties:
|
||||
or experiment to determine which bit corresponds to which input. Use
|
||||
KEY_RESERVED for unused padding values.
|
||||
|
||||
linux,keycodes:
|
||||
minItems: 1
|
||||
maxItems: 8
|
||||
|
||||
atmel,wakeup-method:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: |
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
Cypress I2C Touchpad
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "cypress,cyapa".
|
||||
- reg: I2C address of the chip.
|
||||
- interrupts: interrupt to which the chip is connected (see interrupt
|
||||
binding[0]).
|
||||
|
||||
Optional properties:
|
||||
- wakeup-source: touchpad can be used as a wakeup source.
|
||||
- pinctrl-names: should be "default" (see pinctrl binding [1]).
|
||||
- pinctrl-0: a phandle pointing to the pin settings for the device (see
|
||||
pinctrl binding [1]).
|
||||
- vcc-supply: a phandle for the regulator supplying 3.3V power.
|
||||
|
||||
[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
|
||||
[1]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
|
||||
|
||||
Example:
|
||||
&i2c0 {
|
||||
/* ... */
|
||||
|
||||
/* Cypress Gen3 touchpad */
|
||||
touchpad@67 {
|
||||
compatible = "cypress,cyapa";
|
||||
reg = <0x67>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO 2 */
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
/* Cypress Gen5 and later touchpad */
|
||||
touchpad@24 {
|
||||
compatible = "cypress,cyapa";
|
||||
reg = <0x24>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO 2 */
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
/* ... */
|
||||
};
|
||||
49
Documentation/devicetree/bindings/input/cypress,cyapa.yaml
Normal file
49
Documentation/devicetree/bindings/input/cypress,cyapa.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/cypress,cyapa.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Cypress All Points Addressable (APA) I2C Touchpad / Trackpad
|
||||
|
||||
maintainers:
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: cypress,cyapa
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
vcc-supply:
|
||||
description: 3.3V power
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
trackpad@67 {
|
||||
reg = <0x67>;
|
||||
compatible = "cypress,cyapa";
|
||||
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupt-parent = <&gpx1>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
@@ -32,6 +32,8 @@ properties:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
enable-gpios: true
|
||||
|
||||
vcc-supply: true
|
||||
|
||||
direction-duty-cycle-ns:
|
||||
|
||||
@@ -40,6 +40,8 @@ properties:
|
||||
linux,keycodes:
|
||||
description: EV_ABS specific event code generated by the axis.
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
patternProperties:
|
||||
"^button@[0-9]+$":
|
||||
type: object
|
||||
|
||||
@@ -4,16 +4,16 @@ xpad - Linux USB driver for Xbox compatible controllers
|
||||
|
||||
This driver exposes all first-party and third-party Xbox compatible
|
||||
controllers. It has a long history and has enjoyed considerable usage
|
||||
as Window's xinput library caused most PC games to focus on Xbox
|
||||
as Windows' xinput library caused most PC games to focus on Xbox
|
||||
controller compatibility.
|
||||
|
||||
Due to backwards compatibility all buttons are reported as digital.
|
||||
This only effects Original Xbox controllers. All later controller models
|
||||
This only affects Original Xbox controllers. All later controller models
|
||||
have only digital face buttons.
|
||||
|
||||
Rumble is supported on some models of Xbox 360 controllers but not of
|
||||
Original Xbox controllers nor on Xbox One controllers. As of writing
|
||||
the Xbox One's rumble protocol has not been reverse engineered but in
|
||||
the Xbox One's rumble protocol has not been reverse-engineered but in
|
||||
the future could be supported.
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ I've tested this with Stepmania, and it works quite well.
|
||||
Unknown Controllers
|
||||
-------------------
|
||||
|
||||
If you have an unknown xbox controller, it should work just fine with
|
||||
If you have an unknown Xbox controller, it should work just fine with
|
||||
the default settings.
|
||||
|
||||
HOWEVER if you have an unknown dance pad not listed below, it will not
|
||||
@@ -123,7 +123,7 @@ can be found on the net ([1]_, [2]_, [3]_).
|
||||
|
||||
Thanks to the trip splitter found on the cable you don't even need to cut the
|
||||
original one. You can buy an extension cable and cut that instead. That way,
|
||||
you can still use the controller with your X-Box, if you have one ;)
|
||||
you can still use the controller with your Xbox, if you have one ;)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ Gamepads report the following events:
|
||||
|
||||
Many pads also have a third button which is branded or has a special symbol
|
||||
and meaning. Such buttons are mapped as BTN_MODE. Examples are the Nintendo
|
||||
"HOME" button, the XBox "X"-button or Sony "PS" button.
|
||||
"HOME" button, the Xbox "X" button or the Sony PlayStation "PS" button.
|
||||
|
||||
- Rumble:
|
||||
|
||||
|
||||
@@ -2581,9 +2581,9 @@ F: arch/arm/boot/dts/qcom-*.dtsi
|
||||
F: arch/arm/configs/qcom_defconfig
|
||||
F: arch/arm/mach-qcom/
|
||||
F: arch/arm64/boot/dts/qcom/
|
||||
F: drivers/*/*/pm8???-*
|
||||
F: drivers/*/*/qcom*
|
||||
F: drivers/*/*/qcom/
|
||||
F: drivers/*/pm8???-*
|
||||
F: drivers/*/qcom*
|
||||
F: drivers/*/qcom/
|
||||
F: drivers/bluetooth/btqcomsmd.c
|
||||
|
||||
@@ -168,7 +168,7 @@ config INPUT_EVBUG
|
||||
|
||||
config INPUT_KUNIT_TEST
|
||||
tristate "KUnit tests for Input" if !KUNIT_ALL_TESTS
|
||||
depends on INPUT && KUNIT=y
|
||||
depends on INPUT && KUNIT
|
||||
default KUNIT_ALL_TESTS
|
||||
help
|
||||
Say Y here if you want to build the KUnit tests for the input
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/gameport.h>
|
||||
@@ -21,8 +22,6 @@
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/timekeeping.h>
|
||||
|
||||
/*#include <asm/io.h>*/
|
||||
|
||||
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
|
||||
MODULE_DESCRIPTION("Generic gameport layer");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -518,6 +517,16 @@ void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
|
||||
}
|
||||
EXPORT_SYMBOL(gameport_set_phys);
|
||||
|
||||
static void gameport_default_trigger(struct gameport *gameport)
|
||||
{
|
||||
outb(0xff, gameport->io);
|
||||
}
|
||||
|
||||
static unsigned char gameport_default_read(struct gameport *gameport)
|
||||
{
|
||||
return inb(gameport->io);
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare gameport port for registration.
|
||||
*/
|
||||
@@ -536,6 +545,11 @@ static void gameport_init_port(struct gameport *gameport)
|
||||
if (gameport->parent)
|
||||
gameport->dev.parent = &gameport->parent->dev;
|
||||
|
||||
if (!gameport->trigger)
|
||||
gameport->trigger = gameport_default_trigger;
|
||||
if (!gameport->read)
|
||||
gameport->read = gameport_default_read;
|
||||
|
||||
INIT_LIST_HEAD(&gameport->node);
|
||||
spin_lock_init(&gameport->timer_lock);
|
||||
timer_setup(&gameport->poll_timer, gameport_run_poll_handler, 0);
|
||||
|
||||
@@ -190,6 +190,7 @@ static int input_handle_abs_event(struct input_dev *dev,
|
||||
unsigned int code, int *pval)
|
||||
{
|
||||
struct input_mt *mt = dev->mt;
|
||||
bool is_new_slot = false;
|
||||
bool is_mt_event;
|
||||
int *pold;
|
||||
|
||||
@@ -210,6 +211,7 @@ static int input_handle_abs_event(struct input_dev *dev,
|
||||
pold = &dev->absinfo[code].value;
|
||||
} else if (mt) {
|
||||
pold = &mt->slots[mt->slot].abs[code - ABS_MT_FIRST];
|
||||
is_new_slot = mt->slot != dev->absinfo[ABS_MT_SLOT].value;
|
||||
} else {
|
||||
/*
|
||||
* Bypass filtering for multi-touch events when
|
||||
@@ -228,8 +230,8 @@ static int input_handle_abs_event(struct input_dev *dev,
|
||||
}
|
||||
|
||||
/* Flush pending "slot" event */
|
||||
if (is_mt_event && mt && mt->slot != input_abs_get_val(dev, ABS_MT_SLOT)) {
|
||||
input_abs_set_val(dev, ABS_MT_SLOT, mt->slot);
|
||||
if (is_new_slot) {
|
||||
dev->absinfo[ABS_MT_SLOT].value = mt->slot;
|
||||
return INPUT_PASS_TO_HANDLERS | INPUT_SLOT;
|
||||
}
|
||||
|
||||
|
||||
@@ -292,33 +292,33 @@ config JOYSTICK_JOYDUMP
|
||||
module will be called joydump.
|
||||
|
||||
config JOYSTICK_XPAD
|
||||
tristate "X-Box gamepad support"
|
||||
tristate "Xbox gamepad support"
|
||||
depends on USB_ARCH_HAS_HCD
|
||||
select USB
|
||||
help
|
||||
Say Y here if you want to use the X-Box pad with your computer.
|
||||
Say Y here if you want to use Xbox pads with your computer.
|
||||
Make sure to say Y to "Joystick support" (CONFIG_INPUT_JOYDEV)
|
||||
and/or "Event interface support" (CONFIG_INPUT_EVDEV) as well.
|
||||
|
||||
For information about how to connect the X-Box pad to USB, see
|
||||
For information about how to connect the Xbox pad to USB, see
|
||||
<file:Documentation/input/devices/xpad.rst>.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called xpad.
|
||||
|
||||
config JOYSTICK_XPAD_FF
|
||||
bool "X-Box gamepad rumble support"
|
||||
bool "Xbox gamepad rumble support"
|
||||
depends on JOYSTICK_XPAD && INPUT
|
||||
select INPUT_FF_MEMLESS
|
||||
help
|
||||
Say Y here if you want to take advantage of xbox 360 rumble features.
|
||||
Say Y here if you want to take advantage of Xbox 360 rumble features.
|
||||
|
||||
config JOYSTICK_XPAD_LEDS
|
||||
bool "LED Support for Xbox360 controller 'BigX' LED"
|
||||
bool "LED Support for the Xbox 360 controller Guide button"
|
||||
depends on JOYSTICK_XPAD && (LEDS_CLASS=y || LEDS_CLASS=JOYSTICK_XPAD)
|
||||
help
|
||||
This option enables support for the LED which surrounds the Big X on
|
||||
XBox 360 controller.
|
||||
Xbox 360 controllers.
|
||||
|
||||
config JOYSTICK_WALKERA0701
|
||||
tristate "Walkera WK-0701 RC transmitter"
|
||||
|
||||
@@ -348,7 +348,7 @@ static struct i2c_driver as5011_driver = {
|
||||
.driver = {
|
||||
.name = "as5011",
|
||||
},
|
||||
.probe_new = as5011_probe,
|
||||
.probe = as5011_probe,
|
||||
.remove = as5011_remove,
|
||||
.id_table = as5011_id,
|
||||
};
|
||||
|
||||
@@ -137,7 +137,7 @@ static struct i2c_driver qwiic_driver = {
|
||||
.of_match_table = of_match_ptr(of_qwiic_match),
|
||||
},
|
||||
.id_table = qwiic_id_table,
|
||||
.probe_new = qwiic_probe,
|
||||
.probe = qwiic_probe,
|
||||
};
|
||||
module_i2c_driver(qwiic_driver);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* X-Box gamepad driver
|
||||
* Xbox gamepad driver
|
||||
*
|
||||
* Copyright (c) 2002 Marko Friedemann <mfr@bmx-chemnitz.de>
|
||||
* 2004 Oliver Schwartz <Oliver.Schwartz@gmx.de>,
|
||||
@@ -23,8 +23,8 @@
|
||||
* - ITO Takayuki for providing essential xpad information on his website
|
||||
* - Vojtech Pavlik - iforce driver / input subsystem
|
||||
* - Greg Kroah-Hartman - usb-skeleton driver
|
||||
* - XBOX Linux project - extra USB id's
|
||||
* - Pekka Pöyry (quantus) - Xbox One controller reverse engineering
|
||||
* - Xbox Linux project - extra USB IDs
|
||||
* - Pekka Pöyry (quantus) - Xbox One controller reverse-engineering
|
||||
*
|
||||
* TODO:
|
||||
* - fine tune axes (especially trigger axes)
|
||||
@@ -52,7 +52,7 @@
|
||||
* 2002-07-17 - 0.0.5 : simplified d-pad handling
|
||||
*
|
||||
* 2004-10-02 - 0.0.6 : DDR pad support
|
||||
* - borrowed from the XBOX linux kernel
|
||||
* - borrowed from the Xbox Linux kernel
|
||||
* - USB id's for commonly used dance pads are present
|
||||
* - dance pads will map D-PAD to buttons, not axes
|
||||
* - pass the module paramater 'dpad_to_buttons' to force
|
||||
@@ -454,49 +454,49 @@ static const signed short xpad_btn_paddles[] = {
|
||||
{ XPAD_XBOXONE_VENDOR_PROTOCOL((vend), 208) }
|
||||
|
||||
static const struct usb_device_id xpad_table[] = {
|
||||
{ USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */
|
||||
XPAD_XBOX360_VENDOR(0x0079), /* GPD Win 2 Controller */
|
||||
{ USB_INTERFACE_INFO('X', 'B', 0) }, /* Xbox USB-IF not-approved class */
|
||||
XPAD_XBOX360_VENDOR(0x0079), /* GPD Win 2 controller */
|
||||
XPAD_XBOX360_VENDOR(0x03eb), /* Wooting Keyboards (Legacy) */
|
||||
XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft X-Box One controllers */
|
||||
XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */
|
||||
XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster Xbox 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft Xbox 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft Xbox One controllers */
|
||||
XPAD_XBOX360_VENDOR(0x046d), /* Logitech Xbox 360-style controllers */
|
||||
XPAD_XBOX360_VENDOR(0x056e), /* Elecom JC-U3613M */
|
||||
XPAD_XBOX360_VENDOR(0x06a3), /* Saitek P3600 */
|
||||
XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz Xbox 360 controllers */
|
||||
{ USB_DEVICE(0x0738, 0x4540) }, /* Mad Catz Beat Pad */
|
||||
XPAD_XBOXONE_VENDOR(0x0738), /* Mad Catz FightStick TE 2 */
|
||||
XPAD_XBOX360_VENDOR(0x07ff), /* Mad Catz GamePad */
|
||||
XPAD_XBOX360_VENDOR(0x07ff), /* Mad Catz Gamepad */
|
||||
XPAD_XBOX360_VENDOR(0x0c12), /* Zeroplus X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f X-Box 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x0e6f), /* 0x0e6f X-Box One controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x0f0d), /* Hori Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1038), /* SteelSeries Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f Xbox 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x0e6f), /* 0x0e6f Xbox One controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x0f0d), /* Hori controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1038), /* SteelSeries controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x10f5), /* Turtle Beach Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x11c9), /* Nacon GC100XF */
|
||||
XPAD_XBOX360_VENDOR(0x1209), /* Ardwiino Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x12ab), /* X-Box 360 dance pads */
|
||||
XPAD_XBOX360_VENDOR(0x1430), /* RedOctane X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x146b), /* BigBen Interactive Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x12ab), /* Xbox 360 dance pads */
|
||||
XPAD_XBOX360_VENDOR(0x1430), /* RedOctane Xbox 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x146b), /* Bigben Interactive controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1532), /* Razer Sabertooth */
|
||||
XPAD_XBOXONE_VENDOR(0x1532), /* Razer Wildcat */
|
||||
XPAD_XBOX360_VENDOR(0x15e4), /* Numark X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x162e), /* Joytech X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x15e4), /* Numark Xbox 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x162e), /* Joytech Xbox 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */
|
||||
XPAD_XBOX360_VENDOR(0x1949), /* Amazon controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */
|
||||
XPAD_XBOX360_VENDOR(0x20d6), /* PowerA Controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x20d6), /* PowerA Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x24c6), /* PowerA Controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1bad), /* Harmonix Rock Band guitar and drums */
|
||||
XPAD_XBOX360_VENDOR(0x20d6), /* PowerA controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x20d6), /* PowerA controllers */
|
||||
XPAD_XBOX360_VENDOR(0x24c6), /* PowerA controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA controllers */
|
||||
XPAD_XBOX360_VENDOR(0x2563), /* OneXPlayer Gamepad */
|
||||
XPAD_XBOX360_VENDOR(0x260d), /* Dareu H101 */
|
||||
XPAD_XBOX360_VENDOR(0x2c22), /* Qanba Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller */
|
||||
XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller for Xbox */
|
||||
XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke X-Box One pad */
|
||||
XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke Xbox One pad */
|
||||
XPAD_XBOX360_VENDOR(0x2f24), /* GameSir controllers */
|
||||
XPAD_XBOX360_VENDOR(0x31e3), /* Wooting Keyboards */
|
||||
XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */
|
||||
{ }
|
||||
@@ -724,7 +724,7 @@ static void xpad360w_poweroff_controller(struct usb_xpad *xpad);
|
||||
* Completes a request by converting the data into events for the
|
||||
* input subsystem.
|
||||
*
|
||||
* The used report descriptor was taken from ITO Takayukis website:
|
||||
* The used report descriptor was taken from ITO Takayuki's website:
|
||||
* http://euc.jp/periphs/xbox-controller.ja.html
|
||||
*/
|
||||
static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *data)
|
||||
@@ -1569,7 +1569,7 @@ struct xpad_led {
|
||||
};
|
||||
|
||||
/*
|
||||
* set the LEDs on Xbox360 / Wireless Controllers
|
||||
* set the LEDs on Xbox 360 / Wireless Controllers
|
||||
* @param command
|
||||
* 0: off
|
||||
* 1: all blink, then previous setting
|
||||
@@ -2229,5 +2229,5 @@ static struct usb_driver xpad_driver = {
|
||||
module_usb_driver(xpad_driver);
|
||||
|
||||
MODULE_AUTHOR("Marko Friedemann <mfr@bmx-chemnitz.de>");
|
||||
MODULE_DESCRIPTION("X-Box pad driver");
|
||||
MODULE_DESCRIPTION("Xbox pad driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
@@ -866,7 +866,7 @@ static struct i2c_driver adp5588_driver = {
|
||||
.of_match_table = adp5588_of_match,
|
||||
.pm = pm_sleep_ptr(&adp5588_dev_pm_ops),
|
||||
},
|
||||
.probe_new = adp5588_probe,
|
||||
.probe = adp5588_probe,
|
||||
.remove = adp5588_remove,
|
||||
.id_table = adp5588_id,
|
||||
};
|
||||
|
||||
@@ -1054,7 +1054,7 @@ static struct i2c_driver adp5589_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.pm = pm_sleep_ptr(&adp5589_dev_pm_ops),
|
||||
},
|
||||
.probe_new = adp5589_probe,
|
||||
.probe = adp5589_probe,
|
||||
.id_table = adp5589_id,
|
||||
};
|
||||
|
||||
|
||||
@@ -309,12 +309,19 @@ static ssize_t atkbd_show_function_row_physmap(struct atkbd *atkbd, char *buf)
|
||||
return vivaldi_function_row_physmap_show(&atkbd->vdata, buf);
|
||||
}
|
||||
|
||||
static struct atkbd *atkbd_from_serio(struct serio *serio)
|
||||
{
|
||||
struct ps2dev *ps2dev = serio_get_drvdata(serio);
|
||||
|
||||
return container_of(ps2dev, struct atkbd, ps2dev);
|
||||
}
|
||||
|
||||
static umode_t atkbd_attr_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr, int i)
|
||||
{
|
||||
struct device *dev = kobj_to_dev(kobj);
|
||||
struct serio *serio = to_serio_port(dev);
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
struct atkbd *atkbd = atkbd_from_serio(serio);
|
||||
|
||||
if (attr == &atkbd_attr_function_row_physmap.attr &&
|
||||
!atkbd->vdata.num_function_row_keys)
|
||||
@@ -392,46 +399,60 @@ static unsigned int atkbd_compat_scancode(struct atkbd *atkbd, unsigned int code
|
||||
}
|
||||
|
||||
/*
|
||||
* atkbd_interrupt(). Here takes place processing of data received from
|
||||
* the keyboard into events.
|
||||
* Tries to handle frame or parity error by requesting the keyboard controller
|
||||
* to resend the last byte. This historically not done on x86 as controllers
|
||||
* there typically do not implement this command.
|
||||
*/
|
||||
|
||||
static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
|
||||
unsigned int flags)
|
||||
static bool __maybe_unused atkbd_handle_frame_error(struct ps2dev *ps2dev,
|
||||
u8 data, unsigned int flags)
|
||||
{
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
struct atkbd *atkbd = container_of(ps2dev, struct atkbd, ps2dev);
|
||||
struct serio *serio = ps2dev->serio;
|
||||
|
||||
if ((flags & (SERIO_FRAME | SERIO_PARITY)) &&
|
||||
(~flags & SERIO_TIMEOUT) &&
|
||||
!atkbd->resend && atkbd->write) {
|
||||
dev_warn(&serio->dev, "Frame/parity error: %02x\n", flags);
|
||||
serio_write(serio, ATKBD_CMD_RESEND);
|
||||
atkbd->resend = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!flags && data == ATKBD_RET_ACK)
|
||||
atkbd->resend = false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static enum ps2_disposition atkbd_pre_receive_byte(struct ps2dev *ps2dev,
|
||||
u8 data, unsigned int flags)
|
||||
{
|
||||
struct serio *serio = ps2dev->serio;
|
||||
|
||||
dev_dbg(&serio->dev, "Received %02x flags %02x\n", data, flags);
|
||||
|
||||
#if !defined(__i386__) && !defined (__x86_64__)
|
||||
if (atkbd_handle_frame_error(ps2dev, data, flags))
|
||||
return PS2_IGNORE;
|
||||
#endif
|
||||
|
||||
return PS2_PROCESS;
|
||||
}
|
||||
|
||||
static void atkbd_receive_byte(struct ps2dev *ps2dev, u8 data)
|
||||
{
|
||||
struct serio *serio = ps2dev->serio;
|
||||
struct atkbd *atkbd = container_of(ps2dev, struct atkbd, ps2dev);
|
||||
struct input_dev *dev = atkbd->dev;
|
||||
unsigned int code = data;
|
||||
int scroll = 0, hscroll = 0, click = -1;
|
||||
int value;
|
||||
unsigned short keycode;
|
||||
|
||||
dev_dbg(&serio->dev, "Received %02x flags %02x\n", data, flags);
|
||||
|
||||
#if !defined(__i386__) && !defined (__x86_64__)
|
||||
if ((flags & (SERIO_FRAME | SERIO_PARITY)) && (~flags & SERIO_TIMEOUT) && !atkbd->resend && atkbd->write) {
|
||||
dev_warn(&serio->dev, "Frame/parity error: %02x\n", flags);
|
||||
serio_write(serio, ATKBD_CMD_RESEND);
|
||||
atkbd->resend = true;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!flags && data == ATKBD_RET_ACK)
|
||||
atkbd->resend = false;
|
||||
#endif
|
||||
|
||||
if (unlikely(atkbd->ps2dev.flags & PS2_FLAG_ACK))
|
||||
if (ps2_handle_ack(&atkbd->ps2dev, data))
|
||||
goto out;
|
||||
|
||||
if (unlikely(atkbd->ps2dev.flags & PS2_FLAG_CMD))
|
||||
if (ps2_handle_response(&atkbd->ps2dev, data))
|
||||
goto out;
|
||||
|
||||
pm_wakeup_event(&serio->dev, 0);
|
||||
|
||||
if (!atkbd->enabled)
|
||||
goto out;
|
||||
return;
|
||||
|
||||
input_event(dev, EV_MSC, MSC_RAW, code);
|
||||
|
||||
@@ -453,16 +474,16 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
|
||||
case ATKBD_RET_BAT:
|
||||
atkbd->enabled = false;
|
||||
serio_reconnect(atkbd->ps2dev.serio);
|
||||
goto out;
|
||||
return;
|
||||
case ATKBD_RET_EMUL0:
|
||||
atkbd->emul = 1;
|
||||
goto out;
|
||||
return;
|
||||
case ATKBD_RET_EMUL1:
|
||||
atkbd->emul = 2;
|
||||
goto out;
|
||||
return;
|
||||
case ATKBD_RET_RELEASE:
|
||||
atkbd->release = true;
|
||||
goto out;
|
||||
return;
|
||||
case ATKBD_RET_ACK:
|
||||
case ATKBD_RET_NAK:
|
||||
if (printk_ratelimit())
|
||||
@@ -470,18 +491,18 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
|
||||
"Spurious %s on %s. "
|
||||
"Some program might be trying to access hardware directly.\n",
|
||||
data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys);
|
||||
goto out;
|
||||
return;
|
||||
case ATKBD_RET_ERR:
|
||||
atkbd->err_count++;
|
||||
dev_dbg(&serio->dev, "Keyboard on %s reports too many keys pressed.\n",
|
||||
serio->phys);
|
||||
goto out;
|
||||
return;
|
||||
}
|
||||
|
||||
code = atkbd_compat_scancode(atkbd, code);
|
||||
|
||||
if (atkbd->emul && --atkbd->emul)
|
||||
goto out;
|
||||
return;
|
||||
|
||||
keycode = atkbd->keycode[code];
|
||||
|
||||
@@ -557,8 +578,6 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
|
||||
}
|
||||
|
||||
atkbd->release = false;
|
||||
out:
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int atkbd_set_repeat_rate(struct atkbd *atkbd)
|
||||
@@ -909,7 +928,7 @@ static int atkbd_reset_state(struct atkbd *atkbd)
|
||||
|
||||
static void atkbd_cleanup(struct serio *serio)
|
||||
{
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
struct atkbd *atkbd = atkbd_from_serio(serio);
|
||||
|
||||
atkbd_disable(atkbd);
|
||||
ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_DEF);
|
||||
@@ -922,7 +941,7 @@ static void atkbd_cleanup(struct serio *serio)
|
||||
|
||||
static void atkbd_disconnect(struct serio *serio)
|
||||
{
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
struct atkbd *atkbd = atkbd_from_serio(serio);
|
||||
|
||||
atkbd_disable(atkbd);
|
||||
|
||||
@@ -1188,7 +1207,7 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd)
|
||||
|
||||
static void atkbd_parse_fwnode_data(struct serio *serio)
|
||||
{
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
struct atkbd *atkbd = atkbd_from_serio(serio);
|
||||
struct device *dev = &serio->dev;
|
||||
int n;
|
||||
|
||||
@@ -1222,7 +1241,8 @@ static int atkbd_connect(struct serio *serio, struct serio_driver *drv)
|
||||
goto fail1;
|
||||
|
||||
atkbd->dev = dev;
|
||||
ps2_init(&atkbd->ps2dev, serio);
|
||||
ps2_init(&atkbd->ps2dev, serio,
|
||||
atkbd_pre_receive_byte, atkbd_receive_byte);
|
||||
INIT_DELAYED_WORK(&atkbd->event_work, atkbd_event_work);
|
||||
mutex_init(&atkbd->mutex);
|
||||
|
||||
@@ -1295,7 +1315,7 @@ static int atkbd_connect(struct serio *serio, struct serio_driver *drv)
|
||||
|
||||
static int atkbd_reconnect(struct serio *serio)
|
||||
{
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
struct atkbd *atkbd = atkbd_from_serio(serio);
|
||||
struct serio_driver *drv = serio->drv;
|
||||
int retval = -1;
|
||||
|
||||
@@ -1378,7 +1398,7 @@ static struct serio_driver atkbd_drv = {
|
||||
},
|
||||
.description = DRIVER_DESC,
|
||||
.id_table = atkbd_serio_ids,
|
||||
.interrupt = atkbd_interrupt,
|
||||
.interrupt = ps2_interrupt,
|
||||
.connect = atkbd_connect,
|
||||
.reconnect = atkbd_reconnect,
|
||||
.disconnect = atkbd_disconnect,
|
||||
@@ -1389,7 +1409,7 @@ static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf,
|
||||
ssize_t (*handler)(struct atkbd *, char *))
|
||||
{
|
||||
struct serio *serio = to_serio_port(dev);
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
struct atkbd *atkbd = atkbd_from_serio(serio);
|
||||
|
||||
return handler(atkbd, buf);
|
||||
}
|
||||
@@ -1398,7 +1418,7 @@ static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t
|
||||
ssize_t (*handler)(struct atkbd *, const char *, size_t))
|
||||
{
|
||||
struct serio *serio = to_serio_port(dev);
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
struct atkbd *atkbd = atkbd_from_serio(serio);
|
||||
int retval;
|
||||
|
||||
retval = mutex_lock_interruptible(&atkbd->mutex);
|
||||
|
||||
@@ -518,7 +518,7 @@ static struct i2c_driver cap11xx_i2c_driver = {
|
||||
.of_match_table = cap11xx_dt_ids,
|
||||
},
|
||||
.id_table = cap11xx_i2c_ids,
|
||||
.probe_new = cap11xx_i2c_probe,
|
||||
.probe = cap11xx_i2c_probe,
|
||||
};
|
||||
|
||||
module_i2c_driver(cap11xx_i2c_driver);
|
||||
|
||||
@@ -229,7 +229,7 @@ static struct i2c_driver cypress_sf_driver = {
|
||||
.of_match_table = of_match_ptr(cypress_sf_of_match),
|
||||
},
|
||||
.id_table = cypress_sf_id_table,
|
||||
.probe_new = cypress_sf_probe,
|
||||
.probe = cypress_sf_probe,
|
||||
};
|
||||
module_i2c_driver(cypress_sf_driver);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user