Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - a driver for SGI IOC3 PS/2 controller

 - updates to driver for FocalTech FT5x06 series touch screen
   controllers

 - other assorted fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: synaptics-rmi4 - switch to reduced reporting mode
  dt-bindings: touchscreen: Convert Goodix touchscreen to json-schema
  dt-bindings: touchscreen: Add touchscreen schema
  Input: add IOC3 serio driver
  Input: axp20x-pek - enable wakeup for all AXP variants
  Input: axp20x-pek - respect userspace wakeup configuration
  Input: ads7846 - use new `delay` structure for SPI transfer delays
  Input: edt-ft5x06 - use pm core to enable/disable the wake irq
  Input: edt-ft5x06 - make wakeup-source switchable
  Input: edt-ft5x06 - document wakeup-source capability
  Input: edt-ft5x06 - alphabetical include reorder
  Input: edt-ft5x06 - work around first register access error
  Input: apbps2 - add __iomem to register struct
  Input: axp20x-pek - make device attributes static
  Input: elants_i2c - check Remark ID when attempting firmware update
  • Loading branch information
Linus Torvalds committed Feb 3, 2020
2 parents d4e9056 + b19efca commit fe70da5
Show file tree
Hide file tree
Showing 14 changed files with 544 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Optional properties:
- pinctrl-0: a phandle pointing to the pin settings for the
control gpios

- wakeup-source: If present the device will act as wakeup-source

- threshold: allows setting the "click"-threshold in the range
from 0 to 80.

Expand Down
50 changes: 0 additions & 50 deletions Documentation/devicetree/bindings/input/touchscreen/goodix.txt

This file was deleted.

78 changes: 78 additions & 0 deletions Documentation/devicetree/bindings/input/touchscreen/goodix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/goodix.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Goodix GT9xx series touchscreen controller Bindings

maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>

allOf:
- $ref: touchscreen.yaml#

properties:
compatible:
enum:
- goodix,gt1151
- goodix,gt5663
- goodix,gt5688
- goodix,gt911
- goodix,gt9110
- goodix,gt912
- goodix,gt927
- goodix,gt9271
- goodix,gt928
- goodix,gt967

reg:
enum: [ 0x5d, 0x14 ]

interrupts:
maxItems: 1

irq-gpios:
description: GPIO pin used for IRQ.
The driver uses the interrupt gpio pin as
output to reset the device.
maxItems: 1

reset-gpios:
maxItems: 1

AVDD28-supply:
description: Analog power supply regulator on AVDD28 pin

VDDIO-supply:
description: GPIO power supply regulator on VDDIO pin

touchscreen-inverted-x: true
touchscreen-inverted-y: true
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-swapped-x-y: true

additionalProperties: false

required:
- compatible
- reg
- interrupts

examples:
- |
i2c@00000000 {
#address-cells = <1>;
#size-cells = <0>;
gt928@5d {
compatible = "goodix,gt928";
reg = <0x5d>;
interrupt-parent = <&gpio>;
interrupts = <0 0>;
irq-gpios = <&gpio1 0 0>;
reset-gpios = <&gpio1 1 0>;
};
};
...
Original file line number Diff line number Diff line change
@@ -1,39 +1 @@
General Touchscreen Properties:

Optional properties for Touchscreens:
- touchscreen-min-x : minimum x coordinate reported (0 if not set)
- touchscreen-min-y : minimum y coordinate reported (0 if not set)
- touchscreen-size-x : horizontal resolution of touchscreen
(maximum x coordinate reported + 1)
- touchscreen-size-y : vertical resolution of touchscreen
(maximum y coordinate reported + 1)
- touchscreen-max-pressure : maximum reported pressure (arbitrary range
dependent on the controller)
- touchscreen-min-pressure : minimum pressure on the touchscreen to be
achieved in order for the touchscreen
driver to report a touch event.
- touchscreen-fuzz-x : horizontal noise value of the absolute input
device (in pixels)
- touchscreen-fuzz-y : vertical noise value of the absolute input
device (in pixels)
- touchscreen-fuzz-pressure : pressure noise value of the absolute input
device (arbitrary range dependent on the
controller)
- touchscreen-average-samples : Number of data samples which are averaged
for each read (valid values dependent on the
controller)
- touchscreen-inverted-x : X axis is inverted (boolean)
- touchscreen-inverted-y : Y axis is inverted (boolean)
- touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
Swapping is done after inverting the axis
- touchscreen-x-mm : horizontal length in mm of the touchscreen
- touchscreen-y-mm : vertical length in mm of the touchscreen

