Message ID | 20181127065909.31509-4-kai.heng.feng@canonical.com |
---|---|
State | New |
Headers | show |
Series | Fix and issue that LG I2C touchscreen stops working after reboot | expand |
On 27.11.18 07:59, Kai-Heng Feng wrote: > BugLink: https://bugs.launchpad.net/bugs/1805085 > > LG touchscreen (1fd2:8001) stops working after reboot: > [ 4.859153] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66) > [ 4.936070] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66) > [ 9.948224] i2c_hid i2c-SAPS2101:00: failed to reset device. > > The device in question stops working after receives SLEEP, ON, SLEEP > commands in a short period. The scenario is like this: > - Once the desktop session closes, it also closed the hid device, so the > device gets runtime suspended and receives a SLEEP command. > - Before calling shutdown callback, it gets runtime resumed and received > an ON command. > - In the shutdown callback, it receives another SLEEP command. > > I failed to find a reliable interval between ON/SLEEP commands that can > make it work, so let's simply disable runtime PM for the device. > > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> > Signed-off-by: Jiri Kosina <jkosina@suse.cz> > (backported from commit 86c31524b27c7e686841dd4a79eda95cfd989f16) > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- With the discussion done, only for this patch. > drivers/hid/hid-ids.h | 1 + > drivers/hid/i2c-hid/i2c-hid.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h > index 92de8444b921..83e25c6688a0 100644 > --- a/drivers/hid/hid-ids.h > +++ b/drivers/hid/hid-ids.h > @@ -687,6 +687,7 @@ > #define USB_VENDOR_ID_LG 0x1fd2 > #define USB_DEVICE_ID_LG_MULTITOUCH 0x0064 > #define USB_DEVICE_ID_LG_MELFAS_MT 0x6007 > +#define I2C_DEVICE_ID_LG_8001 0x8001 > > #define USB_VENDOR_ID_LOGITECH 0x046d > #define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e > diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c > index 72df970c60ef..def6b5fdb915 100644 > --- a/drivers/hid/i2c-hid/i2c-hid.c > +++ b/drivers/hid/i2c-hid/i2c-hid.c > @@ -176,6 +176,8 @@ static const struct i2c_hid_quirks { > I2C_HID_QUIRK_NO_RUNTIME_PM }, > { USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH, > I2C_HID_QUIRK_RESEND_REPORT_DESCR }, > + { USB_VENDOR_ID_LG, I2C_DEVICE_ID_LG_8001, > + I2C_HID_QUIRK_NO_RUNTIME_PM }, > { 0, 0 } > }; > >
On 11/27/18 7:59 AM, Kai-Heng Feng wrote: > BugLink: https://bugs.launchpad.net/bugs/1805085 > > LG touchscreen (1fd2:8001) stops working after reboot: > [ 4.859153] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66) > [ 4.936070] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66) > [ 9.948224] i2c_hid i2c-SAPS2101:00: failed to reset device. > > The device in question stops working after receives SLEEP, ON, SLEEP > commands in a short period. The scenario is like this: > - Once the desktop session closes, it also closed the hid device, so the > device gets runtime suspended and receives a SLEEP command. > - Before calling shutdown callback, it gets runtime resumed and received > an ON command. > - In the shutdown callback, it receives another SLEEP command. > > I failed to find a reliable interval between ON/SLEEP commands that can > make it work, so let's simply disable runtime PM for the device. > > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> > Signed-off-by: Jiri Kosina <jkosina@suse.cz> > (backported from commit 86c31524b27c7e686841dd4a79eda95cfd989f16) > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> > --- > drivers/hid/hid-ids.h | 1 + > drivers/hid/i2c-hid/i2c-hid.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h > index 92de8444b921..83e25c6688a0 100644 > --- a/drivers/hid/hid-ids.h > +++ b/drivers/hid/hid-ids.h > @@ -687,6 +687,7 @@ > #define USB_VENDOR_ID_LG 0x1fd2 > #define USB_DEVICE_ID_LG_MULTITOUCH 0x0064 > #define USB_DEVICE_ID_LG_MELFAS_MT 0x6007 > +#define I2C_DEVICE_ID_LG_8001 0x8001 > > #define USB_VENDOR_ID_LOGITECH 0x046d > #define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e > diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c > index 72df970c60ef..def6b5fdb915 100644 > --- a/drivers/hid/i2c-hid/i2c-hid.c > +++ b/drivers/hid/i2c-hid/i2c-hid.c > @@ -176,6 +176,8 @@ static const struct i2c_hid_quirks { > I2C_HID_QUIRK_NO_RUNTIME_PM }, > { USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH, > I2C_HID_QUIRK_RESEND_REPORT_DESCR }, > + { USB_VENDOR_ID_LG, I2C_DEVICE_ID_LG_8001, > + I2C_HID_QUIRK_NO_RUNTIME_PM }, > { 0, 0 } > }; > Applied to bionic/master-next branch. Patch 1/2 has already been applied as a separate fix for LP: #1728244. Thanks, Kleber
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 92de8444b921..83e25c6688a0 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -687,6 +687,7 @@ #define USB_VENDOR_ID_LG 0x1fd2 #define USB_DEVICE_ID_LG_MULTITOUCH 0x0064 #define USB_DEVICE_ID_LG_MELFAS_MT 0x6007 +#define I2C_DEVICE_ID_LG_8001 0x8001 #define USB_VENDOR_ID_LOGITECH 0x046d #define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 72df970c60ef..def6b5fdb915 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c @@ -176,6 +176,8 @@ static const struct i2c_hid_quirks { I2C_HID_QUIRK_NO_RUNTIME_PM }, { USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH, I2C_HID_QUIRK_RESEND_REPORT_DESCR }, + { USB_VENDOR_ID_LG, I2C_DEVICE_ID_LG_8001, + I2C_HID_QUIRK_NO_RUNTIME_PM }, { 0, 0 } };