Skip to content

Commit 8ad4b6f

Browse files
committed
Merge tag 'input-for-v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: - fix Goodix driver to properly behave on the Aya Neo Next - some more sanity checks in usbtouchscreen driver - a tweak in wm97xx driver in preparation for remove() to return void - a clarification in input core regarding units of measurement for resolution on touch events. * tag 'input-for-v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: document the units for resolution of size axes Input: goodix - call acpi_device_fix_up_power() in some cases Input: wm97xx - make .remove() obviously always return 0 Input: usbtouchscreen - add driver_info sanity check
2 parents 396df70 + 2a96271 commit 8ad4b6f

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

drivers/input/touchscreen/goodix.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,11 @@ static int goodix_add_acpi_gpio_mappings(struct goodix_ts_data *ts)
900900
} else {
901901
dev_warn(dev, "Unexpected ACPI resources: gpio_count %d, gpio_int_idx %d\n",
902902
ts->gpio_count, ts->gpio_int_idx);
903+
/*
904+
* On some devices _PS0 does a reset for us and
905+
* sometimes this is necessary for things to work.
906+
*/
907+
acpi_device_fix_up_power(ACPI_COMPANION(dev));
903908
return -EINVAL;
904909
}
905910

drivers/input/touchscreen/usbtouchscreen.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,6 +1654,9 @@ static int usbtouch_probe(struct usb_interface *intf,
16541654
if (id->driver_info == DEVTYPE_IGNORE)
16551655
return -ENODEV;
16561656

1657+
if (id->driver_info >= ARRAY_SIZE(usbtouch_dev_info))
1658+
return -ENODEV;
1659+
16571660
endpoint = usbtouch_get_input_endpoint(intf->cur_altsetting);
16581661
if (!endpoint)
16591662
return -ENXIO;

drivers/input/touchscreen/wm97xx-core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,9 @@ static int wm97xx_mfd_probe(struct platform_device *pdev)
758758

759759
static int wm97xx_mfd_remove(struct platform_device *pdev)
760760
{
761-
return wm97xx_remove(&pdev->dev);
761+
wm97xx_remove(&pdev->dev);
762+
763+
return 0;
762764
}
763765

764766
static int __maybe_unused wm97xx_suspend(struct device *dev)

include/uapi/linux/input.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ struct input_id {
7878
* Note that input core does not clamp reported values to the
7979
* [minimum, maximum] limits, such task is left to userspace.
8080
*
81-
* The default resolution for main axes (ABS_X, ABS_Y, ABS_Z)
82-
* is reported in units per millimeter (units/mm), resolution
83-
* for rotational axes (ABS_RX, ABS_RY, ABS_RZ) is reported
84-
* in units per radian.
81+
* The default resolution for main axes (ABS_X, ABS_Y, ABS_Z,
82+
* ABS_MT_POSITION_X, ABS_MT_POSITION_Y) is reported in units
83+
* per millimeter (units/mm), resolution for rotational axes
84+
* (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian.
85+
* The resolution for the size axes (ABS_MT_TOUCH_MAJOR,
86+
* ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MAJOR, ABS_MT_WIDTH_MINOR)
87+
* is reported in units per millimeter (units/mm).
8588
* When INPUT_PROP_ACCELEROMETER is set the resolution changes.
8689
* The main axes (ABS_X, ABS_Y, ABS_Z) are then reported in
8790
* units per g (units/g) and in units per degree per second

0 commit comments

Comments
 (0)