Deprecated properties for Touchscreens:
- x-size : deprecated name for touchscreen-size-x
- y-size : deprecated name for touchscreen-size-y
- moving-threshold : deprecated name for a combination of
touchscreen-fuzz-x and touchscreen-fuzz-y
- contact-threshold : deprecated name for touchscreen-fuzz-pressure
- x-invert : deprecated name for touchscreen-inverted-x
- y-invert : deprecated name for touchscreen-inverted-y
See touchscreen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/touchscreen.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Common touchscreen Bindings

maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>

properties:
touchscreen-min-x:
description: minimum x coordinate reported
$ref: /schemas/types.yaml#/definitions/uint32
default: 0

touchscreen-min-y:
description: minimum y coordinate reported
$ref: /schemas/types.yaml#/definitions/uint32
default: 0

touchscreen-size-x:
description: horizontal resolution of touchscreen (maximum x coordinate reported + 1)
$ref: /schemas/types.yaml#/definitions/uint32

touchscreen-size-y:
description: vertical resolution of touchscreen (maximum y coordinate reported + 1)
$ref: /schemas/types.yaml#/definitions/uint32

touchscreen-max-pressure:
description: maximum reported pressure (arbitrary range dependent on the controller)
$ref: /schemas/types.yaml#/definitions/uint32

touchscreen-min-pressure:
description: minimum pressure on the touchscreen to be achieved in order for the
touchscreen driver to report a touch event.
$ref: /schemas/types.yaml#/definitions/uint32

touchscreen-fuzz-x:
description: horizontal noise value of the absolute input device (in pixels)
$ref: /schemas/types.yaml#/definitions/uint32

touchscreen-fuzz-y:
description: vertical noise value of the absolute input device (in pixels)
$ref: /schemas/types.yaml#/definitions/uint32

touchscreen-fuzz-pressure:
description: pressure noise value of the absolute input device (arbitrary range
dependent on the controller)
$ref: /schemas/types.yaml#/definitions/uint32

touchscreen-average-samples:
description: Number of data samples which are averaged for each read (valid values
dependent on the controller)
$ref: /schemas/types.yaml#/definitions/uint32

touchscreen-inverted-x:
description: X axis is inverted
type: boolean

touchscreen-inverted-y:
description: Y axis is inverted
type: boolean

touchscreen-swapped-x-y:
description: X and Y axis are swapped
Swapping is done after inverting the axis
type: boolean

touchscreen-x-mm:
description: horizontal length in mm of the touchscreen
$ref: /schemas/types.yaml#/definitions/uint32

touchscreen-y-mm:
description: vertical length in mm of the touchscreen
$ref: /schemas/types.yaml#/definitions/uint32

dependencies:
touchscreen-size-x: [ touchscreen-size-y ]
touchscreen-size-y: [ touchscreen-size-x ]
touchscreen-x-mm: [ touchscreen-y-mm ]
touchscreen-y-mm: [ touchscreen-x-mm ]
45 changes: 40 additions & 5 deletions drivers/input/misc/axp20x-pek.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ static ssize_t axp20x_store_attr_shutdown(struct device *dev,
axp20x_pek->info->shutdown_mask, buf, count);
}

DEVICE_ATTR(startup, 0644, axp20x_show_attr_startup, axp20x_store_attr_startup);
DEVICE_ATTR(shutdown, 0644, axp20x_show_attr_shutdown,
axp20x_store_attr_shutdown);
static DEVICE_ATTR(startup, 0644, axp20x_show_attr_startup,
axp20x_store_attr_startup);
static DEVICE_ATTR(shutdown, 0644, axp20x_show_attr_shutdown,
axp20x_store_attr_shutdown);

static struct attribute *axp20x_attrs[] = {
&dev_attr_startup.attr,
Expand Down Expand Up @@ -279,8 +280,7 @@ static int axp20x_pek_probe_input_device(struct axp20x_pek *axp20x_pek,
return error;
}

if (axp20x_pek->axp20x->variant == AXP288_ID)
enable_irq_wake(axp20x_pek->irq_dbr);
device_init_wakeup(&pdev->dev, true);

return 0;
}
Expand Down Expand Up @@ -352,6 +352,40 @@ static int axp20x_pek_probe(struct platform_device *pdev)
return 0;
}

static int __maybe_unused axp20x_pek_suspend(struct device *dev)
{
struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev);

