All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: i2c-hid: Fix Elan touchpad regression
@ 2021-08-09  6:55 Jim Broadus
  2021-08-11  8:32 ` 莊佳霖
  2021-08-20 12:52 ` Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Jim Broadus @ 2021-08-09  6:55 UTC (permalink / raw)
  To: jikos, benjamin.tissoires
  Cc: linux-kernel, linux-input, johnny.chuang.emc, kai.heng.feng, Jim Broadus

A quirk was recently added for Elan devices that has same device match
as an entry earlier in the list. The i2c_hid_lookup_quirk function will
always return the last match in the list, so the new entry shadows the
old entry. The quirk in the previous entry, I2C_HID_QUIRK_BOGUS_IRQ,
silenced a flood of messages which have reappeared in the 5.13 kernel.

This change moves the two quirk flags into the same entry.

Fixes: ca66a6770bd9 (HID: i2c-hid: Skip ELAN power-on command after reset)
Signed-off-by: Jim Broadus <jbroadus@gmail.com>
---
 drivers/hid/i2c-hid/i2c-hid-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 46474612e73c..517141138b00 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -171,8 +171,6 @@ static const struct i2c_hid_quirks {
 		I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
 	{ I2C_VENDOR_ID_RAYDIUM, I2C_PRODUCT_ID_RAYDIUM_3118,
 		I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
-	{ USB_VENDOR_ID_ELAN, HID_ANY_ID,
-		 I2C_HID_QUIRK_BOGUS_IRQ },
 	{ USB_VENDOR_ID_ALPS_JP, HID_ANY_ID,
 		 I2C_HID_QUIRK_RESET_ON_RESUME },
 	{ I2C_VENDOR_ID_SYNAPTICS, I2C_PRODUCT_ID_SYNAPTICS_SYNA2393,
@@ -183,7 +181,8 @@ static const struct i2c_hid_quirks {
 	 * Sending the wakeup after reset actually break ELAN touchscreen controller
 	 */
 	{ USB_VENDOR_ID_ELAN, HID_ANY_ID,
-		 I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET },
+		 I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET |
+		 I2C_HID_QUIRK_BOGUS_IRQ },
 	{ 0, 0 }
 };
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: i2c-hid: Fix Elan touchpad regression
  2021-08-09  6:55 [PATCH] HID: i2c-hid: Fix Elan touchpad regression Jim Broadus
@ 2021-08-11  8:32 ` 莊佳霖
  2021-08-20 12:52 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: 莊佳霖 @ 2021-08-11  8:32 UTC (permalink / raw)
  To: Jim Broadus
  Cc: jikos, Benjamin Tissoires, linux-kernel, linux-input, kai.heng.feng

> A quirk was recently added for Elan devices that has same device match
> as an entry earlier in the list. The i2c_hid_lookup_quirk function will
> always return the last match in the list, so the new entry shadows the
> old entry. The quirk in the previous entry, I2C_HID_QUIRK_BOGUS_IRQ,
> silenced a flood of messages which have reappeared in the 5.13 kernel.
>
> This change moves the two quirk flags into the same entry.
>

LGTM

Many thanks,
Johnny/ELAN

> Fixes: ca66a6770bd9 (HID: i2c-hid: Skip ELAN power-on command after reset)
> Signed-off-by: Jim Broadus <jbroadus@gmail.com>
> ---
>  drivers/hid/i2c-hid/i2c-hid-core.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
> index 46474612e73c..517141138b00 100644
> --- a/drivers/hid/i2c-hid/i2c-hid-core.c
> +++ b/drivers/hid/i2c-hid/i2c-hid-core.c
> @@ -171,8 +171,6 @@ static const struct i2c_hid_quirks {
>                 I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
>         { I2C_VENDOR_ID_RAYDIUM, I2C_PRODUCT_ID_RAYDIUM_3118,
>                 I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
> -       { USB_VENDOR_ID_ELAN, HID_ANY_ID,
> -                I2C_HID_QUIRK_BOGUS_IRQ },
>         { USB_VENDOR_ID_ALPS_JP, HID_ANY_ID,
>                  I2C_HID_QUIRK_RESET_ON_RESUME },
>         { I2C_VENDOR_ID_SYNAPTICS, I2C_PRODUCT_ID_SYNAPTICS_SYNA2393,
> @@ -183,7 +181,8 @@ static const struct i2c_hid_quirks {
>          * Sending the wakeup after reset actually break ELAN touchscreen controller
>          */
>         { USB_VENDOR_ID_ELAN, HID_ANY_ID,
> -                I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET },
> +                I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET |
> +                I2C_HID_QUIRK_BOGUS_IRQ },
>         { 0, 0 }
>  };
>
> --
> 2.31.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: i2c-hid: Fix Elan touchpad regression
  2021-08-09  6:55 [PATCH] HID: i2c-hid: Fix Elan touchpad regression Jim Broadus
  2021-08-11  8:32 ` 莊佳霖
@ 2021-08-20 12:52 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2021-08-20 12:52 UTC (permalink / raw)
  To: Jim Broadus
  Cc: benjamin.tissoires, linux-kernel, linux-input, johnny.chuang.emc,
	kai.heng.feng

On Sun, 8 Aug 2021, Jim Broadus wrote:

> A quirk was recently added for Elan devices that has same device match
> as an entry earlier in the list. The i2c_hid_lookup_quirk function will
> always return the last match in the list, so the new entry shadows the
> old entry. The quirk in the previous entry, I2C_HID_QUIRK_BOGUS_IRQ,
> silenced a flood of messages which have reappeared in the 5.13 kernel.
> 
> This change moves the two quirk flags into the same entry.
> 
> Fixes: ca66a6770bd9 (HID: i2c-hid: Skip ELAN power-on command after reset)
> Signed-off-by: Jim Broadus <jbroadus@gmail.com>

Applied, thank you.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-20 12:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09  6:55 [PATCH] HID: i2c-hid: Fix Elan touchpad regression Jim Broadus
2021-08-11  8:32 ` 莊佳霖
2021-08-20 12:52 ` Jiri Kosina

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.