* [PATCH 1/1] HID: uhid: Fix out-of-bounds write caused by raw events mismanagement
From: Lee Jones @ 2026-02-11 16:40 UTC (permalink / raw)
To: lee, David Rheinsberg, Jiri Kosina, Benjamin Tissoires,
linux-input, linux-kernel
Cc: stable
Since the report ID is located within the data buffer, overwriting it
would mean that any subsequent matching could cause a disparity in
assumed allocated buffer size. This in turn could trivially result in
an out-of-bounds condition. To mitigate this issue, let's refuse to
overwrite a given report's data area if the ID in get_report_reply
doesn't match.
Cc: stable@vger.kernel.org
Fixes: fcfcf0deb89ec ("HID: uhid: implement feature requests")
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/hid/uhid.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
index 21a70420151e..a0ee4e86656f 100644
--- a/drivers/hid/uhid.c
+++ b/drivers/hid/uhid.c
@@ -262,6 +262,10 @@ static int uhid_hid_get_report(struct hid_device *hid, unsigned char rnum,
req = &uhid->report_buf.u.get_report_reply;
if (req->err) {
ret = -EIO;
+ } else if (rnum != req->data[0]) {
+ hid_err(hid, "Report ID mismatch - refusing to overwrite the data buffer\n");
+ ret = -EINVAL;
+ goto unlock;
} else {
ret = min3(count, (size_t)req->size, (size_t)UHID_DATA_MAX);
memcpy(buf, req->data, ret);
--
2.53.0.273.g2a3d683680-goog
^ permalink raw reply related
* [PATCH v7 1/2] Input: export input_default_setkeycode
From: Fabio Baltieri @ 2026-02-11 17:34 UTC (permalink / raw)
To: Dmitry Torokhov, Benson Leung, Guenter Roeck
Cc: Fabio Baltieri, Tzung-Bi Shih, Simon Glass, linux-input,
chrome-platform, linux-kernel
In-Reply-To: <20260211173421.1206478-1-fabiobaltieri@chromium.org>
Export input_default_setkeycode so that a driver can set a custom
setkeycode handler to do take some driver specific action but still call
the default handler at some point.
Signed-off-by: Fabio Baltieri <fabiobaltieri@chromium.org>
---
drivers/input/input.c | 9 ++++++---
include/linux/input.h | 4 ++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/input/input.c b/drivers/input/input.c
index a500e1e276c2..d3a1878f25db 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -800,14 +800,16 @@ static int input_default_getkeycode(struct input_dev *dev,
return 0;
}
-static int input_default_setkeycode(struct input_dev *dev,
- const struct input_keymap_entry *ke,
- unsigned int *old_keycode)
+int input_default_setkeycode(struct input_dev *dev,
+ const struct input_keymap_entry *ke,
+ unsigned int *old_keycode)
{
unsigned int index;
int error;
int i;
+ lockdep_assert_held(&dev->event_lock);
+
if (!dev->keycodesize)
return -EINVAL;
@@ -861,6 +863,7 @@ static int input_default_setkeycode(struct input_dev *dev,
__set_bit(ke->keycode, dev->keybit);
return 0;
}
+EXPORT_SYMBOL(input_default_setkeycode);
/**
* input_get_keycode - retrieve keycode currently mapped to a given scancode
diff --git a/include/linux/input.h b/include/linux/input.h
index 7d7cb0593a63..06ca62328db1 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -517,6 +517,10 @@ INPUT_GENERATE_ABS_ACCESSORS(res, resolution)
int input_scancode_to_scalar(const struct input_keymap_entry *ke,
unsigned int *scancode);
+int input_default_setkeycode(struct input_dev *dev,
+ const struct input_keymap_entry *ke,
+ unsigned int *old_keycode);
+
int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke);
int input_set_keycode(struct input_dev *dev,
const struct input_keymap_entry *ke);
--
2.53.0.239.g8d8fc8a987-goog
^ permalink raw reply related
* [PATCH v7 0/2] Input: cros_ec_keyb - add function key support
From: Fabio Baltieri @ 2026-02-11 17:34 UTC (permalink / raw)
To: Dmitry Torokhov, Benson Leung, Guenter Roeck
Cc: Fabio Baltieri, Tzung-Bi Shih, Simon Glass, linux-input,
chrome-platform, linux-kernel
Changes from v6:
- Fixed a bug where normal key were sending the wrong MSC scancode
- Added setkeycode handling so fn functionality is recomputed in
runtime when the keymap is changed
Changes from v5:
- minor renames/cosmetic changes
- dropped the *_key_status array, tracking using the idev->key bitmask
Changes from v4:
- just a comment tweak
Changes from v3:
- implemented fn layer runtime detection
- tweaked cros_ec_keyb_fn_code to return back the correct position
code
Changes from v2:
- renamed the dt property to use-fn-map, dropped the example
- added few function comments
- added a helper for obtaining the fn code
- reordered, dt patch first
Changes from v1:
- change struct to short types
- refactored the fn key handling in its own function
- changed props to use the google, prefix
- reworked the properties to use an overlay map rather than a
dedicated one
Fabio Baltieri (2):
Input: export input_default_setkeycode
Input: cros_ec_keyb - add function key support
drivers/input/input.c | 9 +-
drivers/input/keyboard/cros_ec_keyb.c | 191 +++++++++++++++++++++++---
include/linux/input.h | 4 +
3 files changed, 185 insertions(+), 19 deletions(-)
--
2.53.0.239.g8d8fc8a987-goog
^ permalink raw reply
* [PATCH v7 2/2] Input: cros_ec_keyb - add function key support
From: Fabio Baltieri @ 2026-02-11 17:34 UTC (permalink / raw)
To: Dmitry Torokhov, Benson Leung, Guenter Roeck
Cc: Fabio Baltieri, Tzung-Bi Shih, Simon Glass, linux-input,
chrome-platform, linux-kernel
In-Reply-To: <20260211173421.1206478-1-fabiobaltieri@chromium.org>
Add support for handling an Fn button and sending separate keycodes for
a subset of keys in the matrix defined in the upper half of the keymap.
Signed-off-by: Fabio Baltieri <fabiobaltieri@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
drivers/input/keyboard/cros_ec_keyb.c | 191 +++++++++++++++++++++++---
1 file changed, 175 insertions(+), 16 deletions(-)
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 1c6b0461dc35..67022f92533d 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -29,6 +29,12 @@
#include <linux/unaligned.h>
+/*
+ * Maximum size of the normal key matrix, this is limited by the host command
+ * key_matrix field defined in ec_response_get_next_data_v3
+ */
+#define CROS_EC_KEYBOARD_COLS_MAX 18
+
/**
* struct cros_ec_keyb - Structure representing EC keyboard device
*
@@ -44,6 +50,9 @@
* @bs_idev: The input device for non-matrix buttons and switches (or NULL).
* @notifier: interrupt event notifier for transport devices
* @vdata: vivaldi function row data
+ * @has_fn_map: whether the driver uses an fn function-map layer
+ * @fn_key_pressed: tracks the function key status
+ * @fn_event_pending: tracks where any function key fired
*/
struct cros_ec_keyb {
unsigned int rows;
@@ -61,6 +70,10 @@ struct cros_ec_keyb {
struct notifier_block notifier;
struct vivaldi_data vdata;
+
+ bool has_fn_map;
+ bool fn_key_pressed;
+ bool fn_event_pending;
};
/**
@@ -166,16 +179,103 @@ static bool cros_ec_keyb_has_ghosting(struct cros_ec_keyb *ckdev, uint8_t *buf)
return false;
}
+/*
+ * Process a function key state change, send an event report if appropriate.
+ */
+static void cros_ec_keyb_process_fn_key(struct cros_ec_keyb *ckdev,
+ int row, int col, bool state)
+{
+ struct input_dev *idev = ckdev->idev;
+ int pos = MATRIX_SCAN_CODE(row, col, ckdev->row_shift);
+
+ ckdev->fn_key_pressed = state;
+
+ if (state) {
+ ckdev->fn_event_pending = false;
+ } else if (!ckdev->fn_event_pending) {
+ /*
+ * Send the original code if nothing else has been pressed
+ * together with Fn.
+ */
+ input_event(idev, EV_MSC, MSC_SCAN, pos);
+ input_report_key(idev, KEY_FN, true);
+ input_sync(idev);
+
+ input_event(idev, EV_MSC, MSC_SCAN, pos);
+ input_report_key(idev, KEY_FN, false);
+ }
+}
+
+/*
+ * Return the Fn code for a normal key row, col combination, optionally set a
+ * position code too.
+ */
+static unsigned int cros_ec_keyb_fn_code(struct cros_ec_keyb *ckdev,
+ int row, int col, int *pos)
+{
+ struct input_dev *idev = ckdev->idev;
+ const unsigned short *keycodes = idev->keycode;
+ int fn_pos = MATRIX_SCAN_CODE(row + ckdev->rows, col, ckdev->row_shift);
+
+ if (pos)
+ *pos = fn_pos;
+
+ return keycodes[fn_pos];
+}
+
+/*
+ * Process the new state for a single key.
+ */
+static void cros_ec_keyb_process_one(struct cros_ec_keyb *ckdev,
+ int row, int col, bool state)
+{
+ struct input_dev *idev = ckdev->idev;
+ const unsigned short *keycodes = idev->keycode;
+ int pos = MATRIX_SCAN_CODE(row, col, ckdev->row_shift);
+ unsigned int code = keycodes[pos];
+
+ dev_dbg(ckdev->dev, "changed: [r%d c%d]: byte %02x\n", row, col, state);
+
+ if (ckdev->has_fn_map) {
+ int fn_pos;
+ unsigned int fn_code = cros_ec_keyb_fn_code(ckdev, row, col, &fn_pos);
+
+ if (code == KEY_FN)
+ return cros_ec_keyb_process_fn_key(ckdev, row, col, state);
+
+ if (!state) {
+ if (test_bit(fn_code, idev->key)) {
+ code = fn_code;
+ pos = fn_pos;
+ } else if (test_bit(code, idev->key)) {
+ /* nothing to do */
+ } else {
+ /* Discard, key press code was not sent */
+ return;
+ }
+ } else if (ckdev->fn_key_pressed) {
+ ckdev->fn_event_pending = true;
+
+ if (!fn_code)
+ return;
+
+ code = fn_code;
+ pos = fn_pos;
+ }
+ }
+
+ input_event(idev, EV_MSC, MSC_SCAN, pos);
+ input_report_key(idev, code, state);
+}
/*
* Compares the new keyboard state to the old one and produces key
- * press/release events accordingly. The keyboard state is 13 bytes (one byte
- * per column)
+ * press/release events accordingly. The keyboard state is one byte
+ * per column.
*/
static void cros_ec_keyb_process(struct cros_ec_keyb *ckdev,
uint8_t *kb_state, int len)
{
- struct input_dev *idev = ckdev->idev;
int col, row;
int new_state;
int old_state;
@@ -192,20 +292,13 @@ static void cros_ec_keyb_process(struct cros_ec_keyb *ckdev,
for (col = 0; col < ckdev->cols; col++) {
for (row = 0; row < ckdev->rows; row++) {
- int pos = MATRIX_SCAN_CODE(row, col, ckdev->row_shift);
- const unsigned short *keycodes = idev->keycode;
-
new_state = kb_state[col] & (1 << row);
old_state = ckdev->old_kb_state[col] & (1 << row);
- if (new_state != old_state) {
- dev_dbg(ckdev->dev,
- "changed: [r%d c%d]: byte %02x\n",
- row, col, new_state);
-
- input_event(idev, EV_MSC, MSC_SCAN, pos);
- input_report_key(idev, keycodes[pos],
- new_state);
- }
+
+ if (new_state == old_state)
+ continue;
+
+ cros_ec_keyb_process_one(ckdev, row, col, new_state);
}
ckdev->old_kb_state[col] = kb_state[col];
}
@@ -582,6 +675,63 @@ static void cros_ec_keyb_parse_vivaldi_physmap(struct cros_ec_keyb *ckdev)
ckdev->vdata.num_function_row_keys = n_physmap;
}
+/* Returns true if there is a KEY_FN code defined in the normal keymap */
+static bool cros_ec_keyb_has_fn_key(struct cros_ec_keyb *ckdev)
+{
+ struct input_dev *idev = ckdev->idev;
+ const unsigned short *keycodes = idev->keycode;
+
+ for (int row = 0; row < ckdev->rows; row++) {
+ for (int col = 0; col < ckdev->cols; col++) {
+ int pos = MATRIX_SCAN_CODE(row, col, ckdev->row_shift);
+
+ if (keycodes[pos] == KEY_FN)
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/*
+ * Returns true if there is a KEY_FN defined and at least one key in the fn
+ * layer keymap
+ */
+static bool cros_ec_keyb_has_fn_map(struct cros_ec_keyb *ckdev)
+{
+ if (!cros_ec_keyb_has_fn_key(ckdev))
+ return false;
+
+ for (int row = 0; row < ckdev->rows; row++) {
+ for (int col = 0; col < ckdev->cols; col++) {
+ if (cros_ec_keyb_fn_code(ckdev, row, col, NULL) != 0)
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/*
+ * Custom handler for the set keycode ioctl, calls the default handler and
+ * recomputes has_fn_map.
+ */
+static int cros_ec_keyb_setkeycode(struct input_dev *idev,
+ const struct input_keymap_entry *ke,
+ unsigned int *old_keycode)
+{
+ struct cros_ec_keyb *ckdev = input_get_drvdata(idev);
+ int ret;
+
+ ret = input_default_setkeycode(idev, ke, old_keycode);
+ if (ret)
+ return ret;
+
+ ckdev->has_fn_map = cros_ec_keyb_has_fn_map(ckdev);
+
+ return 0;
+}
+
/**
* cros_ec_keyb_register_matrix - Register matrix keys
*
@@ -603,6 +753,12 @@ static int cros_ec_keyb_register_matrix(struct cros_ec_keyb *ckdev)
if (err)
return err;
+ if (ckdev->cols > CROS_EC_KEYBOARD_COLS_MAX) {
+ dev_err(dev, "keypad,num-columns too large: %d (max: %d)\n",
+ ckdev->cols, CROS_EC_KEYBOARD_COLS_MAX);
+ return -EINVAL;
+ }
+
ckdev->valid_keys = devm_kzalloc(dev, ckdev->cols, GFP_KERNEL);
if (!ckdev->valid_keys)
return -ENOMEM;
@@ -631,11 +787,12 @@ static int cros_ec_keyb_register_matrix(struct cros_ec_keyb *ckdev)
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");
- err = matrix_keypad_build_keymap(NULL, NULL, ckdev->rows, ckdev->cols,
+ err = matrix_keypad_build_keymap(NULL, NULL, ckdev->rows * 2, ckdev->cols,
NULL, idev);
if (err) {
dev_err(dev, "cannot build key matrix\n");
@@ -650,6 +807,8 @@ static int cros_ec_keyb_register_matrix(struct cros_ec_keyb *ckdev)
cros_ec_keyb_compute_valid_keys(ckdev);
cros_ec_keyb_parse_vivaldi_physmap(ckdev);
+ ckdev->has_fn_map = cros_ec_keyb_has_fn_map(ckdev);
+
err = input_register_device(ckdev->idev);
if (err) {
dev_err(dev, "cannot register input device\n");
--
2.53.0.239.g8d8fc8a987-goog
^ permalink raw reply related
* Re: [PATCH v2 02/11] dt-bindings: regulator: cpcap-regulator: document Mot regulator
From: Rob Herring (Arm) @ 2026-02-11 21:13 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: linux-input, David Lechner, Lee Jones, Mark Brown, linux-kernel,
linux-leds, Dmitry Torokhov, Tony Lindgren, Nuno Sá,
devicetree, Dixit Parmar, Krzysztof Kozlowski, Andy Shevchenko,
Conor Dooley, Jonathan Cameron, Pavel Machek, linux-iio,
Liam Girdwood
In-Reply-To: <20260206172845.145407-3-clamor95@gmail.com>
On Fri, 06 Feb 2026 19:28:36 +0200, Svyatoslav Ryhel wrote:
> Document regulator composition used by the CPCAP of Tegra20 Mot board,
> that is a base for Atrix 4G and Droid X2.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
> .../devicetree/bindings/regulator/motorola,cpcap-regulator.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH v2 08/11] dt-bindings: mfd: motorola-cpcap: convert to DT schema
From: Rob Herring @ 2026-02-11 21:20 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Krzysztof Kozlowski, Conor Dooley, Dmitry Torokhov, Lee Jones,
Pavel Machek, Liam Girdwood, Mark Brown, Dixit Parmar,
Tony Lindgren, linux-iio, devicetree, linux-kernel, linux-input,
linux-leds
In-Reply-To: <20260206172845.145407-9-clamor95@gmail.com>
On Fri, Feb 06, 2026 at 07:28:42PM +0200, Svyatoslav Ryhel wrote:
> Convert devicetree bindings for the Motorola CPCAP MFD from TXT to YAML.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
> .../bindings/mfd/motorola,cpcap.yaml | 411 ++++++++++++++++++
> .../bindings/mfd/motorola-cpcap.txt | 78 ----
> 2 files changed, 411 insertions(+), 78 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
> delete mode 100644 Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
>
> diff --git a/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml b/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
> new file mode 100644
> index 000000000000..7e350721d9f6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
> @@ -0,0 +1,411 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/motorola,cpcap.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Motorola CPCAP PMIC MFD
> +
> +maintainers:
> + - Svyatoslav Ryhel <clamor95@gmail.com>
> +
> +allOf:
> + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - motorola,cpcap
> + - st,6556002
This does not match the only user in the kernel .dts files as
"st,6556002" should be a fallback.
Rob
^ permalink raw reply
* [PATCH 0/3] ARM: dts: imx: clean imx25 tsadc related CHECK_DTBS warnings
From: Frank Li @ 2026-02-11 21:41 UTC (permalink / raw)
To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Lee Jones
Cc: linux-input, devicetree, imx, linux-arm-kernel, linux-kernel,
Frank Li
Clean imx25 tsadc related warnings.
- convert txt to yaml.
- rename nodename to touchscreen.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Frank Li (3):
dt-bindings: input: touchscreen: convert fsl-mx25-tcq.txt to yaml
dt-bindings: mfd: convert fsl-imx25-tsadc.txt to yaml format
ARM: dts: imx25: rename node name tcq to touchscreen
.../bindings/input/touchscreen/fsl,imx25-tcq.yaml | 69 +++++++++++++++
.../bindings/input/touchscreen/fsl-mx25-tcq.txt | 34 --------
.../devicetree/bindings/mfd/fsl,imx25-tsadc.yaml | 97 ++++++++++++++++++++++
.../devicetree/bindings/mfd/fsl-imx25-tsadc.txt | 47 -----------
arch/arm/boot/dts/nxp/imx/imx25.dtsi | 2 +-
5 files changed, 167 insertions(+), 82 deletions(-)
---
base-commit: 80a957b5f15ec855849f15cd1cbe1a655c09701f
change-id: 20260211-yaml_mfd-8101eef273c7
Best regards,
--
Frank Li <Frank.Li@nxp.com>
^ permalink raw reply
* [PATCH 1/3] dt-bindings: input: touchscreen: convert fsl-mx25-tcq.txt to yaml
From: Frank Li @ 2026-02-11 21:41 UTC (permalink / raw)
To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Lee Jones
Cc: linux-input, devicetree, imx, linux-arm-kernel, linux-kernel,
Frank Li
In-Reply-To: <20260211-yaml_mfd-v1-0-05cb48bc6f09@nxp.com>
Convert fsl-mx25-tcq.txt to yaml.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
.../bindings/input/touchscreen/fsl,imx25-tcq.yaml | 69 ++++++++++++++++++++++
.../bindings/input/touchscreen/fsl-mx25-tcq.txt | 34 -----------
2 files changed, 69 insertions(+), 34 deletions(-)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx25-tcq.yaml b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx25-tcq.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..94452ac423d04c24817440ce4a1671edeeb1ac28
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx25-tcq.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/fsl,imx25-tcq.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale mx25 TS conversion queue module
+
+maintainers:
+ - Frank Li <Frank.Li@nxp.com>
+
+description:
+ mx25 touchscreen conversion queue module which controls the ADC unit of the
+ mx25 for attached touchscreens.
+
+properties:
+ compatible:
+ const: fsl,imx25-tcq
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ fsl,wires:
+ description: touch wires number.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [4, 5]
+
+ fsl,pen-debounce-ns:
+ description:
+ Pen debounce time in nanoseconds.
+
+ fsl,pen-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Pen-down threshold for the touchscreen. This is a value
+ between 1 and 4096. It is the ratio between the internal reference voltage
+ and the measured voltage after the plate was precharged. Resistance between
+ plates and therefore the voltage decreases with pressure so that a smaller
+ value is equivalent to a higher pressure.
+
+ fsl,settling-time-ns:
+ description:
+ Settling time in nanoseconds. The settling time is before
+ the actual touch detection to wait for an even charge distribution in the
+ plate.
+
+allOf:
+ - $ref: touchscreen.yaml
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - fsl,wires
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ touchscreen@50030400 {
+ compatible = "fsl,imx25-tcq";
+ reg = <0x50030400 0x60>;
+ interrupt-parent = <&tscadc>;
+ interrupts = <0>;
+ fsl,wires = <4>;
+ };
diff --git a/Documentation/devicetree/bindings/input/touchscreen/fsl-mx25-tcq.txt b/Documentation/devicetree/bindings/input/touchscreen/fsl-mx25-tcq.txt
deleted file mode 100644
index 99d6f9d2533579672eb4e277bcb40d274696831b..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/input/touchscreen/fsl-mx25-tcq.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-Freescale mx25 TS conversion queue module
-
-mx25 touchscreen conversion queue module which controls the ADC unit of the
-mx25 for attached touchscreens.
-
-Required properties:
- - compatible: Should be "fsl,imx25-tcq".
- - reg: Memory range of the device.
- - interrupts: Should be the interrupt number associated with this module within
- the tscadc unit (<0>).
- - fsl,wires: Should be '<4>' or '<5>'
-
-Optional properties:
- - fsl,pen-debounce-ns: Pen debounce time in nanoseconds.
- - fsl,pen-threshold: Pen-down threshold for the touchscreen. This is a value
- between 1 and 4096. It is the ratio between the internal reference voltage
- and the measured voltage after the plate was precharged. Resistance between
- plates and therefore the voltage decreases with pressure so that a smaller
- value is equivalent to a higher pressure.
- - fsl,settling-time-ns: Settling time in nanoseconds. The settling time is before
- the actual touch detection to wait for an even charge distribution in the
- plate.
-
-This device includes two conversion queues which can be added as subnodes.
-The first queue is for the touchscreen, the second for general purpose ADC.
-
-Example:
- tsc: tcq@50030400 {
- compatible = "fsl,imx25-tcq";
- reg = <0x50030400 0x60>;
- interrupt-parent = <&tscadc>;
- interrupts = <0>;
- fsl,wires = <4>;
- };
--
2.43.0
^ permalink raw reply related
* [PATCH 2/3] dt-bindings: mfd: convert fsl-imx25-tsadc.txt to yaml format
From: Frank Li @ 2026-02-11 21:41 UTC (permalink / raw)
To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Lee Jones
Cc: linux-input, devicetree, imx, linux-arm-kernel, linux-kernel,
Frank Li
In-Reply-To: <20260211-yaml_mfd-v1-0-05cb48bc6f09@nxp.com>
Convert fsl-imx25-tsadc.txt to yaml format.
Addtional changes:
- Add ranges.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
.../devicetree/bindings/mfd/fsl,imx25-tsadc.yaml | 97 ++++++++++++++++++++++
.../devicetree/bindings/mfd/fsl-imx25-tsadc.txt | 47 -----------
2 files changed, 97 insertions(+), 47 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml b/Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..b5c6a2d4750115a2d2332d766722b99e517721ae
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/fsl,imx25-tsadc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MX25 ADC/TSC MultiFunction Device (MFD)
+
+maintainers:
+ - Frank Li <Frank.Li@nxp.com>
+
+description:
+ This device combines two general purpose conversion queues one used for general
+ ADC and the other used for touchscreens.
+
+properties:
+ compatible:
+ const: fsl,imx25-tsadc
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: ipg
+
+ interrupt-controller: true
+
+ '#interrupt-cells':
+ const: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 1
+
+ ranges: true
+
+patternProperties:
+ '^touchscreen@[0-9a-f]+$':
+ type: object
+ $ref: /schemas/input/touchscreen/fsl,imx25-tcq.yaml
+ unevaluatedProperties: false
+
+ '^adc@[0-9a-f]+$':
+ type: object
+ $ref: /schemas/iio/adc/fsl,imx25-gcq.yaml
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - '#interrupt-cells'
+ - '#address-cells'
+ - '#size-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ tscadc@50030000 {
+ compatible = "fsl,imx25-tsadc";
+ reg = <0x50030000 0xc>;
+ interrupts = <46>;
+ clocks = <&clks 119>;
+ clock-names = "ipg";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ touchscreen@50030400 {
+ compatible = "fsl,imx25-tcq";
+ reg = <0x50030400 0x60>;
+ interrupts = <0>;
+ fsl,wires = <4>;
+ };
+
+ adc@50030800 {
+ compatible = "fsl,imx25-gcq";
+ reg = <0x50030800 0x60>;
+ interrupts = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt b/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
deleted file mode 100644
index b0350528699764c49e388362aaceb2311e9ec57e..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-Freescale MX25 ADC/TSC MultiFunction Device (MFD)
-
-This device combines two general purpose conversion queues one used for general
-ADC and the other used for touchscreens.
-
-Required properties:
- - compatible: Should be "fsl,imx25-tsadc".
- - reg: Start address and size of the memory area of
- the device
- - interrupts: Interrupt for this device
- (See: ../interrupt-controller/interrupts.txt)
- - clocks: An 'ipg' clock (See: ../clock/clock-bindings.txt)
- - interrupt-controller: This device is an interrupt controller. It
- controls the interrupts of both
- conversion queues.
- - #interrupt-cells: Should be '<1>'.
- - #address-cells: Should be '<1>'.
- - #size-cells: Should be '<1>'.
-
-This device includes two conversion queues which can be added as subnodes.
-The first queue is for the touchscreen, the second for general purpose ADC.
-
-Example:
- tscadc: tscadc@50030000 {
- compatible = "fsl,imx25-tsadc";
- reg = <0x50030000 0xc>;
- interrupts = <46>;
- clocks = <&clks 119>;
- clock-names = "ipg";
- interrupt-controller;
- #interrupt-cells = <1>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- tsc: tcq@50030400 {
- compatible = "fsl,imx25-tcq";
- reg = <0x50030400 0x60>;
- ...
- };
-
- adc: gcq@50030800 {
- compatible = "fsl,imx25-gcq";
- reg = <0x50030800 0x60>;
- ...
- };
- };
--
2.43.0
^ permalink raw reply related
* [PATCH 3/3] ARM: dts: imx25: rename node name tcq to touchscreen
From: Frank Li @ 2026-02-11 21:41 UTC (permalink / raw)
To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Lee Jones
Cc: linux-input, devicetree, imx, linux-arm-kernel, linux-kernel,
Frank Li
In-Reply-To: <20260211-yaml_mfd-v1-0-05cb48bc6f09@nxp.com>
Rename node name tcq to touchscreen to fix below CHECK_DTBS warnings:
arch/arm/boot/dts/nxp/imx/imx25-karo-tx25.dtb: tscadc@50030000 (fsl,imx25-tsadc): 'tcq@50030400' does not match any of the regexes: '^adc@[0-9a-f]+$', '^pinctrl-[0-9]+$', '^touchscreen@[0-9a-f]+$'
from schema $id: http://devicetree.org/schemas/mfd/fsl,imx25-tsadc.yaml
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
arch/arm/boot/dts/nxp/imx/imx25.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/nxp/imx/imx25.dtsi b/arch/arm/boot/dts/nxp/imx/imx25.dtsi
index d0f01f9b76afcfa0f38398ec29697b6d590a613a..0aa0d1931958c588bb816fa040aca6379ac67906 100644
--- a/arch/arm/boot/dts/nxp/imx/imx25.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx25.dtsi
@@ -305,7 +305,7 @@ adc: adc@50030800 {
status = "disabled";
};
- tsc: tcq@50030400 {
+ tsc: touchscreen@50030400 {
compatible = "fsl,imx25-tcq";
reg = <0x50030400 0x60>;
interrupt-parent = <&tscadc>;
--
2.43.0
^ permalink raw reply related
* [PATCH 1/1] dt-bindings: input: ti,ads7843: allow spi-cpol property
From: Frank Li @ 2026-02-11 21:44 UTC (permalink / raw)
To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Alexander Stein, Marek Vasut,
open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Cc: imx
Allow spi-cpol property for ti,ads7843.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
.../devicetree/bindings/input/touchscreen/ti,ads7843.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml b/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
index 8f6335d7da1c5..6d56e19d49e3f 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
@@ -38,6 +38,8 @@ properties:
wakeup-source: true
+ spi-cpol: true
+
ti,debounce-max:
deprecated: true
$ref: /schemas/types.yaml#/definitions/uint16
--
2.43.0
^ permalink raw reply related
* Re: [PATCH 1/1] dt-bindings: input: ti,ads7843: allow spi-cpol property
From: Marek Vasut @ 2026-02-11 22:14 UTC (permalink / raw)
To: Frank Li, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Alexander Stein, Marek Vasut,
open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Cc: imx
In-Reply-To: <20260211214409.3696442-1-Frank.Li@nxp.com>
On 2/11/26 10:44 PM, Frank Li wrote:
> Allow spi-cpol property for ti,ads7843.
... because ... why is this change valid ?
This information should be explained in the commit message.
^ permalink raw reply
* DRV260x: Support ACPI-enumerated devices
From: Yauhen Kharuzhy @ 2026-02-11 23:46 UTC (permalink / raw)
To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, Hans de Goede
Lenovo Yoga Book YB1-X90 and YB1-X91 tablets use haptics controllers
DRV2604L. The X91 (Windows tablet) uses ACPI to define its configuration,
such as I2C address and GPIO connections. The X90 (Android tablet)
doesn't have it in the ACPI, but the device may be defined as an
i2c_board in the x86-android-tablets driver.
To support these variants, add an ACPI matching table and add additional
I2C IDs to the I2C matching table (the driver supports DRV2604(L),
DRV2605(L) devices).
Also, add verification of the device ID on start, implement a timeout
for waiting for effect playback, and fix the non-working suspend in case
the 'vbat' regulator doesn't exist in the system.
^ permalink raw reply
* [PATCH 1/5] input: drv260x: Add I2C IDs for all device variants
From: Yauhen Kharuzhy @ 2026-02-11 23:46 UTC (permalink / raw)
To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, Hans de Goede, Yauhen Kharuzhy
In-Reply-To: <20260211235902.4156624-1-jekhor@gmail.com>
Add drv2604(L) and drv2605 to the list of supported I2C device IDs
for clarity.
Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
---
drivers/input/misc/drv260x.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index 96cd6a078c8a..18360bdfe877 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -598,6 +598,9 @@ static int drv260x_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(drv260x_pm_ops, drv260x_suspend, drv260x_resume);
static const struct i2c_device_id drv260x_id[] = {
+ { "drv2604" },
+ { "drv2604l" },
+ { "drv2605" },
{ "drv2605l" },
{ }
};
--
2.51.0
^ permalink raw reply related
* [PATCH 2/5] input: drv260x: Add support for ACPI-enumerated devices
From: Yauhen Kharuzhy @ 2026-02-11 23:46 UTC (permalink / raw)
To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, Hans de Goede, Yauhen Kharuzhy
In-Reply-To: <20260211235902.4156624-1-jekhor@gmail.com>
Add ACPI ids and GPIO lookup mapping for drv2604 haptics device.
Found in Lenovo Yoga Book YB1-X91L tablet.
Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
---
drivers/input/misc/drv260x.c | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index 18360bdfe877..f613c81fa2ba 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -15,6 +15,7 @@
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/regulator/consumer.h>
+#include <linux/acpi.h>
#include <dt-bindings/input/ti-drv260x.h>
@@ -419,6 +420,12 @@ static const struct regmap_config drv260x_regmap_config = {
.cache_type = REGCACHE_NONE,
};
+static const struct acpi_gpio_params enable_gpio = { 0, 0, false };
+static const struct acpi_gpio_mapping acpi_drv260x_default_gpios[] = {
+ { "enable-gpio", &enable_gpio, 1 },
+ { }
+};
+
static int drv260x_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
@@ -426,6 +433,14 @@ static int drv260x_probe(struct i2c_client *client)
u32 voltage;
int error;
+ if (has_acpi_companion(dev)) {
+ error = devm_acpi_dev_add_driver_gpios(dev, acpi_drv260x_default_gpios);
+ if (error) {
+ dev_err(dev, "can't add GPIO ACPI mapping\n");
+ return error;
+ }
+ }
+
haptics = devm_kzalloc(dev, sizeof(*haptics), GFP_KERNEL);
if (!haptics)
return -ENOMEM;
@@ -484,8 +499,10 @@ static int drv260x_probe(struct i2c_client *client)
return error;
}
- haptics->enable_gpio = devm_gpiod_get_optional(dev, "enable",
- GPIOD_OUT_HIGH);
+ haptics->enable_gpio = devm_gpiod_get_optional(dev,
+ "enable", GPIOD_OUT_HIGH);
+
+ dev_dbg(dev, "Enable gpio = 0x%p\n", haptics->enable_gpio);
if (IS_ERR(haptics->enable_gpio))
return PTR_ERR(haptics->enable_gpio);
@@ -606,6 +623,14 @@ static const struct i2c_device_id drv260x_id[] = {
};
MODULE_DEVICE_TABLE(i2c, drv260x_id);
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id drv260x_acpi_match[] = {
+ { "DRV2604", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(acpi, drv260x_acpi_match);
+#endif
+
static const struct of_device_id drv260x_of_match[] = {
{ .compatible = "ti,drv2604", },
{ .compatible = "ti,drv2604l", },
@@ -621,6 +646,7 @@ static struct i2c_driver drv260x_driver = {
.name = "drv260x-haptics",
.of_match_table = drv260x_of_match,
.pm = pm_sleep_ptr(&drv260x_pm_ops),
+ .acpi_match_table = ACPI_PTR(drv260x_acpi_match),
},
.id_table = drv260x_id,
};
--
2.51.0
^ permalink raw reply related
* [PATCH 3/5] input: drv260x: Check the device ID at initialization
From: Yauhen Kharuzhy @ 2026-02-11 23:46 UTC (permalink / raw)
To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, Hans de Goede, Yauhen Kharuzhy
In-Reply-To: <20260211235902.4156624-1-jekhor@gmail.com>
To ensure that the device is accessible on the I2C bus, read the status
register and check the Device ID field in drv260x_init().
Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
---
drivers/input/misc/drv260x.c | 44 ++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index f613c81fa2ba..f08a3d6c3ed8 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -56,6 +56,13 @@
#define DRV260X_LRA_RES_PERIOD 0x22
#define DRV260X_MAX_REG 0x23
+#define DRV260X_STATUS_ID_MASK 0xe0
+#define DRV260X_STATUS_ID_SHIFT 5
+#define DRV260X_ID_DRV2605 3
+#define DRV260X_ID_DRV2604 4
+#define DRV260X_ID_DRV2604L 6
+#define DRV260X_ID_DRV2605L 7
+
#define DRV260X_GO_BIT 0x01
/* Library Selection */
@@ -305,10 +312,47 @@ static const struct reg_sequence drv260x_erm_cal_regs[] = {
{ DRV260X_CTRL4, DRV260X_AUTOCAL_TIME_500MS },
};
+struct drv260x_id_map {
+ u8 id;
+ char *name;
+};
+
+static const struct drv260x_id_map drv_260x_devids[] = {
+ { DRV260X_ID_DRV2605, "DRV2605"},
+ { DRV260X_ID_DRV2604, "DRV2604"},
+ { DRV260X_ID_DRV2604L, "DRV2604L"},
+ { DRV260X_ID_DRV2605L, "DRV2605L"},
+};
+
+static char *drv260x_get_model(u8 id)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(drv_260x_devids); i++)
+ if (id == drv_260x_devids[i].id)
+ return drv_260x_devids[i].name;
+
+ return NULL;
+}
+
static int drv260x_init(struct drv260x_data *haptics)
{
int error;
unsigned int cal_buf;
+ u8 id;
+
+ error = regmap_read(haptics->regmap, DRV260X_STATUS, &cal_buf);
+ if (error) {
+ dev_err(&haptics->client->dev,
+ "Failed to read DRV260X_status register: %d\n",
+ error);
+ return error;
+ }
+
+ id = (cal_buf & DRV260X_STATUS_ID_MASK) >> DRV260X_STATUS_ID_SHIFT;
+
+ dev_info(&haptics->client->dev, "ID: %u (%s)\n", id,
+ drv260x_get_model(id));
error = regmap_write(haptics->regmap,
DRV260X_RATED_VOLT, haptics->rated_voltage);
--
2.51.0
^ permalink raw reply related
* [PATCH 4/5] input: drv260x: Stop waiting for GO bit clearing after timeout
From: Yauhen Kharuzhy @ 2026-02-11 23:46 UTC (permalink / raw)
To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, Hans de Goede, Yauhen Kharuzhy
In-Reply-To: <20260211235902.4156624-1-jekhor@gmail.com>
If something goes wrong during effect playing or calibration, the GO bit
may not be cleared after some time, and the driver will get stuck.
To prevent this, add a timeout to the waiting loop.
Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
---
drivers/input/misc/drv260x.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index f08a3d6c3ed8..f7bfac6d3973 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -173,6 +173,12 @@
#define DRV260X_AUTOCAL_TIME_500MS (2 << 4)
#define DRV260X_AUTOCAL_TIME_1000MS (3 << 4)
+/*
+ * Timeout for waiting for the GO status bit, in seconds. Should be reasonably
+ * large to allow long-duration effects and a calibration cycle
+ */
+#define DRV260X_GO_TIMEOUT_S 5
+
/**
* struct drv260x_data -
* @input_dev: Pointer to the input device
@@ -339,6 +345,7 @@ static int drv260x_init(struct drv260x_data *haptics)
{
int error;
unsigned int cal_buf;
+ unsigned long timeout;
u8 id;
error = regmap_read(haptics->regmap, DRV260X_STATUS, &cal_buf);
@@ -442,6 +449,7 @@ static int drv260x_init(struct drv260x_data *haptics)
return error;
}
+ timeout = jiffies + DRV260X_GO_TIMEOUT_S * HZ;
do {
usleep_range(15000, 15500);
error = regmap_read(haptics->regmap, DRV260X_GO, &cal_buf);
@@ -451,6 +459,10 @@ static int drv260x_init(struct drv260x_data *haptics)
error);
return error;
}
+ if (jiffies - timeout <= 0) {
+ dev_err(&haptics->client->dev, "GO timeout\n");
+ break;
+ }
} while (cal_buf == DRV260X_GO_BIT);
return 0;
--
2.51.0
^ permalink raw reply related
* [PATCH 5/5] input: drv260x: Don't try to disable dummy regulator
From: Yauhen Kharuzhy @ 2026-02-11 23:46 UTC (permalink / raw)
To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, Hans de Goede, Yauhen Kharuzhy
In-Reply-To: <20260211235902.4156624-1-jekhor@gmail.com>
Don't use a dummy regulator for 'vbat' because it cannot be disabled
during suspending.
Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
---
drivers/input/misc/drv260x.c | 44 +++++++++++++++++++++++-------------
1 file changed, 28 insertions(+), 16 deletions(-)
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index f7bfac6d3973..e82ede54c6f6 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -548,11 +548,17 @@ static int drv260x_probe(struct i2c_client *client)
haptics->overdrive_voltage = error ? DRV260X_DEF_OD_CLAMP_VOLT :
drv260x_calculate_voltage(voltage);
- haptics->regulator = devm_regulator_get(dev, "vbat");
+ haptics->regulator = devm_regulator_get_optional(dev, "vbat");
if (IS_ERR(haptics->regulator)) {
- error = PTR_ERR(haptics->regulator);
- dev_err(dev, "unable to get regulator, error: %d\n", error);
- return error;
+ if (PTR_ERR(haptics->regulator) == -ENODEV) {
+ haptics->regulator = NULL;
+ dev_dbg(dev, "No vbat regulator found\n");
+ } else {
+ error = PTR_ERR(haptics->regulator);
+ dev_err(dev, "unable to get regulator, error: %d\n",
+ error);
+ return error;
+ }
}
haptics->enable_gpio = devm_gpiod_get_optional(dev,
@@ -626,13 +632,15 @@ static int drv260x_suspend(struct device *dev)
gpiod_set_value(haptics->enable_gpio, 0);
- error = regulator_disable(haptics->regulator);
- if (error) {
- dev_err(dev, "Failed to disable regulator\n");
- regmap_update_bits(haptics->regmap,
- DRV260X_MODE,
- DRV260X_STANDBY_MASK, 0);
- return error;
+ if (haptics->regulator) {
+ error = regulator_disable(haptics->regulator);
+ if (error) {
+ dev_err(dev, "Failed to disable regulator\n");
+ regmap_update_bits(haptics->regmap,
+ DRV260X_MODE,
+ DRV260X_STANDBY_MASK, 0);
+ return error;
+ }
}
}
@@ -647,10 +655,12 @@ static int drv260x_resume(struct device *dev)
guard(mutex)(&haptics->input_dev->mutex);
if (input_device_enabled(haptics->input_dev)) {
- error = regulator_enable(haptics->regulator);
- if (error) {
- dev_err(dev, "Failed to enable regulator\n");
- return error;
+ if (haptics->regulator) {
+ error = regulator_enable(haptics->regulator);
+ if (error) {
+ dev_err(dev, "Failed to enable regulator\n");
+ return error;
+ }
}
error = regmap_update_bits(haptics->regmap,
@@ -658,7 +668,9 @@ static int drv260x_resume(struct device *dev)
DRV260X_STANDBY_MASK, 0);
if (error) {
dev_err(dev, "Failed to unset standby mode\n");
- regulator_disable(haptics->regulator);
+ if (haptics->regulator)
+ regulator_disable(haptics->regulator);
+
return error;
}
--
2.51.0
^ permalink raw reply related
* Re: [PATCH v2 08/11] dt-bindings: mfd: motorola-cpcap: convert to DT schema
From: Svyatoslav Ryhel @ 2026-02-12 5:30 UTC (permalink / raw)
To: Rob Herring
Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Krzysztof Kozlowski, Conor Dooley, Dmitry Torokhov, Lee Jones,
Pavel Machek, Liam Girdwood, Mark Brown, Dixit Parmar,
Tony Lindgren, linux-iio, devicetree, linux-kernel, linux-input,
linux-leds
In-Reply-To: <20260211212016.GA3910589-robh@kernel.org>
11 лютого 2026 р. 23:20:16 GMT+02:00, Rob Herring <robh@kernel.org> пише:
>On Fri, Feb 06, 2026 at 07:28:42PM +0200, Svyatoslav Ryhel wrote:
>> Convert devicetree bindings for the Motorola CPCAP MFD from TXT to YAML.
>>
>> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
>> ---
>> .../bindings/mfd/motorola,cpcap.yaml | 411 ++++++++++++++++++
>> .../bindings/mfd/motorola-cpcap.txt | 78 ----
>> 2 files changed, 411 insertions(+), 78 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
>> delete mode 100644 Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml b/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
>> new file mode 100644
>> index 000000000000..7e350721d9f6
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
>> @@ -0,0 +1,411 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/mfd/motorola,cpcap.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Motorola CPCAP PMIC MFD
>> +
>> +maintainers:
>> + - Svyatoslav Ryhel <clamor95@gmail.com>
>> +
>> +allOf:
>> + - $ref: /schemas/spi/spi-peripheral-props.yaml#
>> +
>> +properties:
>> + compatible:
>> + enum:
>> + - motorola,cpcap
>> + - st,6556002
>
>This does not match the only user in the kernel .dts files as
>"st,6556002" should be a fallback.
>
Honestly, I would remove st,6556002 since it is not the only cpcap model which can be used, hence it cannot serve as a universal fallback. Some devices use ST produced cpcap chips, others use TI and range of models varies too. I guess I have to multiply commits
>Rob
^ permalink raw reply
* Re: [PATCH RESEND] HID: winwing: Enable rumble effects
From: Dan Carpenter @ 2026-02-12 5:31 UTC (permalink / raw)
To: oe-kbuild, Ivan Gorinov, Jiri Kosina
Cc: lkp, oe-kbuild-all, linux-input, linux-kernel
In-Reply-To: <20260211053116.GA20357@altimeter-info>
Hi Ivan,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ivan-Gorinov/HID-winwing-Enable-rumble-effects/20260211-133322
base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
patch link: https://lore.kernel.org/r/20260211053116.GA20357%40altimeter-info
patch subject: [PATCH RESEND] HID: winwing: Enable rumble effects
config: parisc-randconfig-r071-20260211 (https://download.01.org/0day-ci/archive/20260212/202602120209.xYKh9QQp-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 8.5.0
smatch version: v0.5.0-8994-gd50c5a4c
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202602120209.xYKh9QQp-lkp@intel.com/
smatch warnings:
drivers/hid/hid-winwing.c:235 winwing_haptic_rumble() warn: address of NULL pointer 'data->hdev'
drivers/hid/hid-winwing.c:308 winwing_haptic_rumble_cb() warn: can 'data' even be NULL?
drivers/hid/hid-winwing.c:339 winwing_init_ff() warn: variable dereferenced before check 'data' (see line 333)
vim +235 drivers/hid/hid-winwing.c
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 221 static int winwing_haptic_rumble(struct winwing_drv_data *data)
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 222 {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 223 __u8 *buf;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 224 __u8 m;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 225
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 226 if (!data)
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 227 return -EINVAL;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 228
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 229 buf = data->report_rumble;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 230
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 231 if (!buf)
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 232 return -EINVAL;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 233
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 234 if (!data->hdev) {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 @235 hid_err(data->hdev, "data->hdev == NULL\n");
^^^^^^^^^^
This doesn't end up getting dereferenced because of dev_err() magic
but passing a NULL here is pointless.
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 236 return -EINVAL;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 237 }
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 238
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 239 if (!data->hdev->ll_driver) {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 240 hid_err(data->hdev, "data->hdev->ll_driver == NULL\n");
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 241 return -EINVAL;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 242 }
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 243
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 244 m = convert_magnitude(data->rumble.strong_magnitude);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 245 if (m != data->rumble_left) {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 246 int ret;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 247
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 248 buf[0] = 0x02;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 249 buf[1] = 0x01;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 250 buf[2] = 0xbf;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 251 buf[3] = 0x00;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 252 buf[4] = 0x00;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 253 buf[5] = 0x03;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 254 buf[6] = 0x49;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 255 buf[7] = 0x00;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 256 buf[8] = m;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 257 buf[9] = 0x00;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 258 buf[10] = 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 259 buf[11] = 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 260 buf[12] = 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 261 buf[13] = 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 262
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 263 ret = hid_hw_output_report(data->hdev, buf, 14);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 264 if (ret < 0) {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 265 hid_err(data->hdev, "error %d (%*ph)\n", ret, 14, buf);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 266 return ret;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 267 }
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 268 data->rumble_left = m;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 269 }
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 270
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 271 m = convert_magnitude(data->rumble.weak_magnitude);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 272 if (m != data->rumble_right) {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 273 int ret;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 274
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 275 buf[0] = 0x02;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 276 buf[1] = 0x03;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 277 buf[2] = 0xbf;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 278 buf[3] = 0x00;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 279 buf[4] = 0x00;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 280 buf[5] = 0x03;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 281 buf[6] = 0x49;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 282 buf[7] = 0x00;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 283 buf[8] = m;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 284 buf[9] = 0x00;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 285 buf[10] = 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 286 buf[11] = 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 287 buf[12] = 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 288 buf[13] = 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 289
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 290 ret = hid_hw_output_report(data->hdev, buf, 14);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 291 if (ret < 0) {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 292 hid_err(data->hdev, "error %d (%*ph)\n", ret, 14, buf);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 293 return ret;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 294 }
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 295 data->rumble_right = m;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 296 }
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 297
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 298 return 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 299 }
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 300
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 301
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 302 static void winwing_haptic_rumble_cb(struct work_struct *work)
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 303 {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 304 struct winwing_drv_data *data;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 305
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 306 data = container_of(work, struct winwing_drv_data, rumble_work);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 307
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 @308 if (data)
"data" can't be NULL. It's work minus an offset.
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 309 winwing_haptic_rumble(data);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 310 }
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 311
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 312 static int winwing_play_effect(struct input_dev *dev, void *context,
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 313 struct ff_effect *effect)
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 314 {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 315 struct winwing_drv_data *data = (struct winwing_drv_data *) context;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 316
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 317 if (effect->type != FF_RUMBLE)
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 318 return 0;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 319
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 320 if (!data)
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 321 return -EINVAL;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 322
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 323 data->rumble = effect->u.rumble;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 324
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 325 return schedule_work(&data->rumble_work);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 326 }
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 327
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 328 static int winwing_init_ff(struct hid_device *hdev, struct hid_input *hidinput)
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 329 {
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 330 struct winwing_drv_data *data;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 331
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 332 data = (struct winwing_drv_data *) hid_get_drvdata(hdev);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 @333 data->report_rumble = devm_kzalloc(&hdev->dev, MAX_REPORT, GFP_KERNEL);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 334 data->rumble_left = -1;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 335 data->rumble_right = -1;
^^^^^^^^^^^^^^^^^^
Dereferences here.
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 336
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 337 input_set_capability(hidinput->input, EV_FF, FF_RUMBLE);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 338
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 @339 if (!data)
^^^^^^
Checked too late.
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 340 return -EINVAL;
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 341
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 342 return input_ff_create_memless(hidinput->input, data,
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 343 winwing_play_effect);
c4c97b07cd09c03 Ivan Gorinov 2026-02-11 344 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH v5] arm64: dts: qcom: sm6125-xiaomi-laurel-sprout: Add Focaltech FT3518 touchscreen
From: Konrad Dybcio @ 2026-02-12 13:41 UTC (permalink / raw)
To: yedaya.ka, Kamil Gołda, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Andersson, Konrad Dybcio
Cc: linux-input, devicetree, linux-kernel, linux-arm-msm
In-Reply-To: <20260208-touchscreen-patches-v5-1-5821dff9c9a2@gmail.com>
On 2/8/26 10:24 PM, Yedaya Katsman via B4 Relay wrote:
> From: Yedaya Katsman <yedaya.ka@gmail.com>
>
> Add device tree node for the Focaltech FT3518 touchscreen on
> Xiaomi Mi A3 (laurel-sprout).
>
> Enable qupv3_id_0 and i2c2 bus that the touchscreen is on.
>
> Downstream references:
> Link: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/laurel-r-oss/arch/arm64/boot/dts/qcom/trinket-pinctrl.dtsi
> Link: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/laurel-r-oss/arch/arm64/boot/dts/qcom/laurel_sprout-qrd.dtsi
>
> Co-developed-by: Kamil Gołda <kamil.golda@protonmail.com>
> Signed-off-by: Kamil Gołda <kamil.golda@protonmail.com>
> Signed-off-by: Yedaya Katsman <yedaya.ka@gmail.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply
* Re: [PATCH] bcm5974: recover from failed mode switch
From: Dmitry Torokhov @ 2026-02-12 17:00 UTC (permalink / raw)
To: Liam Mitchell; +Cc: Henrik Rydberg, linux-input, linux-kernel
In-Reply-To: <20260207-bcm5974-reset-v1-1-af7163903fa6@gmail.com>
Hi Liam,
On Sat, Feb 07, 2026 at 06:16:26PM +0100, Liam Mitchell wrote:
> Mode switches sent before control response are ignored.
> On receiving unknown 8-byte packets, assume that mode switch was ignored
> and reset by switching to normal mode, waiting then switching back to
> wellspring mode.
>
> ---
> This patch addresses an issue where the bcm5974 driver switches modes
> before the device is ready, resulting in an unresponsive trackpad and
> "bcm5974: bad trackpad package, length: 8" repeated in logs.
>
> Discussion of issue in the thread:
> https://lore.kernel.org/linux-input/CAOQ1CL4+DP1TuLAGNsz5GdFBTHvnTg=5q=Dr2Z1OQc6RXydSYA@mail.gmail.com/
>
> This fix is conservative, avoiding changing existing mode-switch
> behavior because I cannot test all variations of hardware.
>
> On receiving an unknown 8-byte packet, we assume the device is not in
> wellspring mode and schedule an asynchronous mode reset.
>
> Signed-off-by: Liam Mitchell <mitchell.liam@gmail.com>
> ---
> drivers/input/mouse/bcm5974.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 42 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
> index dfdfb59cc8b5..85ddd65f2603 100644
> --- a/drivers/input/mouse/bcm5974.c
> +++ b/drivers/input/mouse/bcm5974.c
> @@ -286,6 +286,8 @@ struct bcm5974 {
> const struct tp_finger *index[MAX_FINGERS]; /* finger index data */
> struct input_mt_pos pos[MAX_FINGERS]; /* position array */
> int slots[MAX_FINGERS]; /* slot assignments */
> + struct work_struct mode_reset_work;
> + unsigned long last_mode_reset;
> };
>
> /* trackpad finger block data, le16-aligned */
> @@ -696,6 +698,34 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
> return retval;
> }
>
> +/*
> + * Mode switches sent before the control response are ignored.
> + * Fixing this state requires switching to normal mode and waiting
> + * 1ms before switching back to wellspring mode.
> + */
> +static void bcm5974_mode_reset_work(struct work_struct *work)
> +{
> + int error;
> + struct bcm5974 *dev = container_of(work, struct bcm5974, mode_reset_work);
> +
> + mutex_lock(&dev->pm_mutex);
guard(mutex)(&dev->pm_mutex);
> + dev->last_mode_reset = jiffies;
> +
> + error = bcm5974_wellspring_mode(dev, false);
> + if (error) {
> + dprintk(1, "bcm5974: reset to normal mode failed\n");
dev_err(...);
> + goto out;
return;
> + }
> +
> + msleep(1);
This duration is too short for msleep(). Use usleep_range() of fsleep().
> +
> + error = bcm5974_wellspring_mode(dev, true);
> + if (error)
> + dprintk(1, "bcm5974: mode switch after reset failed\n");
dev_err(...);
> + out:
> + mutex_unlock(&dev->pm_mutex);
Explicit unlock is not needed with guard().
> +}
> +
> static void bcm5974_irq_button(struct urb *urb)
> {
> struct bcm5974 *dev = urb->context;
> @@ -752,10 +782,18 @@ static void bcm5974_irq_trackpad(struct urb *urb)
> if (dev->tp_urb->actual_length == 2)
> goto exit;
>
> - if (report_tp_state(dev, dev->tp_urb->actual_length))
> + if (report_tp_state(dev, dev->tp_urb->actual_length)) {
> dprintk(1, "bcm5974: bad trackpad package, length: %d\n",
> dev->tp_urb->actual_length);
>
> + /* HID packet means we aren't in wellspring mode */
> + /* If we haven't tried a reset in the last second, try now */
> + if (dev->tp_urb->actual_length == 8 &&
> + time_after(jiffies, dev->last_mode_reset + msecs_to_jiffies(1000))) {
> + schedule_work(&dev->mode_reset_work);
> + }
> + }
> +
> exit:
> error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC);
> if (error)
> @@ -906,6 +944,8 @@ static int bcm5974_probe(struct usb_interface *iface,
> dev->intf = iface;
> dev->input = input_dev;
> dev->cfg = *cfg;
> + dev->last_mode_reset = 0;
No need to initialize with 0, kzalloc() takes care of this.
> + INIT_WORK(&dev->mode_reset_work, bcm5974_mode_reset_work);
> mutex_init(&dev->pm_mutex);
>
> /* setup urbs */
> @@ -998,6 +1038,7 @@ static void bcm5974_disconnect(struct usb_interface *iface)
> {
> struct bcm5974 *dev = usb_get_intfdata(iface);
>
> + cancel_work_sync(&dev->mode_reset_work);
Use disable_delayed_work_sync() instead to ensure it will not get
re-triggered.
> usb_set_intfdata(iface, NULL);
>
> input_unregister_device(dev->input);
Thanks.
--
Dmitry
^ permalink raw reply
* Logitech G29 wheel not centered after calibration
From: Kostadin Shishmanov @ 2026-02-12 17:25 UTC (permalink / raw)
To: linux-input@vger.kernel.org; +Cc: Jiri Kosina, Benjamin Tissoires
[-- Attachment #1: Type: text/plain, Size: 964 bytes --]
Whenever Linux initializes my Logitech G29 wheel, and the calibration is done, the wheel doesn't end up centered, and is instead rotated to the left. It works fine in Windows and even in BIOS.
lsusb reports it as:
```
046d:c24f Logitech, Inc. G29 Driving Force Racing Wheel [PS3]
```
If i switch its toggle to PS4 or PS5 mode, it does get centered properly post-calibration, but I can't actually use the wheel or pedals, only the buttons work, and Oversteer [1] doesn't detect it at all.
This is what it gets detected as:
```
Bus 001 Device 007: ID 046d:c260 Logitech, Inc. G29 Driving Force Racing Wheel [PS4]
```
Kernel version I am using is 6.19.0-g37a93dd5c49b.
The attached file is some output from evtest which may or may not be useful. Let me know if I can provide any further logging to debug the issue. I can also test a patch. Sorry if I've CC'd the wrong people.
Regards,
Kostadin
[1] https://github.com/berarma/oversteer
[-- Attachment #2: evtest.txt --]
[-- Type: text/plain, Size: 46556 bytes --]
Input device ID: bus 0x3 vendor 0x46d product 0xc24f version 0x111
Input device name: "Logitech G29 Driving Force Racing Wheel"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 288 (BTN_TRIGGER)
Event code 289 (BTN_THUMB)
Event code 290 (BTN_THUMB2)
Event code 291 (BTN_TOP)
Event code 292 (BTN_TOP2)
Event code 293 (BTN_PINKIE)
Event code 294 (BTN_BASE)
Event code 295 (BTN_BASE2)
Event code 296 (BTN_BASE3)
Event code 297 (BTN_BASE4)
Event code 298 (BTN_BASE5)
Event code 299 (BTN_BASE6)
Event code 300 (?)
Event code 301 (?)
Event code 302 (?)
Event code 303 (BTN_DEAD)
Event code 704 (BTN_TRIGGER_HAPPY1)
Event code 705 (BTN_TRIGGER_HAPPY2)
Event code 706 (BTN_TRIGGER_HAPPY3)
Event code 707 (BTN_TRIGGER_HAPPY4)
Event code 708 (BTN_TRIGGER_HAPPY5)
Event code 709 (BTN_TRIGGER_HAPPY6)
Event code 710 (BTN_TRIGGER_HAPPY7)
Event code 711 (BTN_TRIGGER_HAPPY8)
Event code 712 (BTN_TRIGGER_HAPPY9)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min 0
Max 65535
Event code 1 (ABS_Y)
Value 0
Min 0
Max 255
Event code 2 (ABS_Z)
Value 0
Min 0
Max 255
Event code 5 (ABS_RZ)
Value 0
Min 0
Max 255
Event code 16 (ABS_HAT0X)
Value 0
Min -1
Max 1
Event code 17 (ABS_HAT0Y)
Value 0
Min -1
Max 1
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Event type 21 (EV_FF)
Event code 82 (FF_CONSTANT)
Event code 96 (FF_GAIN)
Event code 97 (FF_AUTOCENTER)
Properties:
Testing ... (interrupt to exit)
Event: time 1770916889.927210, type 3 (EV_ABS), code 2 (ABS_Z), value 255
Event: time 1770916889.927210, type 3 (EV_ABS), code 5 (ABS_RZ), value 255
Event: time 1770916889.927210, type 3 (EV_ABS), code 1 (ABS_Y), value 255
Event: time 1770916889.927210, -------------- SYN_REPORT ------------
Event: time 1770916889.975204, type 3 (EV_ABS), code 0 (ABS_X), value 33
Event: time 1770916889.975204, -------------- SYN_REPORT ------------
Event: time 1770916889.977175, type 3 (EV_ABS), code 0 (ABS_X), value 97
Event: time 1770916889.977175, -------------- SYN_REPORT ------------
Event: time 1770916889.979198, type 3 (EV_ABS), code 0 (ABS_X), value 159
Event: time 1770916889.979198, -------------- SYN_REPORT ------------
Event: time 1770916889.981200, type 3 (EV_ABS), code 0 (ABS_X), value 223
Event: time 1770916889.981200, -------------- SYN_REPORT ------------
Event: time 1770916889.983208, type 3 (EV_ABS), code 0 (ABS_X), value 287
Event: time 1770916889.983208, -------------- SYN_REPORT ------------
Event: time 1770916889.985199, type 3 (EV_ABS), code 0 (ABS_X), value 352
Event: time 1770916889.985199, -------------- SYN_REPORT ------------
Event: time 1770916889.987200, type 3 (EV_ABS), code 0 (ABS_X), value 415
Event: time 1770916889.987200, -------------- SYN_REPORT ------------
Event: time 1770916889.989199, type 3 (EV_ABS), code 0 (ABS_X), value 477
Event: time 1770916889.989199, -------------- SYN_REPORT ------------
Event: time 1770916889.991208, type 3 (EV_ABS), code 0 (ABS_X), value 538
Event: time 1770916889.991208, -------------- SYN_REPORT ------------
Event: time 1770916889.993199, type 3 (EV_ABS), code 0 (ABS_X), value 599
Event: time 1770916889.993199, -------------- SYN_REPORT ------------
Event: time 1770916889.995200, type 3 (EV_ABS), code 0 (ABS_X), value 659
Event: time 1770916889.995200, -------------- SYN_REPORT ------------
Event: time 1770916889.997176, type 3 (EV_ABS), code 0 (ABS_X), value 720
Event: time 1770916889.997176, -------------- SYN_REPORT ------------
Event: time 1770916889.999202, type 3 (EV_ABS), code 0 (ABS_X), value 781
Event: time 1770916889.999202, -------------- SYN_REPORT ------------
Event: time 1770916890.001199, type 3 (EV_ABS), code 0 (ABS_X), value 842
Event: time 1770916890.001199, -------------- SYN_REPORT ------------
Event: time 1770916890.003177, type 3 (EV_ABS), code 0 (ABS_X), value 903
Event: time 1770916890.003177, -------------- SYN_REPORT ------------
Event: time 1770916890.005200, type 3 (EV_ABS), code 0 (ABS_X), value 964
Event: time 1770916890.005200, -------------- SYN_REPORT ------------
Event: time 1770916890.007202, type 3 (EV_ABS), code 0 (ABS_X), value 1024
Event: time 1770916890.007202, -------------- SYN_REPORT ------------
Event: time 1770916890.009177, type 3 (EV_ABS), code 0 (ABS_X), value 1083
Event: time 1770916890.009177, -------------- SYN_REPORT ------------
Event: time 1770916890.011199, type 3 (EV_ABS), code 0 (ABS_X), value 1143
Event: time 1770916890.011199, -------------- SYN_REPORT ------------
Event: time 1770916890.013203, type 3 (EV_ABS), code 0 (ABS_X), value 1201
Event: time 1770916890.013203, -------------- SYN_REPORT ------------
Event: time 1770916890.015210, type 3 (EV_ABS), code 0 (ABS_X), value 1262
Event: time 1770916890.015210, -------------- SYN_REPORT ------------
Event: time 1770916890.017200, type 3 (EV_ABS), code 0 (ABS_X), value 1322
Event: time 1770916890.017200, -------------- SYN_REPORT ------------
Event: time 1770916890.019200, type 3 (EV_ABS), code 0 (ABS_X), value 1383
Event: time 1770916890.019200, -------------- SYN_REPORT ------------
Event: time 1770916890.021200, type 3 (EV_ABS), code 0 (ABS_X), value 1442
Event: time 1770916890.021200, -------------- SYN_REPORT ------------
Event: time 1770916890.023210, type 3 (EV_ABS), code 0 (ABS_X), value 1502
Event: time 1770916890.023210, -------------- SYN_REPORT ------------
Event: time 1770916890.025200, type 3 (EV_ABS), code 0 (ABS_X), value 1561
Event: time 1770916890.025200, -------------- SYN_REPORT ------------
Event: time 1770916890.027200, type 3 (EV_ABS), code 0 (ABS_X), value 1620
Event: time 1770916890.027200, -------------- SYN_REPORT ------------
Event: time 1770916890.029178, type 3 (EV_ABS), code 0 (ABS_X), value 1678
Event: time 1770916890.029178, -------------- SYN_REPORT ------------
Event: time 1770916890.031204, type 3 (EV_ABS), code 0 (ABS_X), value 1737
Event: time 1770916890.031204, -------------- SYN_REPORT ------------
Event: time 1770916890.033200, type 3 (EV_ABS), code 0 (ABS_X), value 1797
Event: time 1770916890.033200, -------------- SYN_REPORT ------------
Event: time 1770916890.035177, type 3 (EV_ABS), code 0 (ABS_X), value 1857
Event: time 1770916890.035177, -------------- SYN_REPORT ------------
Event: time 1770916890.037201, type 3 (EV_ABS), code 0 (ABS_X), value 1918
Event: time 1770916890.037201, -------------- SYN_REPORT ------------
Event: time 1770916890.039204, type 3 (EV_ABS), code 0 (ABS_X), value 1975
Event: time 1770916890.039204, -------------- SYN_REPORT ------------
Event: time 1770916890.041178, type 3 (EV_ABS), code 0 (ABS_X), value 2033
Event: time 1770916890.041178, -------------- SYN_REPORT ------------
Event: time 1770916890.043201, type 3 (EV_ABS), code 0 (ABS_X), value 2089
Event: time 1770916890.043201, -------------- SYN_REPORT ------------
Event: time 1770916890.045200, type 3 (EV_ABS), code 0 (ABS_X), value 2145
Event: time 1770916890.045200, -------------- SYN_REPORT ------------
Event: time 1770916890.047210, type 3 (EV_ABS), code 0 (ABS_X), value 2200
Event: time 1770916890.047210, -------------- SYN_REPORT ------------
Event: time 1770916890.049201, type 3 (EV_ABS), code 0 (ABS_X), value 2257
Event: time 1770916890.049201, -------------- SYN_REPORT ------------
Event: time 1770916890.051201, type 3 (EV_ABS), code 0 (ABS_X), value 2313
Event: time 1770916890.051201, -------------- SYN_REPORT ------------
Event: time 1770916890.053201, type 3 (EV_ABS), code 0 (ABS_X), value 2368
Event: time 1770916890.053201, -------------- SYN_REPORT ------------
Event: time 1770916890.055210, type 3 (EV_ABS), code 0 (ABS_X), value 2423
Event: time 1770916890.055210, -------------- SYN_REPORT ------------
Event: time 1770916890.057202, type 3 (EV_ABS), code 0 (ABS_X), value 2476
Event: time 1770916890.057202, -------------- SYN_REPORT ------------
Event: time 1770916890.059201, type 3 (EV_ABS), code 0 (ABS_X), value 2531
Event: time 1770916890.059201, -------------- SYN_REPORT ------------
Event: time 1770916890.061178, type 3 (EV_ABS), code 0 (ABS_X), value 2586
Event: time 1770916890.061178, -------------- SYN_REPORT ------------
Event: time 1770916890.063205, type 3 (EV_ABS), code 0 (ABS_X), value 2641
Event: time 1770916890.063205, -------------- SYN_REPORT ------------
Event: time 1770916890.065201, type 3 (EV_ABS), code 0 (ABS_X), value 2696
Event: time 1770916890.065201, -------------- SYN_REPORT ------------
Event: time 1770916890.067178, type 3 (EV_ABS), code 0 (ABS_X), value 2750
Event: time 1770916890.067178, -------------- SYN_REPORT ------------
Event: time 1770916890.069201, type 3 (EV_ABS), code 0 (ABS_X), value 2805
Event: time 1770916890.069201, -------------- SYN_REPORT ------------
Event: time 1770916890.071206, type 3 (EV_ABS), code 0 (ABS_X), value 2858
Event: time 1770916890.071206, -------------- SYN_REPORT ------------
Event: time 1770916890.073179, type 3 (EV_ABS), code 0 (ABS_X), value 2912
Event: time 1770916890.073179, -------------- SYN_REPORT ------------
Event: time 1770916890.075201, type 3 (EV_ABS), code 0 (ABS_X), value 2965
Event: time 1770916890.075201, -------------- SYN_REPORT ------------
Event: time 1770916890.077202, type 3 (EV_ABS), code 0 (ABS_X), value 3019
Event: time 1770916890.077202, -------------- SYN_REPORT ------------
Event: time 1770916890.079212, type 3 (EV_ABS), code 0 (ABS_X), value 3073
Event: time 1770916890.079212, -------------- SYN_REPORT ------------
Event: time 1770916890.081202, type 3 (EV_ABS), code 0 (ABS_X), value 3126
Event: time 1770916890.081202, -------------- SYN_REPORT ------------
Event: time 1770916890.083202, type 3 (EV_ABS), code 0 (ABS_X), value 3179
Event: time 1770916890.083202, -------------- SYN_REPORT ------------
Event: time 1770916890.085203, type 3 (EV_ABS), code 0 (ABS_X), value 3232
Event: time 1770916890.085203, -------------- SYN_REPORT ------------
Event: time 1770916890.087211, type 3 (EV_ABS), code 0 (ABS_X), value 3285
Event: time 1770916890.087211, -------------- SYN_REPORT ------------
Event: time 1770916890.089202, type 3 (EV_ABS), code 0 (ABS_X), value 3339
Event: time 1770916890.089202, -------------- SYN_REPORT ------------
Event: time 1770916890.091203, type 3 (EV_ABS), code 0 (ABS_X), value 3392
Event: time 1770916890.091203, -------------- SYN_REPORT ------------
Event: time 1770916890.093179, type 3 (EV_ABS), code 0 (ABS_X), value 3445
Event: time 1770916890.093179, -------------- SYN_REPORT ------------
Event: time 1770916890.095205, type 3 (EV_ABS), code 0 (ABS_X), value 3499
Event: time 1770916890.095205, -------------- SYN_REPORT ------------
Event: time 1770916890.097202, type 3 (EV_ABS), code 0 (ABS_X), value 3551
Event: time 1770916890.097202, -------------- SYN_REPORT ------------
Event: time 1770916890.099180, type 3 (EV_ABS), code 0 (ABS_X), value 3603
Event: time 1770916890.099180, -------------- SYN_REPORT ------------
Event: time 1770916890.101202, type 3 (EV_ABS), code 0 (ABS_X), value 3654
Event: time 1770916890.101202, -------------- SYN_REPORT ------------
Event: time 1770916890.103205, type 3 (EV_ABS), code 0 (ABS_X), value 3706
Event: time 1770916890.103205, -------------- SYN_REPORT ------------
Event: time 1770916890.105180, type 3 (EV_ABS), code 0 (ABS_X), value 3757
Event: time 1770916890.105180, -------------- SYN_REPORT ------------
Event: time 1770916890.107203, type 3 (EV_ABS), code 0 (ABS_X), value 3808
Event: time 1770916890.107203, -------------- SYN_REPORT ------------
Event: time 1770916890.109203, type 3 (EV_ABS), code 0 (ABS_X), value 3857
Event: time 1770916890.109203, -------------- SYN_REPORT ------------
Event: time 1770916890.111212, type 3 (EV_ABS), code 0 (ABS_X), value 3906
Event: time 1770916890.111212, -------------- SYN_REPORT ------------
Event: time 1770916890.113204, type 3 (EV_ABS), code 0 (ABS_X), value 3955
Event: time 1770916890.113204, -------------- SYN_REPORT ------------
Event: time 1770916890.115203, type 3 (EV_ABS), code 0 (ABS_X), value 4004
Event: time 1770916890.115203, -------------- SYN_REPORT ------------
Event: time 1770916890.117199, type 3 (EV_ABS), code 0 (ABS_X), value 4054
Event: time 1770916890.117199, -------------- SYN_REPORT ------------
Event: time 1770916890.119213, type 3 (EV_ABS), code 0 (ABS_X), value 4102
Event: time 1770916890.119213, -------------- SYN_REPORT ------------
Event: time 1770916890.121203, type 3 (EV_ABS), code 0 (ABS_X), value 4151
Event: time 1770916890.121203, -------------- SYN_REPORT ------------
Event: time 1770916890.123203, type 3 (EV_ABS), code 0 (ABS_X), value 4199
Event: time 1770916890.123203, -------------- SYN_REPORT ------------
Event: time 1770916890.125180, type 3 (EV_ABS), code 0 (ABS_X), value 4247
Event: time 1770916890.125180, -------------- SYN_REPORT ------------
Event: time 1770916890.127207, type 3 (EV_ABS), code 0 (ABS_X), value 4296
Event: time 1770916890.127207, -------------- SYN_REPORT ------------
Event: time 1770916890.129204, type 3 (EV_ABS), code 0 (ABS_X), value 4343
Event: time 1770916890.129204, -------------- SYN_REPORT ------------
Event: time 1770916890.131180, type 3 (EV_ABS), code 0 (ABS_X), value 4390
Event: time 1770916890.131180, -------------- SYN_REPORT ------------
Event: time 1770916890.133204, type 3 (EV_ABS), code 0 (ABS_X), value 4438
Event: time 1770916890.133204, -------------- SYN_REPORT ------------
Event: time 1770916890.135204, type 3 (EV_ABS), code 0 (ABS_X), value 4486
Event: time 1770916890.135204, -------------- SYN_REPORT ------------
Event: time 1770916890.137181, type 3 (EV_ABS), code 0 (ABS_X), value 4533
Event: time 1770916890.137181, -------------- SYN_REPORT ------------
Event: time 1770916890.139204, type 3 (EV_ABS), code 0 (ABS_X), value 4581
Event: time 1770916890.139204, -------------- SYN_REPORT ------------
Event: time 1770916890.141205, type 3 (EV_ABS), code 0 (ABS_X), value 4627
Event: time 1770916890.141205, -------------- SYN_REPORT ------------
Event: time 1770916890.143213, type 3 (EV_ABS), code 0 (ABS_X), value 4674
Event: time 1770916890.143213, -------------- SYN_REPORT ------------
Event: time 1770916890.145204, type 3 (EV_ABS), code 0 (ABS_X), value 4721
Event: time 1770916890.145204, -------------- SYN_REPORT ------------
Event: time 1770916890.147204, type 3 (EV_ABS), code 0 (ABS_X), value 4768
Event: time 1770916890.147204, -------------- SYN_REPORT ------------
Event: time 1770916890.149205, type 3 (EV_ABS), code 0 (ABS_X), value 4814
Event: time 1770916890.149205, -------------- SYN_REPORT ------------
Event: time 1770916890.151213, type 3 (EV_ABS), code 0 (ABS_X), value 4860
Event: time 1770916890.151213, -------------- SYN_REPORT ------------
Event: time 1770916890.153204, type 3 (EV_ABS), code 0 (ABS_X), value 4905
Event: time 1770916890.153204, -------------- SYN_REPORT ------------
Event: time 1770916890.155205, type 3 (EV_ABS), code 0 (ABS_X), value 4951
Event: time 1770916890.155205, -------------- SYN_REPORT ------------
Event: time 1770916890.157181, type 3 (EV_ABS), code 0 (ABS_X), value 4997
Event: time 1770916890.157181, -------------- SYN_REPORT ------------
Event: time 1770916890.159208, type 3 (EV_ABS), code 0 (ABS_X), value 5044
Event: time 1770916890.159208, -------------- SYN_REPORT ------------
Event: time 1770916890.161206, type 3 (EV_ABS), code 0 (ABS_X), value 5090
Event: time 1770916890.161206, -------------- SYN_REPORT ------------
Event: time 1770916890.163181, type 3 (EV_ABS), code 0 (ABS_X), value 5135
Event: time 1770916890.163181, -------------- SYN_REPORT ------------
Event: time 1770916890.165204, type 3 (EV_ABS), code 0 (ABS_X), value 5181
Event: time 1770916890.165204, -------------- SYN_REPORT ------------
Event: time 1770916890.167208, type 3 (EV_ABS), code 0 (ABS_X), value 5226
Event: time 1770916890.167208, -------------- SYN_REPORT ------------
Event: time 1770916890.169183, type 3 (EV_ABS), code 0 (ABS_X), value 5270
Event: time 1770916890.169183, -------------- SYN_REPORT ------------
Event: time 1770916890.171205, type 3 (EV_ABS), code 0 (ABS_X), value 5315
Event: time 1770916890.171205, -------------- SYN_REPORT ------------
Event: time 1770916890.173205, type 3 (EV_ABS), code 0 (ABS_X), value 5360
Event: time 1770916890.173205, -------------- SYN_REPORT ------------
Event: time 1770916890.175215, type 3 (EV_ABS), code 0 (ABS_X), value 5402
Event: time 1770916890.175215, -------------- SYN_REPORT ------------
Event: time 1770916890.177205, type 3 (EV_ABS), code 0 (ABS_X), value 5445
Event: time 1770916890.177205, -------------- SYN_REPORT ------------
Event: time 1770916890.179205, type 3 (EV_ABS), code 0 (ABS_X), value 5489
Event: time 1770916890.179205, -------------- SYN_REPORT ------------
Event: time 1770916890.181205, type 3 (EV_ABS), code 0 (ABS_X), value 5531
Event: time 1770916890.181205, -------------- SYN_REPORT ------------
Event: time 1770916890.183221, type 3 (EV_ABS), code 0 (ABS_X), value 5573
Event: time 1770916890.183221, -------------- SYN_REPORT ------------
Event: time 1770916890.185205, type 3 (EV_ABS), code 0 (ABS_X), value 5615
Event: time 1770916890.185205, -------------- SYN_REPORT ------------
Event: time 1770916890.187205, type 3 (EV_ABS), code 0 (ABS_X), value 5656
Event: time 1770916890.187205, -------------- SYN_REPORT ------------
Event: time 1770916890.189185, type 3 (EV_ABS), code 0 (ABS_X), value 5697
Event: time 1770916890.189185, -------------- SYN_REPORT ------------
Event: time 1770916890.191209, type 3 (EV_ABS), code 0 (ABS_X), value 5738
Event: time 1770916890.191209, -------------- SYN_REPORT ------------
Event: time 1770916890.193206, type 3 (EV_ABS), code 0 (ABS_X), value 5780
Event: time 1770916890.193206, -------------- SYN_REPORT ------------
Event: time 1770916890.195182, type 3 (EV_ABS), code 0 (ABS_X), value 5821
Event: time 1770916890.195182, -------------- SYN_REPORT ------------
Event: time 1770916890.197206, type 3 (EV_ABS), code 0 (ABS_X), value 5863
Event: time 1770916890.197206, -------------- SYN_REPORT ------------
Event: time 1770916890.199209, type 3 (EV_ABS), code 0 (ABS_X), value 5904
Event: time 1770916890.199209, -------------- SYN_REPORT ------------
Event: time 1770916890.201183, type 3 (EV_ABS), code 0 (ABS_X), value 5944
Event: time 1770916890.201183, -------------- SYN_REPORT ------------
Event: time 1770916890.203207, type 3 (EV_ABS), code 0 (ABS_X), value 5983
Event: time 1770916890.203207, -------------- SYN_REPORT ------------
Event: time 1770916890.205206, type 3 (EV_ABS), code 0 (ABS_X), value 6023
Event: time 1770916890.205206, -------------- SYN_REPORT ------------
Event: time 1770916890.207215, type 3 (EV_ABS), code 0 (ABS_X), value 6062
Event: time 1770916890.207215, -------------- SYN_REPORT ------------
Event: time 1770916890.209207, type 3 (EV_ABS), code 0 (ABS_X), value 6102
Event: time 1770916890.209207, -------------- SYN_REPORT ------------
Event: time 1770916890.211206, type 3 (EV_ABS), code 0 (ABS_X), value 6142
Event: time 1770916890.211206, -------------- SYN_REPORT ------------
Event: time 1770916890.213207, type 3 (EV_ABS), code 0 (ABS_X), value 6182
Event: time 1770916890.213207, -------------- SYN_REPORT ------------
Event: time 1770916890.215211, type 3 (EV_ABS), code 0 (ABS_X), value 6222
Event: time 1770916890.215211, -------------- SYN_REPORT ------------
Event: time 1770916890.217207, type 3 (EV_ABS), code 0 (ABS_X), value 6260
Event: time 1770916890.217207, -------------- SYN_REPORT ------------
Event: time 1770916890.219206, type 3 (EV_ABS), code 0 (ABS_X), value 6299
Event: time 1770916890.219206, -------------- SYN_REPORT ------------
Event: time 1770916890.221183, type 3 (EV_ABS), code 0 (ABS_X), value 6338
Event: time 1770916890.221183, -------------- SYN_REPORT ------------
Event: time 1770916890.223209, type 3 (EV_ABS), code 0 (ABS_X), value 6377
Event: time 1770916890.223209, -------------- SYN_REPORT ------------
Event: time 1770916890.225207, type 3 (EV_ABS), code 0 (ABS_X), value 6416
Event: time 1770916890.225207, -------------- SYN_REPORT ------------
Event: time 1770916890.227183, type 3 (EV_ABS), code 0 (ABS_X), value 6454
Event: time 1770916890.227183, -------------- SYN_REPORT ------------
Event: time 1770916890.229212, type 3 (EV_ABS), code 0 (ABS_X), value 6492
Event: time 1770916890.229212, -------------- SYN_REPORT ------------
Event: time 1770916890.231211, type 3 (EV_ABS), code 0 (ABS_X), value 6528
Event: time 1770916890.231211, -------------- SYN_REPORT ------------
Event: time 1770916890.233184, type 3 (EV_ABS), code 0 (ABS_X), value 6565
Event: time 1770916890.233184, -------------- SYN_REPORT ------------
Event: time 1770916890.235207, type 3 (EV_ABS), code 0 (ABS_X), value 6603
Event: time 1770916890.235207, -------------- SYN_REPORT ------------
Event: time 1770916890.237208, type 3 (EV_ABS), code 0 (ABS_X), value 6641
Event: time 1770916890.237208, -------------- SYN_REPORT ------------
Event: time 1770916890.239217, type 3 (EV_ABS), code 0 (ABS_X), value 6679
Event: time 1770916890.239217, -------------- SYN_REPORT ------------
Event: time 1770916890.241207, type 3 (EV_ABS), code 0 (ABS_X), value 6717
Event: time 1770916890.241207, -------------- SYN_REPORT ------------
Event: time 1770916890.243207, type 3 (EV_ABS), code 0 (ABS_X), value 6755
Event: time 1770916890.243207, -------------- SYN_REPORT ------------
Event: time 1770916890.245208, type 3 (EV_ABS), code 0 (ABS_X), value 6792
Event: time 1770916890.245208, -------------- SYN_REPORT ------------
Event: time 1770916890.247216, type 3 (EV_ABS), code 0 (ABS_X), value 6828
Event: time 1770916890.247216, -------------- SYN_REPORT ------------
Event: time 1770916890.249203, type 3 (EV_ABS), code 0 (ABS_X), value 6863
Event: time 1770916890.249203, -------------- SYN_REPORT ------------
Event: time 1770916890.251208, type 3 (EV_ABS), code 0 (ABS_X), value 6899
Event: time 1770916890.251208, -------------- SYN_REPORT ------------
Event: time 1770916890.253185, type 3 (EV_ABS), code 0 (ABS_X), value 6934
Event: time 1770916890.253185, -------------- SYN_REPORT ------------
Event: time 1770916890.255211, type 3 (EV_ABS), code 0 (ABS_X), value 6970
Event: time 1770916890.255211, -------------- SYN_REPORT ------------
Event: time 1770916890.257208, type 3 (EV_ABS), code 0 (ABS_X), value 7005
Event: time 1770916890.257208, -------------- SYN_REPORT ------------
Event: time 1770916890.259186, type 3 (EV_ABS), code 0 (ABS_X), value 7040
Event: time 1770916890.259186, -------------- SYN_REPORT ------------
Event: time 1770916890.261208, type 3 (EV_ABS), code 0 (ABS_X), value 7074
Event: time 1770916890.261208, -------------- SYN_REPORT ------------
Event: time 1770916890.263211, type 3 (EV_ABS), code 0 (ABS_X), value 7108
Event: time 1770916890.263211, -------------- SYN_REPORT ------------
Event: time 1770916890.265187, type 3 (EV_ABS), code 0 (ABS_X), value 7142
Event: time 1770916890.265187, -------------- SYN_REPORT ------------
Event: time 1770916890.267208, type 3 (EV_ABS), code 0 (ABS_X), value 7176
Event: time 1770916890.267208, -------------- SYN_REPORT ------------
Event: time 1770916890.269208, type 3 (EV_ABS), code 0 (ABS_X), value 7208
Event: time 1770916890.269208, -------------- SYN_REPORT ------------
Event: time 1770916890.271217, type 3 (EV_ABS), code 0 (ABS_X), value 7241
Event: time 1770916890.271217, -------------- SYN_REPORT ------------
Event: time 1770916890.273209, type 3 (EV_ABS), code 0 (ABS_X), value 7273
Event: time 1770916890.273209, -------------- SYN_REPORT ------------
Event: time 1770916890.275208, type 3 (EV_ABS), code 0 (ABS_X), value 7306
Event: time 1770916890.275208, -------------- SYN_REPORT ------------
Event: time 1770916890.277209, type 3 (EV_ABS), code 0 (ABS_X), value 7338
Event: time 1770916890.277209, -------------- SYN_REPORT ------------
Event: time 1770916890.279218, type 3 (EV_ABS), code 0 (ABS_X), value 7370
Event: time 1770916890.279218, -------------- SYN_REPORT ------------
Event: time 1770916890.281208, type 3 (EV_ABS), code 0 (ABS_X), value 7402
Event: time 1770916890.281208, -------------- SYN_REPORT ------------
Event: time 1770916890.283208, type 3 (EV_ABS), code 0 (ABS_X), value 7434
Event: time 1770916890.283208, -------------- SYN_REPORT ------------
Event: time 1770916890.285185, type 3 (EV_ABS), code 0 (ABS_X), value 7466
Event: time 1770916890.285185, -------------- SYN_REPORT ------------
Event: time 1770916890.287213, type 3 (EV_ABS), code 0 (ABS_X), value 7497
Event: time 1770916890.287213, -------------- SYN_REPORT ------------
Event: time 1770916890.289210, type 3 (EV_ABS), code 0 (ABS_X), value 7528
Event: time 1770916890.289210, -------------- SYN_REPORT ------------
Event: time 1770916890.291186, type 3 (EV_ABS), code 0 (ABS_X), value 7559
Event: time 1770916890.291186, -------------- SYN_REPORT ------------
Event: time 1770916890.293209, type 3 (EV_ABS), code 0 (ABS_X), value 7589
Event: time 1770916890.293209, -------------- SYN_REPORT ------------
Event: time 1770916890.295214, type 3 (EV_ABS), code 0 (ABS_X), value 7619
Event: time 1770916890.295214, -------------- SYN_REPORT ------------
Event: time 1770916890.297186, type 3 (EV_ABS), code 0 (ABS_X), value 7648
Event: time 1770916890.297186, -------------- SYN_REPORT ------------
Event: time 1770916890.299209, type 3 (EV_ABS), code 0 (ABS_X), value 7679
Event: time 1770916890.299209, -------------- SYN_REPORT ------------
Event: time 1770916890.301210, type 3 (EV_ABS), code 0 (ABS_X), value 7709
Event: time 1770916890.301210, -------------- SYN_REPORT ------------
Event: time 1770916890.303218, type 3 (EV_ABS), code 0 (ABS_X), value 7741
Event: time 1770916890.303218, -------------- SYN_REPORT ------------
Event: time 1770916890.305209, type 3 (EV_ABS), code 0 (ABS_X), value 7770
Event: time 1770916890.305209, -------------- SYN_REPORT ------------
Event: time 1770916890.307210, type 3 (EV_ABS), code 0 (ABS_X), value 7799
Event: time 1770916890.307210, -------------- SYN_REPORT ------------
Event: time 1770916890.309209, type 3 (EV_ABS), code 0 (ABS_X), value 7827
Event: time 1770916890.309209, -------------- SYN_REPORT ------------
Event: time 1770916890.311218, type 3 (EV_ABS), code 0 (ABS_X), value 7857
Event: time 1770916890.311218, -------------- SYN_REPORT ------------
Event: time 1770916890.313209, type 3 (EV_ABS), code 0 (ABS_X), value 7886
Event: time 1770916890.313209, -------------- SYN_REPORT ------------
Event: time 1770916890.315210, type 3 (EV_ABS), code 0 (ABS_X), value 7915
Event: time 1770916890.315210, -------------- SYN_REPORT ------------
Event: time 1770916890.317186, type 3 (EV_ABS), code 0 (ABS_X), value 7944
Event: time 1770916890.317186, -------------- SYN_REPORT ------------
Event: time 1770916890.319212, type 3 (EV_ABS), code 0 (ABS_X), value 7973
Event: time 1770916890.319212, -------------- SYN_REPORT ------------
Event: time 1770916890.321211, type 3 (EV_ABS), code 0 (ABS_X), value 8001
Event: time 1770916890.321211, -------------- SYN_REPORT ------------
Event: time 1770916890.323187, type 3 (EV_ABS), code 0 (ABS_X), value 8028
Event: time 1770916890.323187, -------------- SYN_REPORT ------------
Event: time 1770916890.325210, type 3 (EV_ABS), code 0 (ABS_X), value 8055
Event: time 1770916890.325210, -------------- SYN_REPORT ------------
Event: time 1770916890.327216, type 3 (EV_ABS), code 0 (ABS_X), value 8082
Event: time 1770916890.327216, -------------- SYN_REPORT ------------
Event: time 1770916890.329187, type 3 (EV_ABS), code 0 (ABS_X), value 8110
Event: time 1770916890.329187, -------------- SYN_REPORT ------------
Event: time 1770916890.331210, type 3 (EV_ABS), code 0 (ABS_X), value 8137
Event: time 1770916890.331210, -------------- SYN_REPORT ------------
Event: time 1770916890.333210, type 3 (EV_ABS), code 0 (ABS_X), value 8165
Event: time 1770916890.333210, -------------- SYN_REPORT ------------
Event: time 1770916890.335220, type 3 (EV_ABS), code 0 (ABS_X), value 8191
Event: time 1770916890.335220, -------------- SYN_REPORT ------------
Event: time 1770916890.337210, type 3 (EV_ABS), code 0 (ABS_X), value 8218
Event: time 1770916890.337210, -------------- SYN_REPORT ------------
Event: time 1770916890.339210, type 3 (EV_ABS), code 0 (ABS_X), value 8243
Event: time 1770916890.339210, -------------- SYN_REPORT ------------
Event: time 1770916890.341211, type 3 (EV_ABS), code 0 (ABS_X), value 8269
Event: time 1770916890.341211, -------------- SYN_REPORT ------------
Event: time 1770916890.343220, type 3 (EV_ABS), code 0 (ABS_X), value 8296
Event: time 1770916890.343220, -------------- SYN_REPORT ------------
Event: time 1770916890.345210, type 3 (EV_ABS), code 0 (ABS_X), value 8322
Event: time 1770916890.345210, -------------- SYN_REPORT ------------
Event: time 1770916890.347206, type 3 (EV_ABS), code 0 (ABS_X), value 8349
Event: time 1770916890.347206, -------------- SYN_REPORT ------------
Event: time 1770916890.349190, type 3 (EV_ABS), code 0 (ABS_X), value 8374
Event: time 1770916890.349190, -------------- SYN_REPORT ------------
Event: time 1770916890.351214, type 3 (EV_ABS), code 0 (ABS_X), value 8399
Event: time 1770916890.351214, -------------- SYN_REPORT ------------
Event: time 1770916890.353211, type 3 (EV_ABS), code 0 (ABS_X), value 8424
Event: time 1770916890.353211, -------------- SYN_REPORT ------------
Event: time 1770916890.355190, type 3 (EV_ABS), code 0 (ABS_X), value 8449
Event: time 1770916890.355190, -------------- SYN_REPORT ------------
Event: time 1770916890.357211, type 3 (EV_ABS), code 0 (ABS_X), value 8473
Event: time 1770916890.357211, -------------- SYN_REPORT ------------
Event: time 1770916890.359215, type 3 (EV_ABS), code 0 (ABS_X), value 8497
Event: time 1770916890.359215, -------------- SYN_REPORT ------------
Event: time 1770916890.361188, type 3 (EV_ABS), code 0 (ABS_X), value 8522
Event: time 1770916890.361188, -------------- SYN_REPORT ------------
Event: time 1770916890.363212, type 3 (EV_ABS), code 0 (ABS_X), value 8547
Event: time 1770916890.363212, -------------- SYN_REPORT ------------
Event: time 1770916890.365211, type 3 (EV_ABS), code 0 (ABS_X), value 8571
Event: time 1770916890.365211, -------------- SYN_REPORT ------------
Event: time 1770916890.367220, type 3 (EV_ABS), code 0 (ABS_X), value 8594
Event: time 1770916890.367220, -------------- SYN_REPORT ------------
Event: time 1770916890.369211, type 3 (EV_ABS), code 0 (ABS_X), value 8617
Event: time 1770916890.369211, -------------- SYN_REPORT ------------
Event: time 1770916890.371212, type 3 (EV_ABS), code 0 (ABS_X), value 8639
Event: time 1770916890.371212, -------------- SYN_REPORT ------------
Event: time 1770916890.373212, type 3 (EV_ABS), code 0 (ABS_X), value 8662
Event: time 1770916890.373212, -------------- SYN_REPORT ------------
Event: time 1770916890.375221, type 3 (EV_ABS), code 0 (ABS_X), value 8686
Event: time 1770916890.375221, -------------- SYN_REPORT ------------
Event: time 1770916890.377212, type 3 (EV_ABS), code 0 (ABS_X), value 8708
Event: time 1770916890.377212, -------------- SYN_REPORT ------------
Event: time 1770916890.379212, type 3 (EV_ABS), code 0 (ABS_X), value 8731
Event: time 1770916890.379212, -------------- SYN_REPORT ------------
Event: time 1770916890.381184, type 3 (EV_ABS), code 0 (ABS_X), value 8752
Event: time 1770916890.381184, -------------- SYN_REPORT ------------
Event: time 1770916890.383216, type 3 (EV_ABS), code 0 (ABS_X), value 8773
Event: time 1770916890.383216, -------------- SYN_REPORT ------------
Event: time 1770916890.385212, type 3 (EV_ABS), code 0 (ABS_X), value 8794
Event: time 1770916890.385212, -------------- SYN_REPORT ------------
Event: time 1770916890.387189, type 3 (EV_ABS), code 0 (ABS_X), value 8815
Event: time 1770916890.387189, -------------- SYN_REPORT ------------
Event: time 1770916890.389212, type 3 (EV_ABS), code 0 (ABS_X), value 8836
Event: time 1770916890.389212, -------------- SYN_REPORT ------------
Event: time 1770916890.391217, type 3 (EV_ABS), code 0 (ABS_X), value 8856
Event: time 1770916890.391217, -------------- SYN_REPORT ------------
Event: time 1770916890.393189, type 3 (EV_ABS), code 0 (ABS_X), value 8876
Event: time 1770916890.393189, -------------- SYN_REPORT ------------
Event: time 1770916890.395212, type 3 (EV_ABS), code 0 (ABS_X), value 8896
Event: time 1770916890.395212, -------------- SYN_REPORT ------------
Event: time 1770916890.397213, type 3 (EV_ABS), code 0 (ABS_X), value 8915
Event: time 1770916890.397213, -------------- SYN_REPORT ------------
Event: time 1770916890.399221, type 3 (EV_ABS), code 0 (ABS_X), value 8934
Event: time 1770916890.399221, -------------- SYN_REPORT ------------
Event: time 1770916890.401212, type 3 (EV_ABS), code 0 (ABS_X), value 8952
Event: time 1770916890.401212, -------------- SYN_REPORT ------------
Event: time 1770916890.403213, type 3 (EV_ABS), code 0 (ABS_X), value 8972
Event: time 1770916890.403213, -------------- SYN_REPORT ------------
Event: time 1770916890.405213, type 3 (EV_ABS), code 0 (ABS_X), value 8991
Event: time 1770916890.405213, -------------- SYN_REPORT ------------
Event: time 1770916890.407222, type 3 (EV_ABS), code 0 (ABS_X), value 9010
Event: time 1770916890.407222, -------------- SYN_REPORT ------------
Event: time 1770916890.409212, type 3 (EV_ABS), code 0 (ABS_X), value 9029
Event: time 1770916890.409212, -------------- SYN_REPORT ------------
Event: time 1770916890.411213, type 3 (EV_ABS), code 0 (ABS_X), value 9047
Event: time 1770916890.411213, -------------- SYN_REPORT ------------
Event: time 1770916890.413190, type 3 (EV_ABS), code 0 (ABS_X), value 9064
Event: time 1770916890.413190, -------------- SYN_REPORT ------------
Event: time 1770916890.415216, type 3 (EV_ABS), code 0 (ABS_X), value 9082
Event: time 1770916890.415216, -------------- SYN_REPORT ------------
Event: time 1770916890.417213, type 3 (EV_ABS), code 0 (ABS_X), value 9098
Event: time 1770916890.417213, -------------- SYN_REPORT ------------
Event: time 1770916890.419191, type 3 (EV_ABS), code 0 (ABS_X), value 9115
Event: time 1770916890.419191, -------------- SYN_REPORT ------------
Event: time 1770916890.421213, type 3 (EV_ABS), code 0 (ABS_X), value 9132
Event: time 1770916890.421213, -------------- SYN_REPORT ------------
Event: time 1770916890.423221, type 3 (EV_ABS), code 0 (ABS_X), value 9149
Event: time 1770916890.423221, -------------- SYN_REPORT ------------
Event: time 1770916890.425192, type 3 (EV_ABS), code 0 (ABS_X), value 9167
Event: time 1770916890.425192, -------------- SYN_REPORT ------------
Event: time 1770916890.427213, type 3 (EV_ABS), code 0 (ABS_X), value 9183
Event: time 1770916890.427213, -------------- SYN_REPORT ------------
Event: time 1770916890.429213, type 3 (EV_ABS), code 0 (ABS_X), value 9200
Event: time 1770916890.429213, -------------- SYN_REPORT ------------
Event: time 1770916890.431222, type 3 (EV_ABS), code 0 (ABS_X), value 9216
Event: time 1770916890.431222, -------------- SYN_REPORT ------------
Event: time 1770916890.433214, type 3 (EV_ABS), code 0 (ABS_X), value 9231
Event: time 1770916890.433214, -------------- SYN_REPORT ------------
Event: time 1770916890.435214, type 3 (EV_ABS), code 0 (ABS_X), value 9247
Event: time 1770916890.435214, -------------- SYN_REPORT ------------
Event: time 1770916890.437213, type 3 (EV_ABS), code 0 (ABS_X), value 9263
Event: time 1770916890.437213, -------------- SYN_REPORT ------------
Event: time 1770916890.439224, type 3 (EV_ABS), code 0 (ABS_X), value 9279
Event: time 1770916890.439224, -------------- SYN_REPORT ------------
Event: time 1770916890.441214, type 3 (EV_ABS), code 0 (ABS_X), value 9295
Event: time 1770916890.441214, -------------- SYN_REPORT ------------
Event: time 1770916890.443214, type 3 (EV_ABS), code 0 (ABS_X), value 9310
Event: time 1770916890.443214, -------------- SYN_REPORT ------------
Event: time 1770916890.445191, type 3 (EV_ABS), code 0 (ABS_X), value 9326
Event: time 1770916890.445191, -------------- SYN_REPORT ------------
Event: time 1770916890.447218, type 3 (EV_ABS), code 0 (ABS_X), value 9340
Event: time 1770916890.447218, -------------- SYN_REPORT ------------
Event: time 1770916890.449214, type 3 (EV_ABS), code 0 (ABS_X), value 9355
Event: time 1770916890.449214, -------------- SYN_REPORT ------------
Event: time 1770916890.451191, type 3 (EV_ABS), code 0 (ABS_X), value 9370
Event: time 1770916890.451191, -------------- SYN_REPORT ------------
Event: time 1770916890.453215, type 3 (EV_ABS), code 0 (ABS_X), value 9384
Event: time 1770916890.453215, -------------- SYN_REPORT ------------
Event: time 1770916890.455218, type 3 (EV_ABS), code 0 (ABS_X), value 9399
Event: time 1770916890.455218, -------------- SYN_REPORT ------------
Event: time 1770916890.457191, type 3 (EV_ABS), code 0 (ABS_X), value 9413
Event: time 1770916890.457191, -------------- SYN_REPORT ------------
Event: time 1770916890.459214, type 3 (EV_ABS), code 0 (ABS_X), value 9427
Event: time 1770916890.459214, -------------- SYN_REPORT ------------
Event: time 1770916890.461215, type 3 (EV_ABS), code 0 (ABS_X), value 9440
Event: time 1770916890.461215, -------------- SYN_REPORT ------------
Event: time 1770916890.463224, type 3 (EV_ABS), code 0 (ABS_X), value 9454
Event: time 1770916890.463224, -------------- SYN_REPORT ------------
Event: time 1770916890.465215, type 3 (EV_ABS), code 0 (ABS_X), value 9468
Event: time 1770916890.465215, -------------- SYN_REPORT ------------
Event: time 1770916890.467216, type 3 (EV_ABS), code 0 (ABS_X), value 9481
Event: time 1770916890.467216, -------------- SYN_REPORT ------------
Event: time 1770916890.469215, type 3 (EV_ABS), code 0 (ABS_X), value 9493
Event: time 1770916890.469215, -------------- SYN_REPORT ------------
Event: time 1770916890.471224, type 3 (EV_ABS), code 0 (ABS_X), value 9506
Event: time 1770916890.471224, -------------- SYN_REPORT ------------
Event: time 1770916890.473216, type 3 (EV_ABS), code 0 (ABS_X), value 9519
Event: time 1770916890.473216, -------------- SYN_REPORT ------------
Event: time 1770916890.475216, type 3 (EV_ABS), code 0 (ABS_X), value 9531
Event: time 1770916890.475216, -------------- SYN_REPORT ------------
Event: time 1770916890.477192, type 3 (EV_ABS), code 0 (ABS_X), value 9543
Event: time 1770916890.477192, -------------- SYN_REPORT ------------
Event: time 1770916890.479218, type 3 (EV_ABS), code 0 (ABS_X), value 9555
Event: time 1770916890.479218, -------------- SYN_REPORT ------------
Event: time 1770916890.481216, type 3 (EV_ABS), code 0 (ABS_X), value 9566
Event: time 1770916890.481216, -------------- SYN_REPORT ------------
Event: time 1770916890.483192, type 3 (EV_ABS), code 0 (ABS_X), value 9578
Event: time 1770916890.483192, -------------- SYN_REPORT ------------
Event: time 1770916890.485215, type 3 (EV_ABS), code 0 (ABS_X), value 9589
Event: time 1770916890.485215, -------------- SYN_REPORT ------------
Event: time 1770916890.487219, type 3 (EV_ABS), code 0 (ABS_X), value 9600
Event: time 1770916890.487219, -------------- SYN_REPORT ------------
Event: time 1770916890.489193, type 3 (EV_ABS), code 0 (ABS_X), value 9611
Event: time 1770916890.489193, -------------- SYN_REPORT ------------
Event: time 1770916890.491215, type 3 (EV_ABS), code 0 (ABS_X), value 9622
Event: time 1770916890.491215, -------------- SYN_REPORT ------------
Event: time 1770916890.493215, type 3 (EV_ABS), code 0 (ABS_X), value 9632
Event: time 1770916890.493215, -------------- SYN_REPORT ------------
Event: time 1770916890.495225, type 3 (EV_ABS), code 0 (ABS_X), value 9642
Event: time 1770916890.495225, -------------- SYN_REPORT ------------
Event: time 1770916890.497216, type 3 (EV_ABS), code 0 (ABS_X), value 9651
Event: time 1770916890.497216, -------------- SYN_REPORT ------------
Event: time 1770916890.499215, type 3 (EV_ABS), code 0 (ABS_X), value 9660
Event: time 1770916890.499215, -------------- SYN_REPORT ------------
Event: time 1770916890.501216, type 3 (EV_ABS), code 0 (ABS_X), value 9670
Event: time 1770916890.501216, -------------- SYN_REPORT ------------
Event: time 1770916890.503225, type 3 (EV_ABS), code 0 (ABS_X), value 9680
Event: time 1770916890.503225, -------------- SYN_REPORT ------------
Event: time 1770916890.505216, type 3 (EV_ABS), code 0 (ABS_X), value 9689
Event: time 1770916890.505216, -------------- SYN_REPORT ------------
Event: time 1770916890.507216, type 3 (EV_ABS), code 0 (ABS_X), value 9697
Event: time 1770916890.507216, -------------- SYN_REPORT ------------
Event: time 1770916890.509194, type 3 (EV_ABS), code 0 (ABS_X), value 9705
Event: time 1770916890.509194, -------------- SYN_REPORT ------------
Event: time 1770916890.511219, type 3 (EV_ABS), code 0 (ABS_X), value 9713
Event: time 1770916890.511219, -------------- SYN_REPORT ------------
Event: time 1770916890.513211, type 3 (EV_ABS), code 0 (ABS_X), value 9722
Event: time 1770916890.513211, -------------- SYN_REPORT ------------
Event: time 1770916890.515193, type 3 (EV_ABS), code 0 (ABS_X), value 9729
Event: time 1770916890.515193, -------------- SYN_REPORT ------------
Event: time 1770916890.517218, type 3 (EV_ABS), code 0 (ABS_X), value 9738
Event: time 1770916890.517218, -------------- SYN_REPORT ------------
Event: time 1770916890.519219, type 3 (EV_ABS), code 0 (ABS_X), value 9745
Event: time 1770916890.519219, -------------- SYN_REPORT ------------
Event: time 1770916890.521193, type 3 (EV_ABS), code 0 (ABS_X), value 9752
Event: time 1770916890.521193, -------------- SYN_REPORT ------------
Event: time 1770916890.523217, type 3 (EV_ABS), code 0 (ABS_X), value 9759
Event: time 1770916890.523217, -------------- SYN_REPORT ------------
Event: time 1770916890.525216, type 3 (EV_ABS), code 0 (ABS_X), value 9766
Event: time 1770916890.525216, -------------- SYN_REPORT ------------
Event: time 1770916890.527226, type 3 (EV_ABS), code 0 (ABS_X), value 9772
Event: time 1770916890.527226, -------------- SYN_REPORT ------------
Event: time 1770916890.529217, type 3 (EV_ABS), code 0 (ABS_X), value 9778
Event: time 1770916890.529217, -------------- SYN_REPORT ------------
Event: time 1770916890.531216, type 3 (EV_ABS), code 0 (ABS_X), value 9784
Event: time 1770916890.531216, -------------- SYN_REPORT ------------
Event: time 1770916890.533217, type 3 (EV_ABS), code 0 (ABS_X), value 9790
Event: time 1770916890.533217, -------------- SYN_REPORT ------------
Event: time 1770916890.535226, type 3 (EV_ABS), code 0 (ABS_X), value 9795
Event: time 1770916890.535226, -------------- SYN_REPORT ------------
Event: time 1770916890.537218, type 3 (EV_ABS), code 0 (ABS_X), value 9801
Event: time 1770916890.537218, -------------- SYN_REPORT ------------
Event: time 1770916890.539217, type 3 (EV_ABS), code 0 (ABS_X), value 9807
Event: time 1770916890.539217, -------------- SYN_REPORT ------------
Event: time 1770916890.541194, type 3 (EV_ABS), code 0 (ABS_X), value 9811
Event: time 1770916890.541194, -------------- SYN_REPORT ------------
Event: time 1770916890.543222, type 3 (EV_ABS), code 0 (ABS_X), value 9816
Event: time 1770916890.543222, -------------- SYN_REPORT ------------
Event: time 1770916890.545217, type 3 (EV_ABS), code 0 (ABS_X), value 9821
Event: time 1770916890.545217, -------------- SYN_REPORT ------------
Event: time 1770916890.547194, type 3 (EV_ABS), code 0 (ABS_X), value 9825
Event: time 1770916890.547194, -------------- SYN_REPORT ------------
Event: time 1770916890.549217, type 3 (EV_ABS), code 0 (ABS_X), value 9829
Event: time 1770916890.549217, -------------- SYN_REPORT ------------
Event: time 1770916890.551219, type 3 (EV_ABS), code 0 (ABS_X), value 9834
Event: time 1770916890.551219, -------------- SYN_REPORT ------------
Event: time 1770916890.553194, type 3 (EV_ABS), code 0 (ABS_X), value 9837
Event: time 1770916890.553194, -------------- SYN_REPORT ------------
Event: time 1770916890.555217, type 3 (EV_ABS), code 0 (ABS_X), value 9840
Event: time 1770916890.555217, -------------- SYN_REPORT ------------
Event: time 1770916890.557219, type 3 (EV_ABS), code 0 (ABS_X), value 9844
Event: time 1770916890.557219, -------------- SYN_REPORT ------------
Event: time 1770916890.559227, type 3 (EV_ABS), code 0 (ABS_X), value 9847
Event: time 1770916890.559227, -------------- SYN_REPORT ------------
Event: time 1770916890.561218, type 3 (EV_ABS), code 0 (ABS_X), value 9851
Event: time 1770916890.561218, -------------- SYN_REPORT ------------
Event: time 1770916890.563217, type 3 (EV_ABS), code 0 (ABS_X), value 9854
Event: time 1770916890.563217, -------------- SYN_REPORT ------------
Event: time 1770916890.565219, type 3 (EV_ABS), code 0 (ABS_X), value 9856
Event: time 1770916890.565219, -------------- SYN_REPORT ------------
Event: time 1770916890.567227, type 3 (EV_ABS), code 0 (ABS_X), value 9859
Event: time 1770916890.567227, -------------- SYN_REPORT ------------
Event: time 1770916890.569218, type 3 (EV_ABS), code 0 (ABS_X), value 9861
Event: time 1770916890.569218, -------------- SYN_REPORT ------------
Event: time 1770916890.571218, type 3 (EV_ABS), code 0 (ABS_X), value 9864
Event: time 1770916890.571218, -------------- SYN_REPORT ------------
Event: time 1770916890.573196, type 3 (EV_ABS), code 0 (ABS_X), value 9865
Event: time 1770916890.573196, -------------- SYN_REPORT ------------
Event: time 1770916890.575221, type 3 (EV_ABS), code 0 (ABS_X), value 9867
Event: time 1770916890.575221, -------------- SYN_REPORT ------------
Event: time 1770916890.577218, type 3 (EV_ABS), code 0 (ABS_X), value 9868
Event: time 1770916890.577218, -------------- SYN_REPORT ------------
Event: time 1770916890.579196, type 3 (EV_ABS), code 0 (ABS_X), value 9869
Event: time 1770916890.579196, -------------- SYN_REPORT ------------
Event: time 1770916890.581218, type 3 (EV_ABS), code 0 (ABS_X), value 9871
Event: time 1770916890.581218, -------------- SYN_REPORT ------------
Event: time 1770916890.583222, type 3 (EV_ABS), code 0 (ABS_X), value 9872
Event: time 1770916890.583222, -------------- SYN_REPORT ------------
Event: time 1770916890.587220, type 3 (EV_ABS), code 0 (ABS_X), value 9873
Event: time 1770916890.587220, -------------- SYN_REPORT ------------
Event: time 1770916890.591228, type 3 (EV_ABS), code 0 (ABS_X), value 9874
Event: time 1770916890.591228, -------------- SYN_REPORT ------------
^ permalink raw reply
* Re: [PATCH 2/5] input: drv260x: Add support for ACPI-enumerated devices
From: Dmitry Torokhov @ 2026-02-12 17:26 UTC (permalink / raw)
To: Yauhen Kharuzhy; +Cc: linux-input, linux-kernel, Hans de Goede
In-Reply-To: <20260211235902.4156624-3-jekhor@gmail.com>
Hi Yauhen,
On Thu, Feb 12, 2026 at 01:46:52AM +0200, Yauhen Kharuzhy wrote:
> Add ACPI ids and GPIO lookup mapping for drv2604 haptics device.
> Found in Lenovo Yoga Book YB1-X91L tablet.
>
> Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
> ---
> drivers/input/misc/drv260x.c | 30 ++++++++++++++++++++++++++++--
> 1 file changed, 28 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
> index 18360bdfe877..f613c81fa2ba 100644
> --- a/drivers/input/misc/drv260x.c
> +++ b/drivers/input/misc/drv260x.c
> @@ -15,6 +15,7 @@
> #include <linux/delay.h>
> #include <linux/gpio/consumer.h>
> #include <linux/regulator/consumer.h>
> +#include <linux/acpi.h>
Sort alphabetically please.
>
> #include <dt-bindings/input/ti-drv260x.h>
>
> @@ -419,6 +420,12 @@ static const struct regmap_config drv260x_regmap_config = {
> .cache_type = REGCACHE_NONE,
> };
>
> +static const struct acpi_gpio_params enable_gpio = { 0, 0, false };
> +static const struct acpi_gpio_mapping acpi_drv260x_default_gpios[] = {
> + { "enable-gpio", &enable_gpio, 1 },
> + { }
> +};
I'd rather move this ACPI/device-specifin handling into drivers/platform/x86/x86-android-tablets/lenovo.c
> +
> static int drv260x_probe(struct i2c_client *client)
> {
> struct device *dev = &client->dev;
> @@ -426,6 +433,14 @@ static int drv260x_probe(struct i2c_client *client)
> u32 voltage;
> int error;
>
> + if (has_acpi_companion(dev)) {
> + error = devm_acpi_dev_add_driver_gpios(dev, acpi_drv260x_default_gpios);
> + if (error) {
> + dev_err(dev, "can't add GPIO ACPI mapping\n");
> + return error;
> + }
> + }
> +
> haptics = devm_kzalloc(dev, sizeof(*haptics), GFP_KERNEL);
> if (!haptics)
> return -ENOMEM;
> @@ -484,8 +499,10 @@ static int drv260x_probe(struct i2c_client *client)
> return error;
> }
>
> - haptics->enable_gpio = devm_gpiod_get_optional(dev, "enable",
> - GPIOD_OUT_HIGH);
> + haptics->enable_gpio = devm_gpiod_get_optional(dev,
> + "enable", GPIOD_OUT_HIGH);
Why this change?
> +
> + dev_dbg(dev, "Enable gpio = 0x%p\n", haptics->enable_gpio);
?
> if (IS_ERR(haptics->enable_gpio))
> return PTR_ERR(haptics->enable_gpio);
>
> @@ -606,6 +623,14 @@ static const struct i2c_device_id drv260x_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, drv260x_id);
>
> +#ifdef CONFIG_ACPI
> +static const struct acpi_device_id drv260x_acpi_match[] = {
> + { "DRV2604", 0 },
> + { }
> +};
> +MODULE_DEVICE_TABLE(acpi, drv260x_acpi_match);
> +#endif
> +
> static const struct of_device_id drv260x_of_match[] = {
> { .compatible = "ti,drv2604", },
> { .compatible = "ti,drv2604l", },
> @@ -621,6 +646,7 @@ static struct i2c_driver drv260x_driver = {
> .name = "drv260x-haptics",
> .of_match_table = drv260x_of_match,
> .pm = pm_sleep_ptr(&drv260x_pm_ops),
> + .acpi_match_table = ACPI_PTR(drv260x_acpi_match),
> },
> .id_table = drv260x_id,
> };
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH 3/5] input: drv260x: Check the device ID at initialization
From: Dmitry Torokhov @ 2026-02-12 17:28 UTC (permalink / raw)
To: Yauhen Kharuzhy; +Cc: linux-input, linux-kernel, Hans de Goede
In-Reply-To: <20260211235902.4156624-4-jekhor@gmail.com>
On Thu, Feb 12, 2026 at 01:46:53AM +0200, Yauhen Kharuzhy wrote:
> To ensure that the device is accessible on the I2C bus, read the status
> register and check the Device ID field in drv260x_init().
>
> Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
> ---
> drivers/input/misc/drv260x.c | 44 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
> index f613c81fa2ba..f08a3d6c3ed8 100644
> --- a/drivers/input/misc/drv260x.c
> +++ b/drivers/input/misc/drv260x.c
> @@ -56,6 +56,13 @@
> #define DRV260X_LRA_RES_PERIOD 0x22
> #define DRV260X_MAX_REG 0x23
>
> +#define DRV260X_STATUS_ID_MASK 0xe0
> +#define DRV260X_STATUS_ID_SHIFT 5
> +#define DRV260X_ID_DRV2605 3
> +#define DRV260X_ID_DRV2604 4
> +#define DRV260X_ID_DRV2604L 6
> +#define DRV260X_ID_DRV2605L 7
> +
> #define DRV260X_GO_BIT 0x01
>
> /* Library Selection */
> @@ -305,10 +312,47 @@ static const struct reg_sequence drv260x_erm_cal_regs[] = {
> { DRV260X_CTRL4, DRV260X_AUTOCAL_TIME_500MS },
> };
>
> +struct drv260x_id_map {
> + u8 id;
> + char *name;
> +};
> +
> +static const struct drv260x_id_map drv_260x_devids[] = {
> + { DRV260X_ID_DRV2605, "DRV2605"},
> + { DRV260X_ID_DRV2604, "DRV2604"},
> + { DRV260X_ID_DRV2604L, "DRV2604L"},
> + { DRV260X_ID_DRV2605L, "DRV2605L"},
> +};
> +
> +static char *drv260x_get_model(u8 id)
> +{
> + int i;
> +
> + for (i = 0; i < ARRAY_SIZE(drv_260x_devids); i++)
> + if (id == drv_260x_devids[i].id)
> + return drv_260x_devids[i].name;
> +
> + return NULL;
> +}
> +
> static int drv260x_init(struct drv260x_data *haptics)
> {
> int error;
> unsigned int cal_buf;
> + u8 id;
> +
> + error = regmap_read(haptics->regmap, DRV260X_STATUS, &cal_buf);
> + if (error) {
> + dev_err(&haptics->client->dev,
> + "Failed to read DRV260X_status register: %d\n",
> + error);
> + return error;
> + }
> +
> + id = (cal_buf & DRV260X_STATUS_ID_MASK) >> DRV260X_STATUS_ID_SHIFT;
> +
> + dev_info(&haptics->client->dev, "ID: %u (%s)\n", id,
> + drv260x_get_model(id));
>
> error = regmap_write(haptics->regmap,
> DRV260X_RATED_VOLT, haptics->rated_voltage);
If the device is not available this regmap_write() will fail so I am not
sure why we need all this new code.
Thanks.
--
Dmitry
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox