[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+jURcuD_qr0AwQJsVbpTGdVEdkr5eFtt87xGaMYSmPpBH3ZBg@mail.gmail.com>
Date: Tue, 13 Apr 2021 10:29:22 -0700
From: Harry Cutts <hcutts@...omium.org>
To: Johnny Chuang <johnny.chuang.emc@...il.com>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Peter Hutterer <peter.hutterer@...-t.net>,
lkml <linux-kernel@...r.kernel.org>,
linux-input <linux-input@...r.kernel.org>,
Johnny Chuang <johnny.chuang@....com.tw>,
James Chen <james.chen@....com.tw>,
Jennifer Tsai <jennifer.tsai@....com.tw>,
Paul Liang <paul.liang@....com.tw>,
Jeff Chuang <jeff.chuang@....com.tw>,
Douglas Anderson <dianders@...omium.org>,
Jingle <jingle.wu@....com.tw>
Subject: Re: [PATCH v3] HID: i2c-hid: Skip ELAN power-on command after reset
On Mon, 12 Apr 2021 at 18:20, Johnny Chuang <johnny.chuang.emc@...il.com> wrote:
>
> Fixes: 43b7029f475e ("HID: i2c-hid: Send power-on command after reset").
>
> For ELAN touchscreen, we found our boot code of IC was not flexible enough
> to receive and handle this command.
> Once the FW main code of our controller is crashed for some reason,
> the controller could not be enumerated successfully to be recognized
> by the system host. therefore, it lost touch functionality.
>
> Add quirk for skip send power-on command after reset.
> It will impact to ELAN touchscreen and touchpad on HID over I2C projects.
>
> Signed-off-by: Johnny Chuang <johnny.chuang.emc@...il.com>
> ---
> Changes in V3:
> - intent the comment at qurik entry
> - add Fixes:flag for previous commit id
>
> Changes in v2:
> - move comment to quirk entry
Reviewed-by: Harry Cutts <hcutts@...omium.org>
Harry Cutts
Chrome OS Touch/Input team
> ---
> drivers/hid/i2c-hid/i2c-hid-core.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
> index 9993133..32e3287 100644
> --- a/drivers/hid/i2c-hid/i2c-hid-core.c
> +++ b/drivers/hid/i2c-hid/i2c-hid-core.c
> @@ -45,6 +45,7 @@
> #define I2C_HID_QUIRK_BOGUS_IRQ BIT(4)
> #define I2C_HID_QUIRK_RESET_ON_RESUME BIT(5)
> #define I2C_HID_QUIRK_BAD_INPUT_SIZE BIT(6)
> +#define I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET BIT(7)
>
>
> /* flags */
> @@ -178,6 +179,12 @@ static const struct i2c_hid_quirks {
> I2C_HID_QUIRK_RESET_ON_RESUME },
> { USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_LEGION_Y720,
> I2C_HID_QUIRK_BAD_INPUT_SIZE },
> + /*
> + * Sending the wakeup after reset actually break ELAN touchscreen controller
> + * Add I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET to skip wakeup after reset
> + */
> + { USB_VENDOR_ID_ELAN, HID_ANY_ID,
> + I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET },
> { 0, 0 }
> };
>
> @@ -461,7 +468,8 @@ static int i2c_hid_hwreset(struct i2c_client *client)
> }
>
> /* At least some SIS devices need this after reset */
> - ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
> + if (!(ihid->quirks & I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET))
> + ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
>
> out_unlock:
> mutex_unlock(&ihid->reset_lock);
> --
> 2.7.4
>
Powered by blists - more mailing lists