Contents of /trunk/kernel-alx/patches-4.19/0170-4.19.71-all-fixes.patch
Parent Directory | Revision Log
Revision 3467 -
(show annotations)
(download)
Tue Oct 29 10:31:28 2019 UTC (4 years, 11 months ago) by niro
File size: 2468 byte(s)
Tue Oct 29 10:31:28 2019 UTC (4 years, 11 months ago) by niro
File size: 2468 byte(s)
-linux-4.19.71
1 | diff --git a/Makefile b/Makefile |
2 | index ecf8806cb71f..f6c9d5757470 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,7 +1,7 @@ |
6 | # SPDX-License-Identifier: GPL-2.0 |
7 | VERSION = 4 |
8 | PATCHLEVEL = 19 |
9 | -SUBLEVEL = 70 |
10 | +SUBLEVEL = 71 |
11 | EXTRAVERSION = |
12 | NAME = "People's Front" |
13 | |
14 | diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c |
15 | index eb9b9de47fd1..530142b5a115 100644 |
16 | --- a/drivers/input/mouse/elantech.c |
17 | +++ b/drivers/input/mouse/elantech.c |
18 | @@ -1810,30 +1810,6 @@ static int elantech_create_smbus(struct psmouse *psmouse, |
19 | leave_breadcrumbs); |
20 | } |
21 | |
22 | -static bool elantech_use_host_notify(struct psmouse *psmouse, |
23 | - struct elantech_device_info *info) |
24 | -{ |
25 | - if (ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version)) |
26 | - return true; |
27 | - |
28 | - switch (info->bus) { |
29 | - case ETP_BUS_PS2_ONLY: |
30 | - /* expected case */ |
31 | - break; |
32 | - case ETP_BUS_SMB_HST_NTFY_ONLY: |
33 | - case ETP_BUS_PS2_SMB_HST_NTFY: |
34 | - /* SMbus implementation is stable since 2018 */ |
35 | - if (dmi_get_bios_year() >= 2018) |
36 | - return true; |
37 | - default: |
38 | - psmouse_dbg(psmouse, |
39 | - "Ignoring SMBus bus provider %d\n", info->bus); |
40 | - break; |
41 | - } |
42 | - |
43 | - return false; |
44 | -} |
45 | - |
46 | /** |
47 | * elantech_setup_smbus - called once the PS/2 devices are enumerated |
48 | * and decides to instantiate a SMBus InterTouch device. |
49 | @@ -1853,7 +1829,7 @@ static int elantech_setup_smbus(struct psmouse *psmouse, |
50 | * i2c_blacklist_pnp_ids. |
51 | * Old ICs are up to the user to decide. |
52 | */ |
53 | - if (!elantech_use_host_notify(psmouse, info) || |
54 | + if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) || |
55 | psmouse_matches_pnp_id(psmouse, i2c_blacklist_pnp_ids)) |
56 | return -ENXIO; |
57 | } |
58 | @@ -1873,6 +1849,34 @@ static int elantech_setup_smbus(struct psmouse *psmouse, |
59 | return 0; |
60 | } |
61 | |
62 | +static bool elantech_use_host_notify(struct psmouse *psmouse, |
63 | + struct elantech_device_info *info) |
64 | +{ |
65 | + if (ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version)) |
66 | + return true; |
67 | + |
68 | + switch (info->bus) { |
69 | + case ETP_BUS_PS2_ONLY: |
70 | + /* expected case */ |
71 | + break; |
72 | + case ETP_BUS_SMB_ALERT_ONLY: |
73 | + /* fall-through */ |
74 | + case ETP_BUS_PS2_SMB_ALERT: |
75 | + psmouse_dbg(psmouse, "Ignoring SMBus provider through alert protocol.\n"); |
76 | + break; |
77 | + case ETP_BUS_SMB_HST_NTFY_ONLY: |
78 | + /* fall-through */ |
79 | + case ETP_BUS_PS2_SMB_HST_NTFY: |
80 | + return true; |
81 | + default: |
82 | + psmouse_dbg(psmouse, |
83 | + "Ignoring SMBus bus provider %d.\n", |
84 | + info->bus); |
85 | + } |
86 | + |
87 | + return false; |
88 | +} |
89 | + |
90 | int elantech_init_smbus(struct psmouse *psmouse) |
91 | { |
92 | struct elantech_device_info info; |