* [PATCH] Input: elantech - Disable elan-i2c for P52 and P72
@ 2018-12-12 15:42 Benjamin Tissoires
2018-12-18 8:13 ` Peter Hutterer
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tissoires @ 2018-12-12 15:42 UTC (permalink / raw)
To: Dmitry Torokhov, kt.liao, Aaron Ma, Kai Heng Feng
Cc: linux-input, linux-kernel, Benjamin Tissoires, stable
The current implementation of elan_i2c is known to not support those
2 laptops.
A proper fix is to tweak both elantech and elan_i2c to transmit the
correct information from PS/2, which would make a bad candidate for
stable.
So to give us some time for fixing the root of the problem, disable
elan_i2c for the devices we know are not behaving properly.
Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803600
Link: https://bugs.archlinux.org/task/59714
Fixes: df077237cf55 Input: elantech - detect new ICs and setup Host Notify for them
Cc: stable@vger.kernel.org # v4.18+
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/input/mouse/elantech.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 2d95e8d93cc7..830ae9f07045 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1767,6 +1767,18 @@ static int elantech_smbus = IS_ENABLED(CONFIG_MOUSE_ELAN_I2C_SMBUS) ?
module_param_named(elantech_smbus, elantech_smbus, int, 0644);
MODULE_PARM_DESC(elantech_smbus, "Use a secondary bus for the Elantech device.");
+static const char * const i2c_blacklist_pnp_ids[] = {
+ /*
+ * these are known to not be working properly as bits are missing
+ * in elan_i2c
+ */
+ "LEN2131", /* ThinkPad P52 w/ NFC */
+ "LEN2132", /* ThinkPad P52 */
+ "LEN2133", /* ThinkPad P72 w/ NFC */
+ "LEN2134", /* ThinkPad P72 */
+ NULL
+};
+
static int elantech_create_smbus(struct psmouse *psmouse,
struct elantech_device_info *info,
bool leave_breadcrumbs)
@@ -1802,10 +1814,12 @@ static int elantech_setup_smbus(struct psmouse *psmouse,
if (elantech_smbus == ELANTECH_SMBUS_NOT_SET) {
/*
- * New ICs are enabled by default.
+ * New ICs are enabled by default, unless mentioned in
+ * i2c_blacklist_pnp_ids.
* Old ICs are up to the user to decide.
*/
- if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version))
+ if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) ||
+ psmouse_matches_pnp_id(psmouse, i2c_blacklist_pnp_ids))
return -ENXIO;
}
--
2.19.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Input: elantech - Disable elan-i2c for P52 and P72
2018-12-12 15:42 [PATCH] Input: elantech - Disable elan-i2c for P52 and P72 Benjamin Tissoires
@ 2018-12-18 8:13 ` Peter Hutterer
2018-12-21 8:43 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Peter Hutterer @ 2018-12-18 8:13 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, kt.liao, Aaron Ma, Kai Heng Feng, linux-input,
linux-kernel, stable
On Wed, Dec 12, 2018 at 04:42:05PM +0100, Benjamin Tissoires wrote:
> The current implementation of elan_i2c is known to not support those
> 2 laptops.
>
> A proper fix is to tweak both elantech and elan_i2c to transmit the
> correct information from PS/2, which would make a bad candidate for
> stable.
>
> So to give us some time for fixing the root of the problem, disable
> elan_i2c for the devices we know are not behaving properly.
>
> Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803600
> Link: https://bugs.archlinux.org/task/59714
> Fixes: df077237cf55 Input: elantech - detect new ICs and setup Host Notify for them
>
> Cc: stable@vger.kernel.org # v4.18+
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Cheers,
Peter
> ---
> drivers/input/mouse/elantech.c | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index 2d95e8d93cc7..830ae9f07045 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -1767,6 +1767,18 @@ static int elantech_smbus = IS_ENABLED(CONFIG_MOUSE_ELAN_I2C_SMBUS) ?
> module_param_named(elantech_smbus, elantech_smbus, int, 0644);
> MODULE_PARM_DESC(elantech_smbus, "Use a secondary bus for the Elantech device.");
>
> +static const char * const i2c_blacklist_pnp_ids[] = {
> + /*
> + * these are known to not be working properly as bits are missing
> + * in elan_i2c
> + */
> + "LEN2131", /* ThinkPad P52 w/ NFC */
> + "LEN2132", /* ThinkPad P52 */
> + "LEN2133", /* ThinkPad P72 w/ NFC */
> + "LEN2134", /* ThinkPad P72 */
> + NULL
> +};
> +
> static int elantech_create_smbus(struct psmouse *psmouse,
> struct elantech_device_info *info,
> bool leave_breadcrumbs)
> @@ -1802,10 +1814,12 @@ static int elantech_setup_smbus(struct psmouse *psmouse,
>
> if (elantech_smbus == ELANTECH_SMBUS_NOT_SET) {
> /*
> - * New ICs are enabled by default.
> + * New ICs are enabled by default, unless mentioned in
> + * i2c_blacklist_pnp_ids.
> * Old ICs are up to the user to decide.
> */
> - if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version))
> + if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) ||
> + psmouse_matches_pnp_id(psmouse, i2c_blacklist_pnp_ids))
> return -ENXIO;
> }
>
> --
> 2.19.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Input: elantech - Disable elan-i2c for P52 and P72
2018-12-18 8:13 ` Peter Hutterer
@ 2018-12-21 8:43 ` Dmitry Torokhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2018-12-21 8:43 UTC (permalink / raw)
To: Peter Hutterer
Cc: Benjamin Tissoires, kt.liao, Aaron Ma, Kai Heng Feng,
linux-input, linux-kernel, stable
On Tue, Dec 18, 2018 at 06:13:43PM +1000, Peter Hutterer wrote:
> On Wed, Dec 12, 2018 at 04:42:05PM +0100, Benjamin Tissoires wrote:
> > The current implementation of elan_i2c is known to not support those
> > 2 laptops.
> >
> > A proper fix is to tweak both elantech and elan_i2c to transmit the
> > correct information from PS/2, which would make a bad candidate for
> > stable.
> >
> > So to give us some time for fixing the root of the problem, disable
> > elan_i2c for the devices we know are not behaving properly.
> >
> > Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803600
> > Link: https://bugs.archlinux.org/task/59714
> > Fixes: df077237cf55 Input: elantech - detect new ICs and setup Host Notify for them
> >
> > Cc: stable@vger.kernel.org # v4.18+
> > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Applied, thank you.
>
> Cheers,
> Peter
>
> > ---
> > drivers/input/mouse/elantech.c | 18 ++++++++++++++++--
> > 1 file changed, 16 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> > index 2d95e8d93cc7..830ae9f07045 100644
> > --- a/drivers/input/mouse/elantech.c
> > +++ b/drivers/input/mouse/elantech.c
> > @@ -1767,6 +1767,18 @@ static int elantech_smbus = IS_ENABLED(CONFIG_MOUSE_ELAN_I2C_SMBUS) ?
> > module_param_named(elantech_smbus, elantech_smbus, int, 0644);
> > MODULE_PARM_DESC(elantech_smbus, "Use a secondary bus for the Elantech device.");
> >
> > +static const char * const i2c_blacklist_pnp_ids[] = {
> > + /*
> > + * these are known to not be working properly as bits are missing
> > + * in elan_i2c
> > + */
> > + "LEN2131", /* ThinkPad P52 w/ NFC */
> > + "LEN2132", /* ThinkPad P52 */
> > + "LEN2133", /* ThinkPad P72 w/ NFC */
> > + "LEN2134", /* ThinkPad P72 */
> > + NULL
> > +};
> > +
> > static int elantech_create_smbus(struct psmouse *psmouse,
> > struct elantech_device_info *info,
> > bool leave_breadcrumbs)
> > @@ -1802,10 +1814,12 @@ static int elantech_setup_smbus(struct psmouse *psmouse,
> >
> > if (elantech_smbus == ELANTECH_SMBUS_NOT_SET) {
> > /*
> > - * New ICs are enabled by default.
> > + * New ICs are enabled by default, unless mentioned in
> > + * i2c_blacklist_pnp_ids.
> > * Old ICs are up to the user to decide.
> > */
> > - if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version))
> > + if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) ||
> > + psmouse_matches_pnp_id(psmouse, i2c_blacklist_pnp_ids))
> > return -ENXIO;
> > }
> >
> > --
> > 2.19.2
> >
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-21 8:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-12 15:42 [PATCH] Input: elantech - Disable elan-i2c for P52 and P72 Benjamin Tissoires
2018-12-18 8:13 ` Peter Hutterer
2018-12-21 8:43 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.