From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: AceLan Kao <acelan.kao@canonical.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-i2c@vger.kernel.org,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i2c: designware: Add disable runtime pm quirk
Date: Wed, 26 Jun 2019 09:27:27 +0300 [thread overview]
Message-ID: <5c14537d-b6aa-b478-fdd8-29f690b15e07@linux.intel.com> (raw)
In-Reply-To: <CAFv23QnaKMs9bjS9ry_L4K7wskUqNR2AsgDG-v+fah2XO7EpKw@mail.gmail.com>
On 6/26/19 5:32 AM, AceLan Kao wrote:
> Adding I2C_HID_QUIRK_NO_RUNTIME_PM quirk doesn't help on this issue.
> Actually, Goodix touchpad already has that PM quirk in the list for other issue.
> { I2C_VENDOR_ID_GOODIX, I2C_DEVICE_ID_GOODIX_01F0,
> I2C_HID_QUIRK_NO_RUNTIME_PM },
> I also modify the code as you suggested, but no luck.
>
Yeah, I realized it won't help as the i2c-hid device is anyway powered
on constantly when the device is open by the pm_runtime_get_sync() call
in i2c_hid_open().
> It's not Goodix takes time to wakeup, it's designware I2C controller.
> Designware doesn't do anything wrong here, it's Goodix set the interrupt timeout
> that leads to the issue, so we have to prevent designware from runtime
> suspended.
> But only on that bus where Goodix is connected and open by user space.
What I mean something like below:
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c
b/drivers/hid/i2c-hid/i2c-hid-core.c
index 90164fed08d3..bbeaa39ddc23 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -795,6 +795,9 @@ static int i2c_hid_open(struct hid_device *hid)
struct i2c_hid *ihid = i2c_get_clientdata(client);
int ret = 0;
+ /* some quirk test here */
+ pm_runtime_get_sync(&client->adapter->dev);
+
ret = pm_runtime_get_sync(&client->dev);
if (ret < 0)
return ret;
@@ -812,6 +815,9 @@ static void i2c_hid_close(struct hid_device *hid)
/* Save some power */
pm_runtime_put(&client->dev);
+
+ /* some quirk test here */
+ pm_runtime_put(&client->adapter->dev);
}
static int i2c_hid_power(struct hid_device *hid, int lvl)
--
Jarkko
next prev parent reply other threads:[~2019-06-26 6:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 8:30 [PATCH] i2c: designware: Add disable runtime pm quirk AceLan Kao
2019-06-25 13:38 ` Jarkko Nikula
2019-06-26 2:32 ` AceLan Kao
2019-06-26 6:27 ` Jarkko Nikula [this message]
2019-07-08 6:18 ` AceLan Kao
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=5c14537d-b6aa-b478-fdd8-29f690b15e07@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=acelan.kao@canonical.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.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;
as well as URLs for NNTP newsgroup(s).