From: Benoit Parrot <bparrot@ti.com> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Henrik Rydberg <rydberg@bitmath.org>, Marco Felsch <m.felsch@pengutronix.de>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, <linux-input@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Benoit Parrot <bparrot@ti.com> Subject: [Patch 1/1] Input: edt-ft5x06 - disable irq handling during suspend Date: Fri, 21 Jun 2019 13:51:24 -0500 [thread overview] Message-ID: <20190621185124.28966-1-bparrot@ti.com> (raw) As a wakeup source when the system is in suspend there is little point trying to access a register across the i2c bus as it is probably still inactive. We need to prevent the irq handler from being called during suspend. Without this modification upon wakeup you would see the following kernel error: [ 118.733717] PM: Wakeup source GPIO0 [ 118.751933] edt_ft5x06 1-0038: Unable to fetch data, error: -13 Signed-off-by: Benoit Parrot <bparrot@ti.com> --- drivers/input/touchscreen/edt-ft5x06.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index c639ebce914c..c885bfe783a4 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1200,8 +1200,10 @@ static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); - if (device_may_wakeup(dev)) + if (device_may_wakeup(dev)) { enable_irq_wake(client->irq); + disable_irq(client->irq); + } return 0; } @@ -1210,8 +1212,10 @@ static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); - if (device_may_wakeup(dev)) + if (device_may_wakeup(dev)) { disable_irq_wake(client->irq); + enable_irq(client->irq); + } return 0; } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Benoit Parrot <bparrot@ti.com> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Henrik Rydberg <rydberg@bitmath.org>, Marco Felsch <m.felsch@pengutronix.de>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benoit Parrot <bparrot@ti.com> Subject: [Patch 1/1] Input: edt-ft5x06 - disable irq handling during suspend Date: Fri, 21 Jun 2019 13:51:24 -0500 [thread overview] Message-ID: <20190621185124.28966-1-bparrot@ti.com> (raw) As a wakeup source when the system is in suspend there is little point trying to access a register across the i2c bus as it is probably still inactive. We need to prevent the irq handler from being called during suspend. Without this modification upon wakeup you would see the following kernel error: [ 118.733717] PM: Wakeup source GPIO0 [ 118.751933] edt_ft5x06 1-0038: Unable to fetch data, error: -13 Signed-off-by: Benoit Parrot <bparrot@ti.com> --- drivers/input/touchscreen/edt-ft5x06.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index c639ebce914c..c885bfe783a4 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1200,8 +1200,10 @@ static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); - if (device_may_wakeup(dev)) + if (device_may_wakeup(dev)) { enable_irq_wake(client->irq); + disable_irq(client->irq); + } return 0; } @@ -1210,8 +1212,10 @@ static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); - if (device_may_wakeup(dev)) + if (device_may_wakeup(dev)) { disable_irq_wake(client->irq); + enable_irq(client->irq); + } return 0; } -- 2.17.1
next reply other threads:[~2019-06-21 18:50 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-06-21 18:51 Benoit Parrot [this message] 2019-06-21 18:51 ` [Patch 1/1] Input: edt-ft5x06 - disable irq handling during suspend Benoit Parrot 2019-06-22 10:37 ` Andy Shevchenko 2019-06-23 5:59 ` Dmitry Torokhov 2019-06-24 12:24 ` Benoit Parrot 2019-07-01 7:32 ` Dmitry Torokhov 2019-07-01 20:08 ` Benoit Parrot 2019-06-24 12:21 ` Benoit Parrot
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=20190621185124.28966-1-bparrot@ti.com \ --to=bparrot@ti.com \ --cc=andriy.shevchenko@linux.intel.com \ --cc=dmitry.torokhov@gmail.com \ --cc=linux-input@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=m.felsch@pengutronix.de \ --cc=rydberg@bitmath.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.