From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Nish Aravamudan <nish.aravamudan@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Andrew Duggan <aduggan@synaptics.com>,
Gabriele Mazzotta <gabriele.mzt@gmail.com>,
Seth Forshee <seth.forshee@canonical.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
linux-input@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND] Lenovo Yoga 900 touchpad issues
Date: Wed, 16 Dec 2015 11:28:58 +0200 [thread overview]
Message-ID: <20151216092858.GP1762@lahna.fi.intel.com> (raw)
In-Reply-To: <CAOhV88MGoJdUzty=DDTLOkd7me5uoRWwTTrR8aD=zf5ga0_Hew@mail.gmail.com>
On Tue, Dec 15, 2015 at 11:14:32AM -0800, Nish Aravamudan wrote:
> [Apologies for the resend, didn't realize I hadn't changed my GMail settings
> to not use HTML.]
>
> I have recently purchased a Lenovo Yoga 900 and most everything is working
> with a slightly modified 4.4-rc5 (https://lkml.org/lkml/2015/11/30/441 applied
> to enable the touchpad itself), I am seeing two issues:
>
> 1) On suspend/resume, the touchpad is non-functional. A `modprobe -r i2c-hid;
> modprobe i2c-hid` "fixes" it.
>
> The kernel emits:
>
> i2c_hid i2c-SYNA2B29:00: failed to reset device.
> dpm_run_callback(): i2c_hid_resume+0x0/0xc0 [i2c_hid] returns -61
> PM: Device i2c-SYNA2B29:00 failed to resume: error -61
>
> During the resume. So perhaps this is a timing issue (given that once
> resumed, the
> module reload does work?).
Linus noticed this as well and Jiri suggested the below patch which
seemed to fix the issue (although it increased resume time a bit).
I was supposed to get one Lenovo Yoga 900 here to debug this issue but
I'm still waiting for it (sloow big corporation bureaucracy takes some
time to get things purchased outside).
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 55d8f9d..52dd03a0 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -1121,10 +1121,16 @@ static int i2c_hid_resume(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct i2c_hid *ihid = i2c_get_clientdata(client);
struct hid_device *hid = ihid->hid;
- int wake_status;
+ int wake_status, tries = 3;
enable_irq(ihid->irq);
- ret = i2c_hid_hwreset(client);
+
+ do {
+ ret = i2c_hid_hwreset(client);
+ if (ret)
+ msleep(1000);
+ } while (tries-- > 0 && ret);
+
if (ret)
return ret;
next prev parent reply other threads:[~2015-12-16 9:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 19:14 [RESEND] Lenovo Yoga 900 touchpad issues Nish Aravamudan
2015-12-16 9:28 ` Mika Westerberg [this message]
2015-12-16 13:18 ` Jiri Kosina
2015-12-16 22:59 ` Nish Aravamudan
2015-12-17 9:53 ` Benjamin Tissoires
2015-12-17 16:48 ` Nish Aravamudan
2015-12-17 17:28 ` Benjamin Tissoires
2015-12-17 17:34 ` Nish Aravamudan
2015-12-16 22:58 ` Nish Aravamudan
2015-12-18 14:42 ` Mika Westerberg
2015-12-18 15:38 ` Mika Westerberg
2015-12-18 16:10 ` Benjamin Tissoires
2015-12-21 11:32 ` Mika Westerberg
2015-12-18 17:54 ` Nish Aravamudan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151216092858.GP1762@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=aduggan@synaptics.com \
--cc=benjamin.tissoires@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=gabriele.mzt@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nish.aravamudan@gmail.com \
--cc=seth.forshee@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox