Skip to content

Commit e9919e1

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 few quirks for the Elan touchpad driver, another Thinkpad is being switched over from PS/2 to native RMI4 interface, and we gave a brand new SW_MACHINE_COVER switch definition" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c - add more hardware ID for Lenovo laptops Input: i8042 - add Lenovo XiaoXin Air 12 to i8042 nomux list Revert "Input: elants_i2c - report resolution information for touch major" Input: elan_i2c - only increment wakeup count on touch Input: synaptics - enable InterTouch for ThinkPad X1E 1st gen ARM: dts: n900: remove mmc1 card detect gpio Input: add `SW_MACHINE_COVER`
2 parents 0dc589d + a50ca29 commit e9919e1

File tree

8 files changed

+31
-11
lines changed

8 files changed

+31
-11
lines changed

arch/arm/boot/dts/omap3-n900.dts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@
105105
linux,code = <SW_FRONT_PROXIMITY>;
106106
linux,can-disable;
107107
};
108+
109+
machine_cover {
110+
label = "Machine Cover";
111+
gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* 160 */
112+
linux,input-type = <EV_SW>;
113+
linux,code = <SW_MACHINE_COVER>;
114+
linux,can-disable;
115+
};
108116
};
109117

110118
isp1707: isp1707 {
@@ -819,10 +827,6 @@
819827
pinctrl-0 = <&mmc1_pins>;
820828
vmmc-supply = <&vmmc1>;
821829
bus-width = <4>;
822-
/* For debugging, it is often good idea to remove this GPIO.
823-
It means you can remove back cover (to reboot by removing
824-
battery) and still use the MMC card. */
825-
cd-gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* 160 */
826830
};
827831

828832
/* most boards use vaux3, only some old versions use vmmc2 instead */

drivers/input/mouse/elan_i2c_core.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,8 @@ static void elan_report_absolute(struct elan_tp_data *data, u8 *packet)
951951
u8 hover_info = packet[ETP_HOVER_INFO_OFFSET];
952952
bool contact_valid, hover_event;
953953

954+
pm_wakeup_event(&data->client->dev, 0);
955+
954956
hover_event = hover_info & 0x40;
955957
for (i = 0; i < ETP_MAX_FINGERS; i++) {
956958
contact_valid = tp_info & (1U << (3 + i));
@@ -974,6 +976,8 @@ static void elan_report_trackpoint(struct elan_tp_data *data, u8 *report)
974976
u8 *packet = &report[ETP_REPORT_ID_OFFSET + 1];
975977
int x, y;
976978

979+
pm_wakeup_event(&data->client->dev, 0);
980+
977981
if (!data->tp_input) {
978982
dev_warn_once(&data->client->dev,
979983
"received a trackpoint report while no trackpoint device has been created. Please report upstream.\n");
@@ -998,7 +1002,6 @@ static void elan_report_trackpoint(struct elan_tp_data *data, u8 *report)
9981002
static irqreturn_t elan_isr(int irq, void *dev_id)
9991003
{
10001004
struct elan_tp_data *data = dev_id;
1001-
struct device *dev = &data->client->dev;
10021005
int error;
10031006
u8 report[ETP_MAX_REPORT_LEN];
10041007

@@ -1016,8 +1019,6 @@ static irqreturn_t elan_isr(int irq, void *dev_id)
10161019
if (error)
10171020
goto out;
10181021

1019-
pm_wakeup_event(dev, 0);
1020-
10211022
switch (report[ETP_REPORT_ID_OFFSET]) {
10221023
case ETP_REPORT_ID:
10231024
elan_report_absolute(data, report);
@@ -1026,7 +1027,7 @@ static irqreturn_t elan_isr(int irq, void *dev_id)
10261027
elan_report_trackpoint(data, report);
10271028
break;
10281029
default:
1029-
dev_err(dev, "invalid report id data (%x)\n",
1030+
dev_err(&data->client->dev, "invalid report id data (%x)\n",
10301031
report[ETP_REPORT_ID_OFFSET]);
10311032
}
10321033

drivers/input/mouse/synaptics.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ static const char * const smbus_pnp_ids[] = {
179179
"LEN0093", /* T480 */
180180
"LEN0096", /* X280 */
181181
"LEN0097", /* X280 -> ALPS trackpoint */
182+
"LEN0099", /* X1 Extreme 1st */
182183
"LEN009b", /* T580 */
183184
"LEN200f", /* T450s */
184185
"LEN2044", /* L470 */

drivers/input/serio/i8042-x86ia64io.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
425425
DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
426426
},
427427
},
428+
{
429+
/* Lenovo XiaoXin Air 12 */
430+
.matches = {
431+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
432+
DMI_MATCH(DMI_PRODUCT_NAME, "80UN"),
433+
},
434+
},
428435
{
429436
.matches = {
430437
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),

drivers/input/touchscreen/elants_i2c.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,6 @@ static int elants_i2c_probe(struct i2c_client *client,
13251325
0, MT_TOOL_PALM, 0, 0);
13261326
input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
13271327
input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
1328-
input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, 1);
13291328

13301329
touchscreen_parse_properties(ts->input, true, &ts->prop);
13311330

include/linux/input/elan-i2c-ids.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,15 @@ static const struct acpi_device_id elan_acpi_id[] = {
6767
{ "ELAN062B", 0 },
6868
{ "ELAN062C", 0 },
6969
{ "ELAN062D", 0 },
70+
{ "ELAN062E", 0 }, /* Lenovo V340 Whiskey Lake U */
71+
{ "ELAN062F", 0 }, /* Lenovo V340 Comet Lake U */
7072
{ "ELAN0631", 0 },
7173
{ "ELAN0632", 0 },
74+
{ "ELAN0633", 0 }, /* Lenovo S145 */
75+
{ "ELAN0634", 0 }, /* Lenovo V340 Ice lake */
76+
{ "ELAN0635", 0 }, /* Lenovo V1415-IIL */
77+
{ "ELAN0636", 0 }, /* Lenovo V1415-Dali */
78+
{ "ELAN0637", 0 }, /* Lenovo V1415-IGLR */
7279
{ "ELAN1000", 0 },
7380
{ }
7481
};

include/linux/mod_devicetable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ struct pcmcia_device_id {
318318
#define INPUT_DEVICE_ID_LED_MAX 0x0f
319319
#define INPUT_DEVICE_ID_SND_MAX 0x07
320320
#define INPUT_DEVICE_ID_FF_MAX 0x7f
321-
#define INPUT_DEVICE_ID_SW_MAX 0x0f
321+
#define INPUT_DEVICE_ID_SW_MAX 0x10
322322
#define INPUT_DEVICE_ID_PROP_MAX 0x1f
323323

324324
#define INPUT_DEVICE_ID_MATCH_BUS 1

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,8 @@
888888
#define SW_LINEIN_INSERT 0x0d /* set = inserted */
889889
#define SW_MUTE_DEVICE 0x0e /* set = device disabled */
890890
#define SW_PEN_INSERTED 0x0f /* set = pen inserted */
891-
#define SW_MAX 0x0f
891+
#define SW_MACHINE_COVER 0x10 /* set = cover closed */
892+
#define SW_MAX 0x10
892893
#define SW_CNT (SW_MAX+1)
893894

894895
/*

0 commit comments

Comments
 (0)