Skip to content

Commit f3e6942

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: - a fix to generate proper timestamps on key autorepeat events that were broken recently - a fix for Synaptics driver to only activate reduced reporting mode when explicitly requested - a new keycode for "selective screenshot" function - other assorted fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: fix stale timestamp on key autorepeat events Input: move the new KEY_SELECTIVE_SCREENSHOT keycode Input: avoid BIT() macro usage in the serio.h UAPI header Input: synaptics-rmi4 - set reduced reporting mode only when requested Input: synaptics - enable RMI on HP Envy 13-ad105ng Input: allocate keycode for "Selective Screenshot" key Input: tm2-touchkey - add support for Coreriver TC360 variant dt-bindings: input: add Coreriver TC360 binding dt-bindings: vendor-prefixes: Add Coreriver vendor prefix Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger()
2 parents 9efcc4a + 4134252 commit f3e6942

File tree

9 files changed

+30
-11
lines changed

9 files changed

+30
-11
lines changed

Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Required properties:
55
* "cypress,tm2-touchkey" - for the touchkey found on the tm2 board
66
* "cypress,midas-touchkey" - for the touchkey found on midas boards
77
* "cypress,aries-touchkey" - for the touchkey found on aries boards
8+
* "coreriver,tc360-touchkey" - for the Coreriver TouchCore 360 touchkey
89
- reg: I2C address of the chip.
910
- interrupts: interrupt to which the chip is connected (see interrupt
1011
binding[0]).

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ patternProperties:
205205
description: Colorful GRP, Shenzhen Xueyushi Technology Ltd.
206206
"^compulab,.*":
207207
description: CompuLab Ltd.
208+
"^coreriver,.*":
209+
description: CORERIVER Semiconductor Co.,Ltd.
208210
"^corpro,.*":
209211
description: Chengdu Corpro Technology Co., Ltd.
210212
"^cortina,.*":

drivers/input/input.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ static void input_repeat_key(struct timer_list *t)
190190
input_value_sync
191191
};
192192

193+
input_set_timestamp(dev, ktime_get());
193194
input_pass_values(dev, vals, ARRAY_SIZE(vals));
194195

195196
if (dev->rep[REP_PERIOD])

drivers/input/keyboard/tm2-touchkey.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ static struct touchkey_variant aries_touchkey_variant = {
7575
.cmd_led_off = ARIES_TOUCHKEY_CMD_LED_OFF,
7676
};
7777

78+
static const struct touchkey_variant tc360_touchkey_variant = {
79+
.keycode_reg = 0x00,
80+
.base_reg = 0x00,
81+
.fixed_regulator = true,
82+
.cmd_led_on = TM2_TOUCHKEY_CMD_LED_ON,
83+
.cmd_led_off = TM2_TOUCHKEY_CMD_LED_OFF,
84+
};
85+
7886
static int tm2_touchkey_led_brightness_set(struct led_classdev *led_dev,
7987
enum led_brightness brightness)
8088
{
@@ -327,6 +335,9 @@ static const struct of_device_id tm2_touchkey_of_match[] = {
327335
}, {
328336
.compatible = "cypress,aries-touchkey",
329337
.data = &aries_touchkey_variant,
338+
}, {
339+
.compatible = "coreriver,tc360-touchkey",
340+
.data = &tc360_touchkey_variant,
330341
},
331342
{ },
332343
};

drivers/input/mouse/synaptics.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ static const char * const smbus_pnp_ids[] = {
186186
"SYN3052", /* HP EliteBook 840 G4 */
187187
"SYN3221", /* HP 15-ay000 */
188188
"SYN323d", /* HP Spectre X360 13-w013dx */
189+
"SYN3257", /* HP Envy 13-ad105ng */
189190
NULL
190191
};
191192

drivers/input/rmi4/rmi_f11.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,8 +1203,8 @@ static int rmi_f11_initialize(struct rmi_function *fn)
12031203
* If distance threshold values are set, switch to reduced reporting
12041204
* mode so they actually get used by the controller.
12051205
*/
1206-
if (ctrl->ctrl0_11[RMI_F11_DELTA_X_THRESHOLD] ||
1207-
ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD]) {
1206+
if (sensor->axis_align.delta_x_threshold ||
1207+
sensor->axis_align.delta_y_threshold) {
12081208
ctrl->ctrl0_11[0] &= ~RMI_F11_REPORT_MODE_MASK;
12091209
ctrl->ctrl0_11[0] |= RMI_F11_REPORT_MODE_REDUCED;
12101210
}

drivers/input/touchscreen/raydium_i2c_ts.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static int raydium_i2c_write_object(struct i2c_client *client,
432432
return 0;
433433
}
434434

435-
static bool raydium_i2c_boot_trigger(struct i2c_client *client)
435+
static int raydium_i2c_boot_trigger(struct i2c_client *client)
436436
{
437437
static const u8 cmd[7][6] = {
438438
{ 0x08, 0x0C, 0x09, 0x00, 0x50, 0xD7 },
@@ -457,10 +457,10 @@ static bool raydium_i2c_boot_trigger(struct i2c_client *client)
457457
}
458458
}
459459

460-
return false;
460+
return 0;
461461
}
462462

463-
static bool raydium_i2c_fw_trigger(struct i2c_client *client)
463+
static int raydium_i2c_fw_trigger(struct i2c_client *client)
464464
{
465465
static const u8 cmd[5][11] = {
466466
{ 0, 0x09, 0x71, 0x0C, 0x09, 0x00, 0x50, 0xD7, 0, 0, 0 },
@@ -483,7 +483,7 @@ static bool raydium_i2c_fw_trigger(struct i2c_client *client)
483483
}
484484
}
485485

486-
return false;
486+
return 0;
487487
}
488488

489489
static int raydium_i2c_check_path(struct i2c_client *client)

include/uapi/linux/input-event-codes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,9 @@
652652
/* Electronic privacy screen control */
653653
#define KEY_PRIVACY_SCREEN_TOGGLE 0x279
654654

655+
/* Select an area of screen to be copied */
656+
#define KEY_SELECTIVE_SCREENSHOT 0x27a
657+
655658
/*
656659
* Some keyboards have keys which do not have a defined meaning, these keys
657660
* are intended to be programmed / bound to macros by the user. For most

include/uapi/linux/serio.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef _UAPI_SERIO_H
1010
#define _UAPI_SERIO_H
1111

12-
12+
#include <linux/const.h>
1313
#include <linux/ioctl.h>
1414

1515
#define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
@@ -18,10 +18,10 @@
1818
/*
1919
* bit masks for use in "interrupt" flags (3rd argument)
2020
*/
21-
#define SERIO_TIMEOUT BIT(0)
22-
#define SERIO_PARITY BIT(1)
23-
#define SERIO_FRAME BIT(2)
24-
#define SERIO_OOB_DATA BIT(3)
21+
#define SERIO_TIMEOUT _BITUL(0)
22+
#define SERIO_PARITY _BITUL(1)
23+
#define SERIO_FRAME _BITUL(2)
24+
#define SERIO_OOB_DATA _BITUL(3)
2525

2626
/*
2727
* Serio types

0 commit comments

Comments
 (0)