/*
* As nested threaded IRQs are not automatically disabled during
* suspend, we must explicitly disable non-wakeup IRQs.
*/
if (device_may_wakeup(dev)) {
enable_irq_wake(axp20x_pek->irq_dbf);
enable_irq_wake(axp20x_pek->irq_dbr);
} else {
disable_irq(axp20x_pek->irq_dbf);
disable_irq(axp20x_pek->irq_dbr);
}

return 0;
}

static int __maybe_unused axp20x_pek_resume(struct device *dev)
{
struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev);

if (device_may_wakeup(dev)) {
disable_irq_wake(axp20x_pek->irq_dbf);
disable_irq_wake(axp20x_pek->irq_dbr);
} else {
enable_irq(axp20x_pek->irq_dbf);
enable_irq(axp20x_pek->irq_dbr);
}

return 0;
}

static int __maybe_unused axp20x_pek_resume_noirq(struct device *dev)
{
struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev);
Expand All @@ -371,6 +405,7 @@ static int __maybe_unused axp20x_pek_resume_noirq(struct device *dev)
}

static const struct dev_pm_ops axp20x_pek_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(axp20x_pek_suspend, axp20x_pek_resume)
#ifdef CONFIG_PM_SLEEP
.resume_noirq = axp20x_pek_resume_noirq,
#endif
Expand Down
14 changes: 14 additions & 0 deletions drivers/input/rmi4/rmi_f11.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ struct f11_2d_sensor_queries {

/* Defs for Ctrl0. */
#define RMI_F11_REPORT_MODE_MASK 0x07
#define RMI_F11_REPORT_MODE_CONTINUOUS (0 << 0)
#define RMI_F11_REPORT_MODE_REDUCED (1 << 0)
#define RMI_F11_REPORT_MODE_FS_CHANGE (2 << 0)
#define RMI_F11_REPORT_MODE_FP_CHANGE (3 << 0)
#define RMI_F11_ABS_POS_FILT (1 << 3)
#define RMI_F11_REL_POS_FILT (1 << 4)
#define RMI_F11_REL_BALLISTICS (1 << 5)
Expand Down Expand Up @@ -1195,6 +1199,16 @@ static int rmi_f11_initialize(struct rmi_function *fn)
ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD] =
sensor->axis_align.delta_y_threshold;

/*
* If distance threshold values are set, switch to reduced reporting
* mode so they actually get used by the controller.
*/
if (ctrl->ctrl0_11[RMI_F11_DELTA_X_THRESHOLD] ||
ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD]) {
ctrl->ctrl0_11[0] &= ~RMI_F11_REPORT_MODE_MASK;
ctrl->ctrl0_11[0] |= RMI_F11_REPORT_MODE_REDUCED;
}

if (f11->sens_query.has_dribble) {
switch (sensor->dribble) {
case RMI_REG_STATE_OFF:
Expand Down
10 changes: 10 additions & 0 deletions drivers/input/serio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ config SERIO_MACEPS2
To compile this driver as a module, choose M here: the
module will be called maceps2.

config SERIO_SGI_IOC3
tristate "SGI IOC3 PS/2 controller"
depends on SGI_MFD_IOC3
help
Say Y here if you have an SGI Onyx2, SGI Octane or IOC3 PCI card
and you want to attach and use a keyboard, mouse, or both.

To compile this driver as a module, choose M here: the
module will be called ioc3kbd.

config SERIO_LIBPS2
tristate "PS/2 driver library"
depends on SERIO_I8042 || SERIO_I8042=n
Expand Down
1 change: 1 addition & 0 deletions drivers/input/serio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ obj-$(CONFIG_HIL_MLC) += hp_sdc_mlc.o hil_mlc.o
obj-$(CONFIG_SERIO_PCIPS2) += pcips2.o
obj-$(CONFIG_SERIO_PS2MULT) += ps2mult.o
obj-$(CONFIG_SERIO_MACEPS2) += maceps2.o
obj-$(CONFIG_SERIO_SGI_IOC3) += ioc3kbd.o
obj-$(CONFIG_SERIO_LIBPS2) += libps2.o
obj-$(CONFIG_SERIO_RAW) += serio_raw.o
obj-$(CONFIG_SERIO_AMS_DELTA) += ams_delta_serio.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/serio/apbps2.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct apbps2_regs {

struct apbps2_priv {
struct serio *io;
struct apbps2_regs *regs;
struct apbps2_regs __iomem *regs;
};

static int apbps2_idx;
Expand Down
Loading

0 comments on commit fe70da5

Please sign in to comment.