Merge tag 'input-for-v7.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - Updates to input core to reject parent device overrides on managed
   input devices so devres lifetime management is not split across
   different devices, along with fixes for da7280, drv2665, drv2667, and
   tps6507x-ts that were reparenting managed input devices, and removal
   of redundant parent assignments across multiple drivers

 - A fix in input core to always accept EV_SYN events in input_event()
   and input_inject_event() so events seeded before device registration
   are properly flushed by input_sync()

 - A fix in matrix-keymap helper to reject keycodes above KEY_MAX and
   prevent out-of-bounds bitmap writes

 - Fixes and cleanups for HP GSC PS/2 (gscps2) serio driver to resolve
   race conditions in port list management, ring buffer access, and
   interrupt handling, return IRQ_NONE for unhandled shared interrupts,
   and drop busy-waiting on transmit

 - Fixes for maple_keyb driver to correct inverted key press detection,
   implement open and close methods so polling only runs while the
   device is open, and clean up unused driver fields

 - Fixes for maplecontrol driver to emit EV_SYN after reporting events,
   only enable axes reported by the controller with corrected hat
   limits, and stop polling and clear the callback on close

 - Updates to maplemouse driver to stop polling and clear the callback
   on close and drop redundant driver data cleanup

 - Fixes for matrix_keypad driver reverting forced switching of row
   GPIOs to input mode that broke row interrupts on platforms with
   separate GPIO and interrupt pinmux functions, and propagating the
   actual error code from matrix_keypad_build_keymap()

 - A fix for st-keyscan driver to keep the interrupt disabled while the
   peripheral clock is gated off to prevent bus faults, along with probe
   error handling improvements

 - A fix for mms114 touchscreen driver to disable interrupts before
   synthesizing touch release events during suspend so concurrent
   interrupts do not leave stuck active touch slots

 - Updates to xpad driver to support GameSir Nova Lite controller

 - A number of updates to device tree bindings, including a new schema
   for Analog Devices AD7147 CapTouch controller, conversion of SiS 9200
   I2C touchscreen binding to DT schema format, and allowing the
   wakeup-source property on Dialog DA9062 onkey

 - Other assorted driver cleanups, style fixes, and conversions,
   including switching to named initializers for acpi_device_id tables
   and converting cyttsp5 to DEFINE_SIMPLE_DEV_PM_OPS.

* tag 'input-for-v7.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (94 commits)
  Revert "Input: matrix_keypad - force switch rows to input mode"
  Input: s6sy761 - drop duplicate axis initialization in s6sy761_probe()
  Input: always accept EV_SYN in input_event()
  dt-bindings: input: dlg,da9062-onkey: Allow wakeup-source property
  Input: xpad - add GameSir Nova Lite support
  Input: touchscreen - use named initializers for acpi_device_id
  Input: mouse - cyapa: use named initializers for acpi_device_id
  Input: misc - use named initializers for acpi_device_id
  Input: keyboard - use named initializers for acpi_device_id
  Input: reject parent overrides on managed input devices
  Input: tps6507x-ts - fix input device parent assignment
  Input: drv2667 - fix input device parent assignment
  Input: drv2665 - fix input device parent assignment
  Input: da7280 - fix input device parent assignment
  Input: maple_keyb - remove unused mdev->driver assignment
  Input: maplecontrol - remove unused mdev->driver assignment
  Input: maplemouse - remove unused mdev->driver assignment
  Input: maplecontrol - remove redundant drvdata resetting
  Input: maple_keyb - remove redundant drvdata resetting
  Input: maplemouse - remove redundant drvdata resetting
  ...
This commit is contained in:
Linus Torvalds committed 2026-10-24 19:42:04 -10:00
commit a32e63a613
94 files changed
+461 -414

No files matched your search

@@ -111,17 +111,17 @@ examples:
#size-cells = <0>;
axis@0 {
reg = <0>;
linux,code = <ABS_X>;
abs-range = <3300 0>;
abs-fuzz = <4>;
abs-flat = <200>;
reg = <0>;
linux,code = <ABS_X>;
abs-range = <3300 0>;
abs-fuzz = <4>;
abs-flat = <200>;
};
axis@1 {
reg = <1>;
linux,code = <ABS_Y>;
abs-range = <0 3300>;
abs-fuzz = <4>;
abs-flat = <200>;
reg = <1>;
linux,code = <ABS_Y>;
abs-range = <0 3300>;
abs-fuzz = <4>;
abs-flat = <200>;
};
};
@@ -0,0 +1,48 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/adi,ad7147_captouch.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices AD7147 CapTouch Programmable Controller
maintainers:
- Michael Hennerich <michael.hennerich@analog.com>
properties:
compatible:
const: adi,ad7147_captouch
reg:
maxItems: 1
interrupts:
maxItems: 1
vcc-supply: true
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touch@2c {
compatible = "adi,ad7147_captouch";
reg = <0x2c>;
interrupt-parent = <&tlmm>;
interrupts = <96 IRQ_TYPE_EDGE_FALLING>;
vcc-supply = <&vreg_l18a_2p85>;
};
};
...
@@ -50,12 +50,12 @@ examples:
#size-cells = <0>;
touchkey@28 {
compatible = "cypress,sf3155";
reg = <0x28>;
interrupt-parent = <&msmgpio>;
interrupts = <77 IRQ_TYPE_EDGE_FALLING>;
avdd-supply = <&vreg_l6a_1p8>;
vdd-supply = <&vdd_3v2_tp>;
linux,keycodes = <KEY_BACK KEY_MENU>;
compatible = "cypress,sf3155";
reg = <0x28>;
interrupt-parent = <&msmgpio>;
interrupts = <77 IRQ_TYPE_EDGE_FALLING>;
avdd-supply = <&vreg_l6a_1p8>;
vdd-supply = <&vdd_3v2_tp>;
linux,keycodes = <KEY_BACK KEY_MENU>;
};
};
@@ -32,6 +32,8 @@ properties:
the OnKey driver will remove support for the KEY_POWER key press
when triggered using a long press of the OnKey.
wakeup-source: true
required:
- compatible
@@ -79,10 +79,10 @@ examples:
#size-cells = <2>;
keyboard@10010000 {
compatible = "mediatek,mt6779-keypad";
reg = <0 0x10010000 0 0x1000>;
interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>;
clocks = <&clk26m>;
clock-names = "kpd";
compatible = "mediatek,mt6779-keypad";
reg = <0 0x10010000 0 0x1000>;
interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>;
clocks = <&clk26m>;
clock-names = "kpd";
};
};
@@ -290,19 +290,19 @@ examples:
#size-cells = <0>;
led@0 {
label = "cap11xx:green:usr0";
reg = <0>;
label = "cap11xx:green:usr0";
reg = <0>;
};
led@1 {
label = "cap11xx:green:usr1";
reg = <1>;
label = "cap11xx:green:usr1";
reg = <1>;
};
led@2 {
label = "cap11xx:green:alive";
reg = <2>;
linux,default-trigger = "heartbeat";
label = "cap11xx:green:alive";
reg = <2>;
linux,default-trigger = "heartbeat";
};
};
};
@@ -82,13 +82,13 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
touchscreen@2a {
compatible = "eeti,exc3000";
reg = <0x2a>;
interrupt-parent = <&gpio1>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
touchscreen-size-x = <4096>;
touchscreen-size-y = <4096>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
compatible = "eeti,exc3000";
reg = <0x2a>;
interrupt-parent = <&gpio1>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
touchscreen-size-x = <4096>;
touchscreen-size-y = <4096>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
};
};
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/sis,9200-ts.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SiS 9200 Family I2C Touchscreen Controller
maintainers:
- Mika Penttilä <mpenttil@redhat.com>
allOf:
- $ref: touchscreen.yaml#
properties:
compatible:
const: sis,9200-ts
reg:
maxItems: 1
interrupts:
maxItems: 1
attn-gpios:
maxItems: 1
description: GPIO pin used as the attention line
reset-gpios:
maxItems: 1
description: GPIO pin used to reset the controller
wakeup-source: true
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@5c {
compatible = "sis,9200-ts";
reg = <0x5c>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sis>;
interrupt-parent = <&gpio3>;
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
attn-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
};
};
@@ -1,31 +0,0 @@
* SiS I2C Multiple Touch Controller
Required properties:
- compatible: must be "sis,9200-ts"
- reg: i2c slave address
- interrupts: touch controller interrupt (see interrupt
binding [0])
Optional properties:
- 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]).
- attn-gpios: the gpio pin used as attention line
- reset-gpios: the gpio pin used to reset the controller
- wakeup-source: touchscreen can be used as a wakeup source
[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
[1]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
Example:
sis9255@5c {
compatible = "sis,9200-ts";
reg = <0x5c>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sis>;
interrupt-parent = <&gpio3>;
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
irq-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
};
@@ -70,11 +70,11 @@ examples:
#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>;
compatible = "ti,tsc2007";
reg = <0x49>;
interrupt-parent = <&gpio4>;
interrupts = <0x0 0x8>;
gpios = <&gpio4 0 0>;
ti,x-plate-ohms = <180>;
};
};
+1 -1
View File
@@ -25607,7 +25607,7 @@ SIS I2C TOUCHSCREEN DRIVER
M: Mika Penttilä <mpenttil@redhat.com>
L: linux-input@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/input/touchscreen/sis_i2c.txt
F: Documentation/devicetree/bindings/input/touchscreen/sis,9200-ts.yaml
F: drivers/input/touchscreen/sis_i2c.c
SIS USB2VGA DRIVER
+2 -3
View File
@@ -126,9 +126,8 @@ EXPORT_SYMBOL(input_mt_destroy_slots);
*
* Reports a contact via ABS_MT_TRACKING_ID, and optionally
* ABS_MT_TOOL_TYPE. If active is true and the slot is currently
* inactive, or if the tool type is changed, a new tracking id is
* assigned to the slot. The tool type is only reported if the
* corresponding absbit field is set.
* inactive, a new tracking id is assigned to the slot. The tool
* type is only reported if the corresponding absbit field is set.
*
* Returns true if contact is active.
*/
+10 -2
View File
@@ -391,7 +391,7 @@ void input_handle_event(struct input_dev *dev,
void input_event(struct input_dev *dev,
unsigned int type, unsigned int code, int value)
{
if (is_event_supported(type, dev->evbit, EV_MAX)) {
if (type == EV_SYN || is_event_supported(type, dev->evbit, EV_MAX)) {
guard(spinlock_irqsave)(&dev->event_lock);
input_handle_event(dev, type, code, value);
}
@@ -415,7 +415,7 @@ void input_inject_event(struct input_handle *handle,
struct input_dev *dev = handle->dev;
struct input_handle *grab;
if (is_event_supported(type, dev->evbit, EV_MAX)) {
if (type == EV_SYN || is_event_supported(type, dev->evbit, EV_MAX)) {
guard(spinlock_irqsave)(&dev->event_lock);
guard(rcu)();
@@ -2396,6 +2396,14 @@ int input_register_device(struct input_dev *dev)
}
if (dev->devres_managed) {
if (!dev->dev.parent ||
!devres_find(dev->dev.parent, devm_input_device_release,
devm_input_device_match, dev)) {
dev_err(&dev->dev,
"Parent of managed input device was overridden, refusing to register\n");
return -EINVAL;
}
devres = devres_alloc(devm_input_device_unregister,
sizeof(*devres), GFP_KERNEL);
if (!devres)
+8 -21
View File
@@ -58,6 +58,8 @@ static void dc_pad_callback(struct mapleq *mq)
input_report_abs(dev, ABS_Y, res[13]);
input_report_abs(dev, ABS_RX, res[14]);
input_report_abs(dev, ABS_RY, res[15]);
input_sync(dev);
}
static int dc_pad_open(struct input_dev *dev)
@@ -74,8 +76,7 @@ static void dc_pad_close(struct input_dev *dev)
{
struct dc_pad *pad = dev_get_platdata(&dev->dev);
maple_getcond_callback(pad->mdev, dc_pad_callback, 0,
MAPLE_FUNC_CONTROLLER);
maple_getcond_callback(pad->mdev, NULL, 0, MAPLE_FUNC_CONTROLLER);
}
/* allow the controller to be used */
@@ -96,7 +97,6 @@ static int probe_maple_controller(struct device *dev)
};
struct maple_device *mdev = to_maple_dev(dev);
struct maple_driver *mdrv = to_maple_driver(dev->driver);
int i, error;
struct dc_pad *pad;
struct input_dev *idev;
@@ -118,26 +118,19 @@ static int probe_maple_controller(struct device *dev)
idev->close = dc_pad_close;
for (i = 0; i < 32; i++) {
if (data & (1 << i)) {
if (data & BIT(i)) {
if (btn_bit[i] >= 0)
__set_bit(btn_bit[i], idev->keybit);
else if (abs_bit[i] >= 0)
__set_bit(abs_bit[i], idev->absbit);
else if (abs_bit[i] >= ABS_X && abs_bit[i] <= ABS_BRAKE)
input_set_abs_params(idev, abs_bit[i], 0, 255, 0, 0);
else if (abs_bit[i] >= ABS_HAT0X && abs_bit[i] <= ABS_HAT3Y)
input_set_abs_params(idev, abs_bit[i], -1, 1, 0, 0);
}
}
if (idev->keybit[BIT_WORD(BTN_JOYSTICK)])
idev->evbit[0] |= BIT_MASK(EV_KEY);
if (idev->absbit[0])
idev->evbit[0] |= BIT_MASK(EV_ABS);
for (i = ABS_X; i <= ABS_BRAKE; i++)
input_set_abs_params(idev, i, 0, 255, 0, 0);
for (i = ABS_HAT0X; i <= ABS_HAT3Y; i++)
input_set_abs_params(idev, i, 1, -1, 0, 0);
idev->dev.platform_data = pad;
idev->dev.parent = &mdev->dev;
idev->name = mdev->product_name;
@@ -146,15 +139,11 @@ static int probe_maple_controller(struct device *dev)
error = input_register_device(idev);
if (error)
goto fail;
mdev->driver = mdrv;
return 0;
fail:
input_free_device(idev);
kfree(pad);
maple_set_drvdata(mdev, NULL);
return error;
}
@@ -163,9 +152,7 @@ static int remove_maple_controller(struct device *dev)
struct maple_device *mdev = to_maple_dev(dev);
struct dc_pad *pad = maple_get_drvdata(mdev);
mdev->callback = NULL;
input_unregister_device(pad->dev);
maple_set_drvdata(mdev, NULL);
kfree(pad);
return 0;
+1
View File
@@ -408,6 +408,7 @@ static const struct xpad_device {
{ 0x3537, 0x1004, "GameSir T4 Kaleid", 0, XTYPE_XBOX360 },
{ 0x3537, 0x100f, "GameSir Nova 2 Lite", 0, XTYPE_XBOX360 },
{ 0x3537, 0x1010, "GameSir G7 SE", 0, XTYPE_XBOXONE },
{ 0x3537, 0x1040, "GameSir Nova Lite", 0, XTYPE_XBOX360 },
{ 0x3651, 0x1000, "CRKD SG", 0, XTYPE_XBOX360 },
{ 0x366c, 0x0005, "ByoWave Proteus Controller", MAP_SHARE_BUTTON, XTYPE_XBOXONE, FLAG_DELAY_INIT },
{ 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX },
-1
View File
@@ -104,7 +104,6 @@ static int adp5520_keys_probe(struct platform_device *pdev)
input->name = pdev->name;
input->phys = "adp5520-keys/input0";
input->dev.parent = &pdev->dev;
input->id.bustype = BUS_I2C;
input->id.vendor = 0x0001;
+1 -3
View File
@@ -1259,7 +1259,6 @@ applespi_register_touchpad_device(struct applespi_data *applespi,
touchpad_input_dev->name = "Apple SPI Touchpad";
touchpad_input_dev->phys = "applespi/input1";
touchpad_input_dev->dev.parent = &applespi->spi->dev;
touchpad_input_dev->id.bustype = BUS_SPI;
touchpad_input_dev->id.vendor = SYNAPTICS_VENDOR_ID;
touchpad_input_dev->id.product =
@@ -1686,7 +1685,6 @@ static int applespi_probe(struct spi_device *spi)
applespi->keyboard_input_dev->name = "Apple SPI Keyboard";
applespi->keyboard_input_dev->phys = "applespi/input0";
applespi->keyboard_input_dev->dev.parent = &spi->dev;
applespi->keyboard_input_dev->id.bustype = BUS_SPI;
applespi->keyboard_input_dev->evbit[0] =
@@ -1904,7 +1902,7 @@ static int applespi_resume(struct device *dev)
}
static const struct acpi_device_id applespi_acpi_match[] = {
{ "APP000D", 0 },
{ .id = "APP000D" },
{ }
};
MODULE_DEVICE_TABLE(acpi, applespi_acpi_match);
+1 -4
View File
@@ -357,10 +357,7 @@ static void atkbd_calculate_xl_bit(struct atkbd *atkbd, u8 code)
for (i = 0; i < ARRAY_SIZE(xl_table); i++) {
if (!((code ^ xl_table[i]) & 0x7f)) {
if (code & 0x80)
__clear_bit(i, &atkbd->xl_bit);
else
__set_bit(i, &atkbd->xl_bit);
__assign_bit(i, &atkbd->xl_bit, !(code & 0x80));
break;
}
}
-1
View File
@@ -327,7 +327,6 @@ static int bcm_kp_probe(struct platform_device *pdev)
input_dev->name = pdev->name;
input_dev->phys = "keypad/input0";
input_dev->dev.parent = &pdev->dev;
input_dev->open = bcm_kp_open;
input_dev->close = bcm_kp_close;
-1
View File
@@ -130,7 +130,6 @@ static int clps711x_keypad_probe(struct platform_device *pdev)
input_set_drvdata(input, priv);
input->name = pdev->name;
input->dev.parent = dev;
input->id.bustype = BUS_HOST;
input->id.vendor = 0x0001;
input->id.product = 0x0001;
+1 -3
View File
@@ -602,7 +602,6 @@ static int cros_ec_keyb_register_bs(struct cros_ec_keyb *ckdev,
idev->id.bustype = BUS_VIRTUAL;
idev->id.version = 1;
idev->id.product = 0;
idev->dev.parent = dev;
input_set_drvdata(idev, ckdev);
ckdev->bs_idev = idev;
@@ -776,7 +775,6 @@ static int cros_ec_keyb_register_matrix(struct cros_ec_keyb *ckdev)
idev->id.bustype = BUS_VIRTUAL;
idev->id.version = 1;
idev->id.product = 0;
idev->dev.parent = dev;
idev->setkeycode = cros_ec_keyb_setkeycode;
ckdev->ghost_filter = device_property_read_bool(dev, "google,needs-ghost-filter");
@@ -911,7 +909,7 @@ static void cros_ec_keyb_remove(struct platform_device *pdev)
#ifdef CONFIG_ACPI
static const struct acpi_device_id cros_ec_keyb_acpi_match[] = {
{ "GOOG0007", true },
{ .id = "GOOG0007", .driver_data = true },
{ }
};
MODULE_DEVICE_TABLE(acpi, cros_ec_keyb_acpi_match);
+2 -2
View File
@@ -179,8 +179,8 @@ MODULE_DEVICE_TABLE(of, goldfish_events_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id goldfish_events_acpi_match[] = {
{ "GFSH0002", 0 },
{ },
{ .id = "GFSH0002" },
{ }
};
MODULE_DEVICE_TABLE(acpi, goldfish_events_acpi_match);
#endif
-1
View File
@@ -886,7 +886,6 @@ static int gpio_keys_probe(struct platform_device *pdev)
input->name = pdata->name ? : pdev->name;
input->phys = "gpio-keys/input0";
input->dev.parent = dev;
input->open = gpio_keys_open;
input->close = gpio_keys_close;
-1
View File
@@ -458,7 +458,6 @@ static int imx_keypad_probe(struct platform_device *pdev)
/* Init the Input device */
input_dev->name = pdev->name;
input_dev->id.bustype = BUS_HOST;
input_dev->dev.parent = &pdev->dev;
input_dev->open = imx_keypad_open;
input_dev->close = imx_keypad_close;
-1
View File
@@ -113,7 +113,6 @@ static int jornada720_kbd_probe(struct platform_device *pdev)
input_dev->keycodesize = sizeof(unsigned short);
input_dev->keycodemax = ARRAY_SIZE(jornada_std_keymap);
input_dev->id.bustype = BUS_HOST;
input_dev->dev.parent = &pdev->dev;
for (i = 0; i < ARRAY_SIZE(jornadakbd->keymap); i++)
__set_bit(jornadakbd->keymap[i], input_dev->keybit);
-1
View File
@@ -198,7 +198,6 @@ static int lpc32xx_kscan_probe(struct platform_device *pdev)
input->id.version = 0x0100;
input->open = lpc32xx_kscan_open;
input->close = lpc32xx_kscan_close;
input->dev.parent = &pdev->dev;
input_set_capability(input, EV_MSC, MSC_SCAN);
+22 -12
View File
@@ -107,7 +107,7 @@ static void dc_scan_kbd(struct dc_kbd *kbd)
}
ptr = memchr(kbd->old + 2, kbd->new[i], 6);
code = kbd->new[i];
if (code > 3 && ptr) {
if (code > 3 && !ptr) {
keycode = kbd->keycode[code];
if (keycode) {
input_event(dev, EV_MSC, MSC_SCAN, code);
@@ -140,16 +140,32 @@ static void dc_kbd_callback(struct mapleq *mq)
}
}
static int dc_kbd_open(struct input_dev *dev)
{
struct maple_device *mdev = input_get_drvdata(dev);
/* Maple polling is locked to VBLANK - which may be just 50/s */
maple_getcond_callback(mdev, dc_kbd_callback, HZ / 50,
MAPLE_FUNC_KEYBOARD);
return 0;
}
static void dc_kbd_close(struct input_dev *dev)
{
struct maple_device *mdev = input_get_drvdata(dev);
maple_getcond_callback(mdev, NULL, 0, MAPLE_FUNC_KEYBOARD);
}
static int probe_maple_kbd(struct device *dev)
{
struct maple_device *mdev;
struct maple_driver *mdrv;
int i, error;
struct dc_kbd *kbd;
struct input_dev *idev;
mdev = to_maple_dev(dev);
mdrv = to_maple_driver(dev->driver);
kbd = kzalloc_obj(*kbd);
if (!kbd) {
@@ -167,6 +183,7 @@ static int probe_maple_kbd(struct device *dev)
memcpy(kbd->keycode, dc_kbd_keycode, sizeof(kbd->keycode));
maple_set_drvdata(mdev, kbd);
input_set_drvdata(idev, mdev);
idev->name = mdev->product_name;
idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
@@ -175,6 +192,8 @@ static int probe_maple_kbd(struct device *dev)
idev->keycodemax = ARRAY_SIZE(kbd->keycode);
idev->id.bustype = BUS_HOST;
idev->dev.parent = &mdev->dev;
idev->open = dc_kbd_open;
idev->close = dc_kbd_close;
for (i = 0; i < NR_SCANCODES; i++)
__set_bit(dc_kbd_keycode[i], idev->keybit);
@@ -185,17 +204,9 @@ static int probe_maple_kbd(struct device *dev)
error = input_register_device(idev);
if (error)
goto fail_register;
/* Maple polling is locked to VBLANK - which may be just 50/s */
maple_getcond_callback(mdev, dc_kbd_callback, HZ/50,
MAPLE_FUNC_KEYBOARD);
mdev->driver = mdrv;
return error;
fail_register:
maple_set_drvdata(mdev, NULL);
input_free_device(idev);
fail_idev_alloc:
kfree(kbd);
@@ -213,7 +224,6 @@ static int remove_maple_kbd(struct device *dev)
input_unregister_device(kbd->dev);
kfree(kbd);
maple_set_drvdata(mdev, NULL);
return 0;
}
+1 -4
View File
@@ -134,9 +134,6 @@ static void matrix_keypad_scan(struct work_struct *work)
memset(new_state, 0, sizeof(new_state));
for (row = 0; row < keypad->num_row_gpios; row++)
gpiod_direction_input(keypad->row_gpios[row]);
/* assert each column and read the row status out */
for (col = 0; col < keypad->num_col_gpios; col++) {
@@ -443,7 +440,7 @@ static int matrix_keypad_probe(struct platform_device *pdev)
NULL, input_dev);
if (err) {
dev_err(&pdev->dev, "failed to build keymap\n");
return -ENOMEM;
return err;
}
if (!device_property_read_bool(&pdev->dev, "linux,no-autorepeat"))
-1
View File
@@ -198,7 +198,6 @@ static int max7359_probe(struct i2c_client *client)
input_dev->id.bustype = BUS_I2C;
input_dev->open = max7359_open;
input_dev->close = max7359_close;
input_dev->dev.parent = &client->dev;
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
input_dev->keycodesize = sizeof(keypad->keycodes[0]);
-1
View File
@@ -235,7 +235,6 @@ static int mpr_touchkey_probe(struct i2c_client *client)
input_dev->name = "Freescale MPR121 Touchkey";
input_dev->id.bustype = BUS_I2C;
input_dev->dev.parent = dev;
if (device_property_read_bool(dev, "autorepeat"))
__set_bit(EV_REP, input_dev->evbit);
input_set_capability(input_dev, EV_MSC, MSC_SCAN);
-1
View File
@@ -645,7 +645,6 @@ static int pxa27x_keypad_probe(struct platform_device *pdev)
input_dev->id.bustype = BUS_HOST;
input_dev->open = pxa27x_keypad_open;
input_dev->close = pxa27x_keypad_close;
input_dev->dev.parent = &pdev->dev;
input_dev->keycode = keypad->keycodes;
input_dev->keycodesize = sizeof(keypad->keycodes[0]);
-1
View File
@@ -476,7 +476,6 @@ static int qt1050_probe(struct i2c_client *client)
}
input->name = "AT42QT1050 QTouch Sensor";
input->dev.parent = &client->dev;
input->id.bustype = BUS_I2C;
/* Add the keycode */
+4 -5
View File
@@ -179,7 +179,7 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
clk = devm_clk_get_optional_enabled(dev, NULL);
if (IS_ERR(clk))
return dev_err_probe(dev, PTR_ERR(clk),
"Failed to get snvs clock (%pe)\n", clk);
"Failed to get snvs clock\n");
pdata->wakeup = of_property_read_bool(np, "wakeup-source");
@@ -236,14 +236,13 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
pdata->input = input;
platform_set_drvdata(pdev, pdata);
error = devm_request_irq(dev, pdata->irq,
imx_snvs_pwrkey_interrupt,
error = devm_request_irq(dev, pdata->irq, imx_snvs_pwrkey_interrupt,
0, pdev->name, pdev);
if (error)
return dev_err_probe(dev, error, "interrupt not available.\n");
return error;
error = input_register_device(input);
if (error < 0)
if (error)
return dev_err_probe(dev, error, "failed to register input device\n");
device_init_wakeup(dev, pdata->wakeup);
+11 -19
View File
@@ -75,6 +75,8 @@ static int keyscan_start(struct st_keyscan *keypad)
writel(KEYSCAN_CONFIG_ENABLE, keypad->base + KEYSCAN_CONFIG_OFF);
enable_irq(keypad->irq);
return 0;
}
@@ -82,6 +84,8 @@ static void keyscan_stop(struct st_keyscan *keypad)
{
writel(0, keypad->base + KEYSCAN_CONFIG_OFF);
disable_irq(keypad->irq);
clk_disable(keypad->clk);
}
@@ -145,7 +149,6 @@ static int keyscan_probe(struct platform_device *pdev)
input_dev->name = pdev->name;
input_dev->phys = "keyscan-keys/input0";
input_dev->dev.parent = &pdev->dev;
input_dev->open = keyscan_open;
input_dev->close = keyscan_close;
@@ -173,29 +176,18 @@ static int keyscan_probe(struct platform_device *pdev)
return PTR_ERR(keypad_data->base);
keypad_data->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(keypad_data->clk)) {
dev_err(&pdev->dev, "cannot get clock\n");
return PTR_ERR(keypad_data->clk);
}
error = clk_enable(keypad_data->clk);
if (error) {
dev_err(&pdev->dev, "failed to enable clock\n");
return error;
}
keyscan_stop(keypad_data);
if (IS_ERR(keypad_data->clk))
return dev_err_probe(&pdev->dev, PTR_ERR(keypad_data->clk),
"cannot get clock\n");
keypad_data->irq = platform_get_irq(pdev, 0);
if (keypad_data->irq < 0)
return -EINVAL;
return keypad_data->irq;
error = devm_request_irq(&pdev->dev, keypad_data->irq, keyscan_isr, 0,
pdev->name, keypad_data);
if (error) {
dev_err(&pdev->dev, "failed to request IRQ\n");
error = devm_request_irq(&pdev->dev, keypad_data->irq, keyscan_isr,
IRQF_NO_AUTOEN, pdev->name, keypad_data);
if (error)
return error;
}
error = input_register_device(input_dev);
if (error) {
-1
View File
@@ -361,7 +361,6 @@ static int stmpe_keypad_probe(struct platform_device *pdev)
input->name = "STMPE keypad";
input->id.bustype = BUS_I2C;
input->dev.parent = &pdev->dev;
error = matrix_keypad_parse_properties(&pdev->dev, &rows, &cols);
if (error)
-1
View File
@@ -405,7 +405,6 @@ static int tc3589x_keypad_probe(struct platform_device *pdev)
input->id.bustype = BUS_I2C;
input->name = pdev->name;
input->dev.parent = &pdev->dev;
input->open = tc3589x_keypad_open;
input->close = tc3589x_keypad_close;
-1
View File
@@ -641,7 +641,6 @@ static int tegra_kbc_probe(struct platform_device *pdev)
kbc->idev->name = pdev->name;
kbc->idev->id.bustype = BUS_HOST;
kbc->idev->dev.parent = &pdev->dev;
kbc->idev->open = tegra_kbc_open;
kbc->idev->close = tegra_kbc_close;
+7
View File
@@ -35,6 +35,13 @@ static bool matrix_keypad_map_key(struct input_dev *input_dev,
return false;
}
if (code > KEY_MAX) {
dev_err(input_dev->dev.parent,
"%s: invalid keycode %u in keymap entry 0x%x\n",
__func__, code, key);
return false;
}
keymap[MATRIX_SCAN_CODE(row, col, row_shift)] = code;
__set_bit(code, input_dev->keybit);
-1
View File
@@ -85,7 +85,6 @@ static int pm860x_onkey_probe(struct platform_device *pdev)
info->idev->name = "88pm860x_on";
info->idev->phys = "88pm860x_on/input0";
info->idev->id.bustype = BUS_I2C;
info->idev->dev.parent = &pdev->dev;
info->idev->evbit[0] = BIT_MASK(EV_KEY);
info->idev->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER);
-1
View File
@@ -77,7 +77,6 @@ static int ab8500_ponkey_probe(struct platform_device *pdev)
ponkey->irq_dbr = irq_dbr;
input->name = "AB8500 POn(PowerOn) Key";
input->dev.parent = &pdev->dev;
input_set_capability(input, EV_KEY, KEY_POWER);
-4
View File
@@ -1046,7 +1046,6 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
input->id.product = ad714x->product;
input->id.version = ad714x->version;
input->name = "ad714x_captouch_slider";
input->dev.parent = dev;
error = input_register_device(input);
if (error)
@@ -1076,7 +1075,6 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
input->id.product = ad714x->product;
input->id.version = ad714x->version;
input->name = "ad714x_captouch_wheel";
input->dev.parent = dev;
error = input_register_device(input);
if (error)
@@ -1109,7 +1107,6 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
input->id.product = ad714x->product;
input->id.version = ad714x->version;
input->name = "ad714x_captouch_pad";
input->dev.parent = dev;
error = input_register_device(input);
if (error)
@@ -1139,7 +1136,6 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
input->id.product = ad714x->product;
input->id.version = ad714x->version;
input->name = "ad714x_captouch_button";
input->dev.parent = dev;
error = input_register_device(input);
if (error)
-1
View File
@@ -113,7 +113,6 @@ static int ariel_pwrbutton_probe(struct spi_device *spi)
if (!priv->input)
return -ENOMEM;
priv->input->name = "Power Button";
priv->input->dev.parent = &spi->dev;
input_set_capability(priv->input, EV_KEY, KEY_POWER);
error = input_register_device(priv->input);
if (error) {
+2 -2
View File
@@ -128,8 +128,8 @@ static void atlas_acpi_button_remove(struct platform_device *pdev)
}
static const struct acpi_device_id atlas_device_ids[] = {
{ "ASIM0000" },
{ "" }
{ .id = "ASIM0000" },
{ }
};
MODULE_DEVICE_TABLE(acpi, atlas_device_ids);
-1
View File
@@ -241,7 +241,6 @@ static int axp20x_pek_probe_input_device(struct axp20x_pek *axp20x_pek,
idev->name = "axp20x-pek";
idev->phys = "m1kbd/input2";
idev->dev.parent = &pdev->dev;
input_set_capability(idev, EV_KEY, KEY_POWER);
-1
View File
@@ -1218,7 +1218,6 @@ static int da7280_probe(struct i2c_client *client)
}
input_dev->name = "da7280-haptic";
input_dev->dev.parent = client->dev.parent;
input_dev->open = da7280_haptic_open;
input_dev->close = da7280_haptic_close;
input_set_drvdata(input_dev, haptics);
+1 -1
View File
@@ -640,7 +640,7 @@ MODULE_DEVICE_TABLE(i2c, drv260x_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id drv260x_acpi_match[] = {
{ "DRV2604" },
{ .id = "DRV2604" },
{ }
};
MODULE_DEVICE_TABLE(acpi, drv260x_acpi_match);
-1
View File
@@ -180,7 +180,6 @@ static int drv2665_probe(struct i2c_client *client)
}
haptics->input_dev->name = "drv2665:haptics";
haptics->input_dev->dev.parent = client->dev.parent;
haptics->input_dev->close = drv2665_close;
input_set_drvdata(haptics->input_dev, haptics);
input_set_capability(haptics->input_dev, EV_FF, FF_RUMBLE);
-1
View File
@@ -357,7 +357,6 @@ static int drv2667_probe(struct i2c_client *client)
}
haptics->input_dev->name = "drv2667:haptics";
haptics->input_dev->dev.parent = client->dev.parent;
haptics->input_dev->close = drv2667_close;
input_set_drvdata(haptics->input_dev, haptics);
input_set_capability(haptics->input_dev, EV_FF, FF_RUMBLE);
-1
View File
@@ -78,7 +78,6 @@ static int e3x0_button_probe(struct platform_device *pdev)
input->name = "NI Ettus Research USRP E3x0 Button Driver";
input->phys = "e3x0_button/input0";
input->dev.parent = &pdev->dev;
input_set_capability(input, EV_KEY, KEY_POWER);
-1
View File
@@ -356,7 +356,6 @@ static int max77693_haptic_probe(struct platform_device *pdev)
haptic->input_dev->name = "max77693-haptic";
haptic->input_dev->id.version = 1;
haptic->input_dev->dev.parent = &pdev->dev;
haptic->input_dev->open = max77693_haptic_open;
haptic->input_dev->close = max77693_haptic_close;
input_set_drvdata(haptic->input_dev, haptic);
-1
View File
@@ -96,7 +96,6 @@ static int max8925_onkey_probe(struct platform_device *pdev)
input->name = "max8925_on";
input->phys = "max8925_on/input0";
input->id.bustype = BUS_I2C;
input->dev.parent = &pdev->dev;
input_set_capability(input, EV_KEY, KEY_POWER);
error = devm_request_threaded_irq(&pdev->dev, irq[0], NULL,
-1
View File
@@ -202,7 +202,6 @@ static int pwm_vibrator_probe(struct platform_device *pdev)
vibrator->input->name = "pwm-vibrator";
vibrator->input->id.bustype = BUS_HOST;
vibrator->input->dev.parent = &pdev->dev;
vibrator->input->close = pwm_vibrator_close;
input_set_drvdata(vibrator->input, vibrator);
-1
View File
@@ -179,7 +179,6 @@ static int regulator_haptic_probe(struct platform_device *pdev)
haptic->input_dev = input_dev;
haptic->input_dev->name = "regulator-haptic";
haptic->input_dev->dev.parent = &pdev->dev;
haptic->input_dev->close = regulator_haptic_close;
input_set_drvdata(haptic->input_dev, haptic);
input_set_capability(haptic->input_dev, EV_FF, FF_RUMBLE);
-1
View File
@@ -57,7 +57,6 @@ static int retu_pwrbutton_probe(struct platform_device *pdev)
return -ENOMEM;
idev->name = "retu-pwrbutton";
idev->dev.parent = &pdev->dev;
input_set_capability(idev, EV_KEY, KEY_POWER);
input_set_drvdata(idev, rdev);
+6 -6
View File
@@ -603,14 +603,14 @@ static const struct soc_device_data soc_device_MSHW0040 = {
};
static const struct acpi_device_id soc_button_acpi_match[] = {
{ "PNP0C40", (unsigned long)&soc_device_PNP0C40 },
{ "INT33D3", (unsigned long)&soc_device_INT33D3 },
{ "ID9001", (unsigned long)&soc_device_INT33D3 },
{ "ACPI0011", 0 },
{ .id = "PNP0C40", .driver_data = (unsigned long)&soc_device_PNP0C40 },
{ .id = "INT33D3", .driver_data = (unsigned long)&soc_device_INT33D3 },
{ .id = "ID9001", .driver_data = (unsigned long)&soc_device_INT33D3 },
{ .id = "ACPI0011" },
/* Microsoft Surface Devices (3th, 5th and 6th generation) */
{ "MSHW0028", (unsigned long)&soc_device_MSHW0028 },
{ "MSHW0040", (unsigned long)&soc_device_MSHW0040 },
{ .id = "MSHW0028", .driver_data = (unsigned long)&soc_device_MSHW0028 },
{ .id = "MSHW0040", .driver_data = (unsigned long)&soc_device_MSHW0040 },
{ }
};
-1
View File
@@ -105,7 +105,6 @@ static int tps6521x_pb_probe(struct platform_device *pdev)
snprintf(pwr->phys, sizeof(pwr->phys), "%s/input0",
pwr->data->name);
idev->phys = pwr->phys;
idev->dev.parent = dev;
idev->id.bustype = BUS_I2C;
input_set_capability(idev, EV_KEY, KEY_POWER);
-1
View File
@@ -90,7 +90,6 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
input_set_capability(pwr, EV_KEY, KEY_POWER);
pwr->name = "twl4030_pwrbutton";
pwr->phys = "twl4030_pwrbutton/input0";
pwr->dev.parent = &pdev->dev;
err = devm_request_threaded_irq(&pdev->dev, irq, NULL, powerbutton_irq,
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
-1
View File
@@ -96,7 +96,6 @@ static int wm831x_on_probe(struct platform_device *pdev)
wm831x_on->dev->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER);
wm831x_on->dev->name = "wm831x_on";
wm831x_on->dev->phys = "wm831x_on/input0";
wm831x_on->dev->dev.parent = &pdev->dev;
ret = request_threaded_irq(irq, NULL, wm831x_on_irq,
IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+3 -4
View File
@@ -449,7 +449,6 @@ static int cyapa_create_input_dev(struct cyapa *cyapa)
input->id.bustype = BUS_I2C;
input->id.version = 1;
input->id.product = 0; /* Means any product in eventcomm. */
input->dev.parent = &cyapa->client->dev;
input->open = cyapa_open;
input->close = cyapa_close;
@@ -1463,9 +1462,9 @@ MODULE_DEVICE_TABLE(i2c, cyapa_id_table);
#ifdef CONFIG_ACPI
static const struct acpi_device_id cyapa_acpi_id[] = {
{ "CYAP0000", 0 }, /* Gen3 trackpad with 0x67 I2C address. */
{ "CYAP0001", 0 }, /* Gen5 trackpad with 0x24 I2C address. */
{ "CYAP0002", 0 }, /* Gen6 trackpad with 0x24 I2C address. */
{ .id = "CYAP0000" }, /* Gen3 trackpad with 0x67 I2C address. */
{ .id = "CYAP0001" }, /* Gen5 trackpad with 0x24 I2C address. */
{ .id = "CYAP0002" }, /* Gen6 trackpad with 0x24 I2C address. */
{ }
};
MODULE_DEVICE_TABLE(acpi, cyapa_acpi_id);
+1 -9
View File
@@ -60,15 +60,13 @@ static void dc_mouse_close(struct input_dev *dev)
{
struct dc_mouse *mse = input_get_drvdata(dev);
maple_getcond_callback(mse->mdev, dc_mouse_callback, 0,
MAPLE_FUNC_MOUSE);
maple_getcond_callback(mse->mdev, NULL, 0, MAPLE_FUNC_MOUSE);
}
/* allow the mouse to be used */
static int probe_maple_mouse(struct device *dev)
{
struct maple_device *mdev = to_maple_dev(dev);
struct maple_driver *mdrv = to_maple_driver(dev->driver);
int error;
struct input_dev *input_dev;
struct dc_mouse *mse;
@@ -103,14 +101,10 @@ static int probe_maple_mouse(struct device *dev)
error = input_register_device(input_dev);
if (error)
goto fail_register;
mdev->driver = mdrv;
return error;
fail_register:
input_free_device(input_dev);
maple_set_drvdata(mdev, NULL);
fail_nomem:
kfree(mse);
fail:
@@ -122,9 +116,7 @@ static int remove_maple_mouse(struct device *dev)
struct maple_device *mdev = to_maple_dev(dev);
struct dc_mouse *mse = maple_get_drvdata(mdev);
mdev->callback = NULL;
input_unregister_device(mse->dev);
maple_set_drvdata(mdev, NULL);
kfree(mse);
return 0;
+147 -146
View File
@@ -1,6 +1,4 @@
/*
* drivers/input/serio/gscps2.c
*
* Copyright (c) 2004-2006 Helge Deller <deller@gmx.de>
* Copyright (c) 2002 Laurent Canet <canetl@esiee.fr>
* Copyright (c) 2002 Thibaut Varene <varenet@parisc-linux.org>
@@ -28,6 +26,7 @@
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/property.h>
#include <linux/rcupdate.h>
#include <linux/serio.h>
#include <asm/irq.h>
@@ -37,16 +36,10 @@ MODULE_AUTHOR("Laurent Canet <canetl@esiee.fr>, Thibaut Varene <varenet@parisc-l
MODULE_DESCRIPTION("HP GSC PS2 port driver");
MODULE_LICENSE("GPL");
#define PFX "gscps2.c: "
/*
* Driver constants
*/
/* various constants */
#define ENABLE 1
#define DISABLE 0
#define GSC_DINO_OFFSET 0x0800 /* offset for DINO controller versus LASI one */
/* PS/2 IO port offsets */
@@ -77,23 +70,21 @@ MODULE_LICENSE("GPL");
#define GSC_ID_KEYBOARD 0 /* device ID values */
#define GSC_ID_MOUSE 1
#ifndef CONFIG_SERIO_GSCPS2_RDI_KEYCODES
# define CONFLICT(x, y) x
#else
# define CONFLICT(x, y) y
#endif
#define RDI_CONFLICT(x, y) \
((x) * !IS_ENABLED(CONFIG_SERIO_GSCPS2_RDI_KEYCODES) + \
(y) * IS_ENABLED(CONFIG_SERIO_GSCPS2_RDI_KEYCODES))
/*
* Sadly RDI (Tadpole) decided to ship a different keyboard layout
* than HP for their PS/2 laptop keyboard which leads to conflicting
* keycodes between a normal HP PS/2 keyboard and a RDI PrecisionBook.
* HP: RDI:
* HP: RDI:
*/
#define C_07 CONFLICT(KEY_F12, KEY_F1)
#define C_11 CONFLICT(KEY_LEFTALT, KEY_LEFTCTRL)
#define C_14 CONFLICT(KEY_LEFTCTRL, KEY_CAPSLOCK)
#define C_58 CONFLICT(KEY_CAPSLOCK, KEY_RIGHTCTRL)
#define C_61 CONFLICT(KEY_102ND, KEY_LEFT)
#define C_07 RDI_CONFLICT(KEY_F12, KEY_F1)
#define C_11 RDI_CONFLICT(KEY_LEFTALT, KEY_LEFTCTRL)
#define C_14 RDI_CONFLICT(KEY_LEFTCTRL, KEY_CAPSLOCK)
#define C_58 RDI_CONFLICT(KEY_CAPSLOCK, KEY_RIGHTCTRL)
#define C_61 RDI_CONFLICT(KEY_102ND, KEY_LEFT)
/*
* Special keycode value recognized by atkbd (ATKBD_KEY_NULL) to silently
@@ -188,8 +179,6 @@ static const struct software_node gscps2_keyboard_node = {
.properties = gscps2_props,
};
static irqreturn_t gscps2_interrupt(int irq, void *dev);
#define BUFFER_SIZE 0x0f
/* GSC PS/2 port device struct */
@@ -197,33 +186,35 @@ struct gscps2port {
struct list_head node;
struct parisc_device *padev;
struct serio *port;
spinlock_t lock;
spinlock_t lock; /* serializes HW access */
char __iomem *addr;
u8 act, append; /* position in buffer[] */
struct {
u8 data;
u8 str;
} buffer[BUFFER_SIZE+1];
} buffer[BUFFER_SIZE + 1];
int id;
};
static DEFINE_SPINLOCK(ps2port_list_lock);
static LIST_HEAD(ps2port_list);
/*
* Various HW level routines
*/
#define gscps2_readb_input(x) readb((x)+GSC_RCVDATA)
#define gscps2_readb_control(x) readb((x)+GSC_CONTROL)
#define gscps2_readb_status(x) readb((x)+GSC_STATUS)
#define gscps2_writeb_control(x, y) writeb((x), (y)+GSC_CONTROL)
#define gscps2_readb_input(x) readb((x) + GSC_RCVDATA)
#define gscps2_readb_control(x) readb((x) + GSC_CONTROL)
#define gscps2_readb_status(x) readb((x) + GSC_STATUS)
#define gscps2_writeb_control(x, y) writeb((x), (y) + GSC_CONTROL)
/*
* wait_TBE() - wait for Transmit Buffer Empty
*/
static int wait_TBE(char __iomem *addr)
{
int timeout = 25000; /* device is expected to react within 250 msec */
while (gscps2_readb_status(addr) & GSC_STAT_TBNE) {
if (!--timeout)
return 0; /* This should not happen */
@@ -232,16 +223,117 @@ static int wait_TBE(char __iomem *addr)
return 1;
}
/*
* gscps2_flush() - flush the receive buffer
*/
static void gscps2_flush(struct gscps2port *ps2port)
{
lockdep_assert_held(&ps2port->lock);
while (gscps2_readb_status(ps2port->addr) & GSC_STAT_RBNE)
gscps2_readb_input(ps2port->addr);
ps2port->act = ps2port->append = 0;
ps2port->act = 0;
ps2port->append = 0;
}
static bool gscps2_read_data(struct gscps2port *ps2port)
{
bool read_any = false;
u8 status;
guard(spinlock_irqsave)(&ps2port->lock);
do {
status = gscps2_readb_status(ps2port->addr);
if (!(status & GSC_STAT_RBNE))
break;
read_any = true;
ps2port->buffer[ps2port->append].str = status;
ps2port->buffer[ps2port->append].data =
gscps2_readb_input(ps2port->addr);
ps2port->append = (ps2port->append + 1) & BUFFER_SIZE;
} while (true);
return read_any;
}
static bool gscps2_report_data(struct gscps2port *ps2port)
{
unsigned int rxflags;
u8 data, status;
while (true) {
/*
* Did new data arrived while we read existing data ?
* If yes, exit now and let the new irq handler start
* over again.
*/
if (gscps2_readb_status(ps2port->addr) & GSC_STAT_CMPINTR)
return true;
scoped_guard(spinlock_irqsave, &ps2port->lock) {
if (ps2port->act == ps2port->append)
return false;
status = ps2port->buffer[ps2port->act].str;
data = ps2port->buffer[ps2port->act].data;
ps2port->act = (ps2port->act + 1) & BUFFER_SIZE;
}
rxflags = ((status & GSC_STAT_TERR) ? SERIO_TIMEOUT : 0) |
((status & GSC_STAT_PERR) ? SERIO_PARITY : 0);
serio_interrupt(ps2port->port, data, rxflags);
}
}
static DEFINE_SPINLOCK(gscps2_interrupt_lock);
/**
* gscps2_interrupt() - Interruption service routine
* @irq: interrupt number which triggered (unused)
* @dev: device pointer (unused)
*
* This function reads received PS/2 bytes and processes them on
* all interfaces.
* The problematic part here is, that the keyboard and mouse PS/2 port
* share the same interrupt and it's not possible to send data if any
* one of them holds input data. To solve this problem we try to receive
* the data as fast as possible and handle the reporting to the upper layer
* later.
*/
static irqreturn_t gscps2_interrupt(int irq, void *dev)
{
struct gscps2port *ps2port;
bool handled = false;
bool more_data;
ACQUIRE(spinlock_irqsave_try, lock)(&gscps2_interrupt_lock);
if (ACQUIRE_ERR(spinlock_irqsave_try, &lock))
return IRQ_NONE;
guard(rcu)();
do {
more_data = false;
list_for_each_entry_rcu(ps2port, &ps2port_list, node) {
if (gscps2_read_data(ps2port))
handled = true;
}
/* all data was read from the ports - now report the data to upper layer */
list_for_each_entry_rcu(ps2port, &ps2port_list, node) {
if (gscps2_report_data(ps2port)) {
/* More data ready - restart loop to read new data */
more_data = true;
break;
}
}
} while (more_data);
return IRQ_RETVAL(handled);
}
/*
@@ -249,38 +341,28 @@ static void gscps2_flush(struct gscps2port *ps2port)
*
* returns 1 on success, 0 on error
*/
static inline int gscps2_writeb_output(struct gscps2port *ps2port, u8 data)
{
char __iomem *addr = ps2port->addr;
if (!wait_TBE(addr)) {
printk(KERN_DEBUG PFX "timeout - could not write byte %#x\n", data);
dev_dbg(&ps2port->padev->dev, "timeout - could not write byte %#x\n", data);
return 0;
}
while (gscps2_readb_status(addr) & GSC_STAT_RBNE)
/* wait */;
cpu_relax();
scoped_guard(spinlock_irqsave, &ps2port->lock)
writeb(data, addr+GSC_XMTDATA);
/* this is ugly, but due to timing of the port it seems to be necessary. */
mdelay(6);
/* make sure any received data is returned as fast as possible */
/* this is important e.g. when we set the LEDs on the keyboard */
gscps2_interrupt(0, NULL);
writeb(data, addr + GSC_XMTDATA);
return 1;
}
/*
* gscps2_enable() - enables or disables the port
*/
static void gscps2_enable(struct gscps2port *ps2port, int enable)
static void gscps2_enable(struct gscps2port *ps2port, bool enable)
{
u8 data;
@@ -296,13 +378,13 @@ static void gscps2_enable(struct gscps2port *ps2port, int enable)
}
wait_TBE(ps2port->addr);
gscps2_flush(ps2port);
scoped_guard(spinlock_irqsave, &ps2port->lock)
gscps2_flush(ps2port);
}
/*
* gscps2_reset() - resets the PS/2 port
*/
static void gscps2_reset(struct gscps2port *ps2port)
{
/* reset the interface */
@@ -312,97 +394,15 @@ static void gscps2_reset(struct gscps2port *ps2port)
gscps2_flush(ps2port);
}
static LIST_HEAD(ps2port_list);
static void gscps2_read_data(struct gscps2port *ps2port)
{
u8 status;
do {
status = gscps2_readb_status(ps2port->addr);
if (!(status & GSC_STAT_RBNE))
break;
ps2port->buffer[ps2port->append].str = status;
ps2port->buffer[ps2port->append].data =
gscps2_readb_input(ps2port->addr);
ps2port->append = (ps2port->append + 1) & BUFFER_SIZE;
} while (true);
}
static bool gscps2_report_data(struct gscps2port *ps2port)
{
unsigned int rxflags;
u8 data, status;
while (ps2port->act != ps2port->append) {
/*
* Did new data arrived while we read existing data ?
* If yes, exit now and let the new irq handler start
* over again.
*/
if (gscps2_readb_status(ps2port->addr) & GSC_STAT_CMPINTR)
return true;
status = ps2port->buffer[ps2port->act].str;
data = ps2port->buffer[ps2port->act].data;
ps2port->act = (ps2port->act + 1) & BUFFER_SIZE;
rxflags = ((status & GSC_STAT_TERR) ? SERIO_TIMEOUT : 0 ) |
((status & GSC_STAT_PERR) ? SERIO_PARITY : 0 );
serio_interrupt(ps2port->port, data, rxflags);
}
return false;
}
/**
* gscps2_interrupt() - Interruption service routine
* @irq: interrupt number which triggered (unused)
* @dev: device pointer (unused)
*
* This function reads received PS/2 bytes and processes them on
* all interfaces.
* The problematic part here is, that the keyboard and mouse PS/2 port
* share the same interrupt and it's not possible to send data if any
* one of them holds input data. To solve this problem we try to receive
* the data as fast as possible and handle the reporting to the upper layer
* later.
*/
static irqreturn_t gscps2_interrupt(int irq, void *dev)
{
struct gscps2port *ps2port;
list_for_each_entry(ps2port, &ps2port_list, node) {
guard(spinlock_irqsave)(&ps2port->lock);
gscps2_read_data(ps2port);
} /* list_for_each_entry */
/* all data was read from the ports - now report the data to upper layer */
list_for_each_entry(ps2port, &ps2port_list, node) {
if (gscps2_report_data(ps2port)) {
/* More data ready - break early to restart interrupt */
break;
}
}
return IRQ_HANDLED;
}
/*
* gscps2_write() - send a byte out through the aux interface.
*/
static int gscps2_write(struct serio *port, unsigned char data)
{
struct gscps2port *ps2port = port->port_data;
if (!gscps2_writeb_output(ps2port, data)) {
printk(KERN_DEBUG PFX "sending byte %#x failed.\n", data);
dev_dbg(&ps2port->padev->dev, "sending byte %#x failed.\n", data);
return -1;
}
return 0;
@@ -412,15 +412,17 @@ static int gscps2_write(struct serio *port, unsigned char data)
* gscps2_open() is called when a port is opened by the higher layer.
* It resets and enables the port.
*/
static int gscps2_open(struct serio *port)
{
struct gscps2port *ps2port = port->port_data;
gscps2_reset(ps2port);
scoped_guard(spinlock_irqsave, &ps2port_list_lock)
list_add_tail_rcu(&ps2port->node, &ps2port_list);
/* enable it */
gscps2_enable(ps2port, ENABLE);
gscps2_enable(ps2port, true);
gscps2_interrupt(0, NULL);
@@ -430,11 +432,16 @@ static int gscps2_open(struct serio *port)
/*
* gscps2_close() disables the port
*/
static void gscps2_close(struct serio *port)
{
struct gscps2port *ps2port = port->port_data;
gscps2_enable(ps2port, DISABLE);
gscps2_enable(ps2port, false);
scoped_guard(spinlock_irqsave, &ps2port_list_lock)
list_del_rcu(&ps2port->node);
synchronize_rcu();
}
/**
@@ -443,7 +450,6 @@ static void gscps2_close(struct serio *port)
*
* @return: success/error report
*/
static int __init gscps2_probe(struct parisc_device *dev)
{
struct gscps2port *ps2port;
@@ -469,6 +475,7 @@ static int __init gscps2_probe(struct parisc_device *dev)
ps2port->port = serio;
ps2port->padev = dev;
INIT_LIST_HEAD(&ps2port->node);
ps2port->addr = ioremap(hpa, GSC_STATUS + 4);
if (!ps2port->addr) {
ret = -ENOMEM;
@@ -494,8 +501,8 @@ static int __init gscps2_probe(struct parisc_device *dev)
goto fail_miserably;
if (ps2port->id != GSC_ID_KEYBOARD && ps2port->id != GSC_ID_MOUSE) {
printk(KERN_WARNING PFX "Unsupported PS/2 port at 0x%08lx (id=%d) ignored\n",
hpa, ps2port->id);
dev_warn(&dev->dev, "Unsupported PS/2 port at 0x%08lx (id=%d) ignored\n",
hpa, ps2port->id);
ret = -ENODEV;
goto fail;
}
@@ -524,8 +531,6 @@ static int __init gscps2_probe(struct parisc_device *dev)
serio_register_port(ps2port->port);
list_add_tail(&ps2port->node, &ps2port_list);
return 0;
fail:
@@ -552,7 +557,6 @@ fail_nomem:
*
* @return: success/error report
*/
static void __exit gscps2_remove(struct parisc_device *dev)
{
struct gscps2port *ps2port = dev_get_drvdata(&dev->dev);
@@ -562,17 +566,15 @@ static void __exit gscps2_remove(struct parisc_device *dev)
serio_unregister_port(ps2port->port);
free_irq(dev->irq, ps2port);
gscps2_flush(ps2port);
list_del(&ps2port->node);
scoped_guard(spinlock_irqsave, &ps2port->lock)
gscps2_flush(ps2port);
iounmap(ps2port->addr);
#if 0
release_mem_region(dev->hpa, GSC_STATUS + 4);
#endif
dev_set_drvdata(&dev->dev, NULL);
kfree(ps2port);
}
static const struct parisc_device_id gscps2_device_tbl[] __initconst = {
{ HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00084 }, /* LASI PS/2 */
#ifdef DINO_TESTED
@@ -610,6 +612,5 @@ static void __exit gscps2_exit(void)
software_node_unregister(&gscps2_keyboard_node);
}
module_init(gscps2_init);
module_exit(gscps2_exit);
+34
View File
@@ -8,6 +8,7 @@
#include <linux/delay.h>
#include <linux/input.h>
#include <kunit/device.h>
#include <kunit/test.h>
#define POLL_INTERVAL 100
@@ -161,11 +162,44 @@ static void input_test_grab(struct kunit *test)
input_put_device(input_dev);
}
static void input_test_managed_parent_override(struct kunit *test)
{
struct device *owner, *other_dev;
struct input_dev *input_dev;
owner = kunit_device_register(test, "input-test-owner");
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, owner);
other_dev = kunit_device_register(test, "input-test-other");
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, other_dev);
/* Overriding dev.parent to another device must be rejected */
input_dev = devm_input_allocate_device(owner);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, input_dev);
input_dev->name = "Managed input device (reparented)";
input_dev->dev.parent = other_dev;
KUNIT_EXPECT_EQ(test, input_register_device(input_dev), -EINVAL);
/* Clearing dev.parent to NULL must be rejected */
input_dev = devm_input_allocate_device(owner);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, input_dev);
input_dev->name = "Managed input device (null parent)";
input_dev->dev.parent = NULL;
KUNIT_EXPECT_EQ(test, input_register_device(input_dev), -EINVAL);
/* Preserving original owner as dev.parent succeeds */
input_dev = devm_input_allocate_device(owner);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, input_dev);
input_dev->name = "Managed input device (valid parent)";
KUNIT_EXPECT_EQ(test, input_register_device(input_dev), 0);
}
static struct kunit_case input_tests[] = {
KUNIT_CASE(input_test_polling),
KUNIT_CASE(input_test_timestamp),
KUNIT_CASE(input_test_match_device_id),
KUNIT_CASE(input_test_grab),
KUNIT_CASE(input_test_managed_parent_override),
{ /* sentinel */ }
};
-1
View File
@@ -246,7 +246,6 @@ static int pm860x_touch_probe(struct platform_device *pdev)
touch->idev->name = "88pm860x-touch";
touch->idev->phys = "88pm860x/input0";
touch->idev->id.bustype = BUS_I2C;
touch->idev->dev.parent = &pdev->dev;
touch->idev->open = pm860x_touch_open;
touch->idev->close = pm860x_touch_close;
touch->chip = chip;
-1
View File
@@ -725,7 +725,6 @@ static int ad7877_probe(struct spi_device *spi)
input_dev->name = "AD7877 Touchscreen";
input_dev->phys = ts->phys;
input_dev->dev.parent = &spi->dev;
__set_bit(EV_KEY, input_dev->evbit);
__set_bit(BTN_TOUCH, input_dev->keybit);
-1
View File
@@ -545,7 +545,6 @@ int ad7879_probe(struct device *dev, struct regmap *regmap,
input_dev->name = "AD7879 Touchscreen";
input_dev->phys = ts->phys;
input_dev->dev.parent = dev;
input_dev->id.bustype = bustype;
input_dev->open = ad7879_open;
-1
View File
@@ -111,7 +111,6 @@ static int ar1021_i2c_probe(struct i2c_client *client)
input->name = "ar1021 I2C Touchscreen";
input->id.bustype = BUS_I2C;
input->dev.parent = &client->dev;
input->open = ar1021_i2c_open;
input->close = ar1021_i2c_close;
+2 -2
View File
@@ -3409,8 +3409,8 @@ MODULE_DEVICE_TABLE(of, mxt_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id mxt_acpi_id[] = {
{ "ATML0000", 0 }, /* Touchpad */
{ "ATML0001", 0 }, /* Touchscreen */
{ .id = "ATML0000" }, /* Touchpad */
{ .id = "ATML0001" }, /* Touchscreen */
{ }
};
MODULE_DEVICE_TABLE(acpi, mxt_acpi_id);
@@ -459,7 +459,6 @@ static int iproc_ts_probe(struct platform_device *pdev)
/* Set input device info */
idev->name = IPROC_TS_NAME;
idev->dev.parent = &pdev->dev;
idev->id.bustype = BUS_HOST;
idev->id.vendor = SERIO_UNKNOWN;
@@ -202,7 +202,6 @@ static int icn8318_probe(struct i2c_client *client)
input->id.bustype = BUS_I2C;
input->open = icn8318_start;
input->close = icn8318_stop;
input->dev.parent = dev;
input_set_capability(input, EV_ABS, ABS_MT_POSITION_X);
input_set_capability(input, EV_ABS, ABS_MT_POSITION_Y);
+1 -1
View File
@@ -486,7 +486,7 @@ static int icn8505_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(icn8505_pm_ops, icn8505_suspend, icn8505_resume);
static const struct acpi_device_id icn8505_acpi_match[] = {
{ "CHPN0001" },
{ .id = "CHPN0001" },
{ }
};
MODULE_DEVICE_TABLE(acpi, icn8505_acpi_match);
@@ -303,7 +303,6 @@ static int vf50_ts_probe(struct platform_device *pdev)
input->name = DRIVER_NAME;
input->id.bustype = BUS_HOST;
input->dev.parent = dev;
input->open = vf50_ts_open;
input->close = vf50_ts_close;
+4 -4
View File
@@ -943,7 +943,7 @@ static const struct i2c_device_id cyttsp5_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, cyttsp5_i2c_id);
static int __maybe_unused cyttsp5_suspend(struct device *dev)
static int cyttsp5_suspend(struct device *dev)
{
struct cyttsp5 *ts = dev_get_drvdata(dev);
@@ -953,7 +953,7 @@ static int __maybe_unused cyttsp5_suspend(struct device *dev)
return 0;
}
static int __maybe_unused cyttsp5_resume(struct device *dev)
static int cyttsp5_resume(struct device *dev)
{
struct cyttsp5 *ts = dev_get_drvdata(dev);
@@ -963,13 +963,13 @@ static int __maybe_unused cyttsp5_resume(struct device *dev)
return 0;
}
static SIMPLE_DEV_PM_OPS(cyttsp5_pm, cyttsp5_suspend, cyttsp5_resume);
static DEFINE_SIMPLE_DEV_PM_OPS(cyttsp5_pm, cyttsp5_suspend, cyttsp5_resume);
static struct i2c_driver cyttsp5_i2c_driver = {
.driver = {
.name = CYTTSP5_NAME,
.of_match_table = cyttsp5_of_match,
.pm = &cyttsp5_pm,
.pm = pm_sleep_ptr(&cyttsp5_pm),
},
.probe = cyttsp5_i2c_probe,
.id_table = cyttsp5_i2c_id,
-1
View File
@@ -658,7 +658,6 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops,
input_dev->name = "Cypress TTSP TouchScreen";
input_dev->id.bustype = bus_ops->bustype;
input_dev->dev.parent = ts->dev;
input_dev->open = cyttsp_open;
input_dev->close = cyttsp_close;
-1
View File
@@ -330,7 +330,6 @@ static int da9034_touch_probe(struct platform_device *pdev)
input_dev->name = pdev->name;
input_dev->open = da9034_touch_open;
input_dev->close = da9034_touch_close;
input_dev->dev.parent = &pdev->dev;
__set_bit(EV_ABS, input_dev->evbit);
__set_bit(ABS_X, input_dev->absbit);
-1
View File
@@ -1292,7 +1292,6 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client)
input->name = tsdata->name;
input->id.bustype = BUS_I2C;
input->dev.parent = &client->dev;
input_set_abs_params(input, ABS_MT_POSITION_X,
0, tsdata->num_x * 64 - 1, 0, 0);
+4 -4
View File
@@ -1360,9 +1360,9 @@ static void elants_i2c_power_off(void *_data)
#ifdef CONFIG_ACPI
static const struct acpi_device_id i2c_hid_ids[] = {
{"ACPI0C50", 0 },
{"PNP0C50", 0 },
{ },
{ .id = "ACPI0C50" },
{ .id = "PNP0C50" },
{ }
};
static const guid_t i2c_hid_guid =
@@ -1624,7 +1624,7 @@ MODULE_DEVICE_TABLE(i2c, elants_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id elants_acpi_id[] = {
{ "ELAN0001", EKTH3500 },
{ .id = "ELAN0001", .driver_data = EKTH3500 },
{ }
};
MODULE_DEVICE_TABLE(acpi, elants_acpi_id);
+1 -1
View File
@@ -453,7 +453,7 @@ MODULE_DEVICE_TABLE(of, exc3000_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id exc3000_acpi_match[] = {
{ "EGA00001", .driver_data = (kernel_ulong_t)&exc3000_info[EETI_EXC80H60] },
{ .id = "EGA00001", .driver_data = (kernel_ulong_t)&exc3000_info[EETI_EXC80H60] },
{ }
};
MODULE_DEVICE_TABLE(acpi, exc3000_acpi_match);
+4 -4
View File
@@ -1531,10 +1531,10 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id goodix_acpi_match[] = {
{ "GDIX1001", 0 },
{ "GDIX1002", 0 },
{ "GDIX1003", 0 },
{ "GDX9110", 0 },
{ .id = "GDIX1001" },
{ .id = "GDIX1002" },
{ .id = "GDIX1003" },
{ .id = "GDX9110" },
{ }
};
MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
+1 -1
View File
@@ -1088,7 +1088,7 @@ MODULE_DEVICE_TABLE(i2c, hideep_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id hideep_acpi_id[] = {
{ "HIDP0001", 0 },
{ .id = "HIDP0001" },
{ }
};
MODULE_DEVICE_TABLE(acpi, hideep_acpi_id);
-1
View File
@@ -499,7 +499,6 @@ static int hycon_hy46xx_probe(struct i2c_client *client)
input->name = "Hycon Capacitive Touch";
input->id.bustype = BUS_I2C;
input->dev.parent = &client->dev;
input_set_abs_params(input, ABS_MT_POSITION_X, 0, -1, 0, 0);
input_set_abs_params(input, ABS_MT_POSITION_Y, 0, -1, 0, 0);
+2 -2
View File
@@ -646,8 +646,8 @@ MODULE_DEVICE_TABLE(i2c, ilitek_ts_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id ilitekts_acpi_id[] = {
{ "ILTK0001", 0 },
{ },
{ .id = "ILTK0001" },
{ }
};
MODULE_DEVICE_TABLE(acpi, ilitekts_acpi_id);
#endif
@@ -123,7 +123,6 @@ static int jornada720_ts_probe(struct platform_device *pdev)
input_dev->name = "HP Jornada 7xx Touchscreen";
input_dev->phys = "jornadats/input0";
input_dev->id.bustype = BUS_HOST;
input_dev->dev.parent = &pdev->dev;
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
-1
View File
@@ -186,7 +186,6 @@ static int max11801_ts_probe(struct i2c_client *client)
input_dev->name = "max11801_ts";
input_dev->id.bustype = BUS_I2C;
input_dev->dev.parent = &client->dev;
__set_bit(EV_ABS, input_dev->evbit);
__set_bit(EV_KEY, input_dev->evbit);
+2 -2
View File
@@ -1529,8 +1529,8 @@ MODULE_DEVICE_TABLE(of, mip4_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id mip4_acpi_match[] = {
{ "MLFS0000", 0},
{ },
{ .id = "MLFS0000" },
{ }
};
MODULE_DEVICE_TABLE(acpi, mip4_acpi_match);
#endif
+7 -6
View File
@@ -626,7 +626,6 @@ static int mms114_probe(struct i2c_client *client)
return -ENOMEM;
input_dev->id.bustype = BUS_I2C;
input_dev->dev.parent = &client->dev;
input_dev->open = mms114_input_open;
input_dev->close = mms114_input_close;
@@ -679,6 +678,13 @@ static int mms114_suspend(struct device *dev)
struct input_dev *input_dev = data->input_dev;
int id;
guard(mutex)(&input_dev->mutex);
if (!input_device_enabled(input_dev))
return 0;
mms114_stop(data);
/* Release all touch */
for (id = 0; id < MMS114_MAX_TOUCH; id++) {
input_mt_slot(input_dev, id);
@@ -688,11 +694,6 @@ static int mms114_suspend(struct device *dev)
input_mt_report_pointer_emulation(input_dev, true);
input_sync(input_dev);
guard(mutex)(&input_dev->mutex);
if (input_device_enabled(input_dev))
mms114_stop(data);
return 0;
}
+2 -2
View File
@@ -1227,8 +1227,8 @@ MODULE_DEVICE_TABLE(i2c, raydium_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id raydium_acpi_id[] = {
{ "RAYD0001", 0 },
{ /* sentinel */ }
{ .id = "RAYD0001" },
{ }
};
MODULE_DEVICE_TABLE(acpi, raydium_acpi_id);
#endif
-2
View File
@@ -433,8 +433,6 @@ static int s6sy761_probe(struct i2c_client *client)
input_set_abs_params(sdata->input, ABS_MT_POSITION_Y, 0, max_y, 0, 0);
input_set_abs_params(sdata->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
input_set_abs_params(sdata->input, ABS_MT_TOUCH_MINOR, 0, 255, 0, 0);
input_set_abs_params(sdata->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
input_set_abs_params(sdata->input, ABS_MT_TOUCH_MINOR, 0, 255, 0, 0);
input_set_abs_params(sdata->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
touchscreen_parse_properties(sdata->input, true, &sdata->prop);
+9 -9
View File
@@ -788,15 +788,15 @@ MODULE_DEVICE_TABLE(i2c, silead_ts_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id silead_ts_acpi_match[] = {
{ "GSL1680", 0 },
{ "GSL1688", 0 },
{ "GSL3670", 0 },
{ "GSL3675", 0 },
{ "GSL3692", 0 },
{ "MSSL1680", 0 },
{ "MSSL0001", 0 },
{ "MSSL0002", 0 },
{ "MSSL0017", 0 },
{ .id = "GSL1680" },
{ .id = "GSL1688" },
{ .id = "GSL3670" },
{ .id = "GSL3675" },
{ .id = "GSL3692" },
{ .id = "MSSL1680" },
{ .id = "MSSL0001" },
{ .id = "MSSL0002" },
{ .id = "MSSL0017" },
{ }
};
MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match);
+1 -1
View File
@@ -392,7 +392,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(surface3_spi_pm_ops,
#ifdef CONFIG_ACPI
static const struct acpi_device_id surface3_spi_acpi_match[] = {
{ "MSHW0037", 0 },
{ .id = "MSHW0037" },
{ }
};
MODULE_DEVICE_TABLE(acpi, surface3_spi_acpi_match);
-1
View File
@@ -345,7 +345,6 @@ static int sx8654_probe(struct i2c_client *client)
input->name = "SX8654 I2C Touchscreen";
input->id.bustype = BUS_I2C;
input->dev.parent = &client->dev;
input->open = sx8654_open;
input->close = sx8654_close;
-1
View File
@@ -251,7 +251,6 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
input_dev->name = "TPS6507x Touchscreen";
input_dev->phys = tsc->phys;
input_dev->dev.parent = tsc->dev;
input_dev->id.bustype = BUS_I2C;
if (init_data) {
input_dev->id.vendor = init_data->vendor;
+1 -1
View File
@@ -1147,7 +1147,7 @@ MODULE_DEVICE_TABLE(i2c, wdt87xx_dev_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id wdt87xx_acpi_id[] = {
{ "WDHT0001", 0 },
{ .id = "WDHT0001" },
{ }
};
MODULE_DEVICE_TABLE(acpi, wdt87xx_acpi_id);
-1
View File
@@ -356,7 +356,6 @@ static int wm831x_ts_probe(struct platform_device *pdev)
input_set_abs_params(input_dev, ABS_PRESSURE, 0, 4095, 5, 0);
input_set_drvdata(input_dev, wm831x_ts);
input_dev->dev.parent = &pdev->dev;
error = input_register_device(input_dev);
if (error)
-1
View File
@@ -567,7 +567,6 @@ static int wm97xx_register_touch(struct wm97xx *wm)
abs_p[2], 0);
input_set_drvdata(wm->input_dev, wm);
wm->input_dev->dev.parent = wm->dev;
ret = input_register_device(wm->input_dev);
if (ret)