public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dudley Du" <dudley.dulixin@gmail.com>
To: "'Jeremiah Mahler'" <jmmahler@gmail.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, "Dudley Du" <dudl@cypress.com>
Subject: RE: [BUG] [PATCH] next: cyapa: fix inop touchpad after resume on Acer C720
Date: Thu, 27 Nov 2014 13:45:49 +0800	[thread overview]
Message-ID: <000d01d00a05$7ffe4970$7ffadc50$@gmail.com> (raw)
In-Reply-To: <20141126200238.GB27014@hudson.localdomain>

[-- Attachment #1: Type: text/plain, Size: 2640 bytes --]

Jeremiah,

I didn't make the special patch for the linux-next before, so I don't know why
this patch is there and have issue.
Based on current code in the linux-next, I made below patch to fix this issue.
Could you please try again with attached patch fix.

Thanks,
Dudley

> -----Original Message-----
> From: Jeremiah Mahler [mailto:jmmahler@gmail.com]
> Sent: 2014?11?27? 4:03
> To: Dudley Du
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: [BUG] [PATCH] next: cyapa: fix inop touchpad after resume on Acer
> C720
> 
> Dudley,
> 
> On Wed, Nov 26, 2014 at 06:16:00AM +0000, Dudley Du wrote:
> > More info: I did all testings based on kernel 3.14.0 on Acer C70.
> >
> 
> I am testing with linux-next 3.18-rc6 on an Acer C720.
> 
> http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
> 
> > Thanks,
> > Dudley
> >
> []
> 
> --
> - Jeremiah Mahler

>From bb717b1c1525ef6b889f0ef735d920eed9e76e72 Mon Sep 17 00:00:00 2001
From: Dudley Du <dudley.dulixin@gmail.com>
Date: Thu, 27 Nov 2014 13:35:09 +0800
Subject: [PATCH] input: cyapa: fix irq error issue in cyapa_resume
To: dmitry.torokhov@gmail.com,
    jmmahler@gmail.com
Cc: bleung@google.com,
    linux-input@vger.kernel.org

This patch is aimed to fix the irq error happened on cyapa_resume when
doing suspend/resume testing.
The root cause of this issue is that the cyapa->irq has been removed but
still used in the driver.

Signed-off-by: Dudley Du <dudley.dulixin@gmail.com>
---
 drivers/input/mouse/cyapa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c
index c84a9eb..caaba7b 100644
--- a/drivers/input/mouse/cyapa.c
+++ b/drivers/input/mouse/cyapa.c
@@ -938,7 +938,7 @@ static int __maybe_unused cyapa_suspend(struct device *dev)
 			 power_mode, error);
 
 	if (device_may_wakeup(dev))
-		cyapa->irq_wake = (enable_irq_wake(cyapa->irq) == 0);
+		cyapa->irq_wake = (enable_irq_wake(cyapa->client->irq) == 0);
 
 	mutex_unlock(&input->mutex);
 
@@ -956,7 +956,7 @@ static int __maybe_unused cyapa_resume(struct device *dev)
 	mutex_lock(&input->mutex);
 
 	if (device_may_wakeup(dev) && cyapa->irq_wake)
-		disable_irq_wake(cyapa->irq);
+		disable_irq_wake(cyapa->client->irq);
 
 	power_mode = input->users ? PWR_MODE_FULL_ACTIVE : PWR_MODE_OFF;
 	error = cyapa_set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE);
@@ -964,7 +964,7 @@ static int __maybe_unused cyapa_resume(struct device *dev)
 		dev_warn(dev, "resume: set power mode to %d failed: %d\n",
 			 power_mode, error);
 
-	enable_irq(cyapa->irq);
+	enable_irq(cyapa->client->irq);
 
 	mutex_unlock(&input->mutex);
 
-- 
1.9.1

[-- Attachment #2: input-cyapa-fix-irq-error-issue-in-cyapa_resume.patch --]
[-- Type: application/octet-stream, Size: 1830 bytes --]

>From bb717b1c1525ef6b889f0ef735d920eed9e76e72 Mon Sep 17 00:00:00 2001
From: Dudley Du <dudley.dulixin@gmail.com>
Date: Thu, 27 Nov 2014 13:35:09 +0800
Subject: [PATCH] input: cyapa: fix irq error issue in cyapa_resume
To: dmitry.torokhov@gmail.com,
    jmmahler@gmail.com
Cc: bleung@google.com,
    linux-input@vger.kernel.org

This patch is aimed to fix the irq error happened on cyapa_resume when
doing suspend/resume testing.
The root cause of this issue is that the cyapa->irq has been removed but
still used in the driver.

Signed-off-by: Dudley Du <dudley.dulixin@gmail.com>
---
 drivers/input/mouse/cyapa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c
index c84a9eb..caaba7b 100644
--- a/drivers/input/mouse/cyapa.c
+++ b/drivers/input/mouse/cyapa.c
@@ -938,7 +938,7 @@ static int __maybe_unused cyapa_suspend(struct device *dev)
 			 power_mode, error);
 
 	if (device_may_wakeup(dev))
-		cyapa->irq_wake = (enable_irq_wake(cyapa->irq) == 0);
+		cyapa->irq_wake = (enable_irq_wake(cyapa->client->irq) == 0);
 
 	mutex_unlock(&input->mutex);
 
@@ -956,7 +956,7 @@ static int __maybe_unused cyapa_resume(struct device *dev)
 	mutex_lock(&input->mutex);
 
 	if (device_may_wakeup(dev) && cyapa->irq_wake)
-		disable_irq_wake(cyapa->irq);
+		disable_irq_wake(cyapa->client->irq);
 
 	power_mode = input->users ? PWR_MODE_FULL_ACTIVE : PWR_MODE_OFF;
 	error = cyapa_set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE);
@@ -964,7 +964,7 @@ static int __maybe_unused cyapa_resume(struct device *dev)
 		dev_warn(dev, "resume: set power mode to %d failed: %d\n",
 			 power_mode, error);
 
-	enable_irq(cyapa->irq);
+	enable_irq(cyapa->client->irq);
 
 	mutex_unlock(&input->mutex);
 
-- 
1.9.1


  reply	other threads:[~2014-11-27  5:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19  8:37 [PATCH v11 00/19] input: cyapa: instruction of cyapa patches Dudley Du
2014-11-19  8:37 ` [PATCH v11 01/19] input: cyapa: modify code to following kernel code style Dudley Du
2014-11-19  8:37 ` [PATCH v11 02/19] input: cyapa: add device resource management infrastructure support Dudley Du
2014-11-19  8:37 ` [PATCH v11 03/19] input: cyapa: re-design driver to support multi-trackpad in one driver Dudley Du
2014-11-19  8:37 ` [PATCH v11 04/19] input: cyapa: add gen5 trackpad device basic functions support Dudley Du
2014-11-19  8:37 ` [PATCH v11 05/19] input: cyapa: add power management interfaces supported for the device Dudley Du
2014-11-19  8:37 ` [PATCH v11 06/19] input: cyapa: add runtime " Dudley Du
2014-11-19  8:37 ` [PATCH v11 07/19] input: cyapa: add sysfs interfaces supported in the cyapa driver Dudley Du
2014-11-19  8:37 ` [PATCH v11 08/19] input: cyapa: add gen3 trackpad device firmware update function support Dudley Du
2014-11-19  8:37 ` [PATCH v11 09/19] input: cyapa: add gen3 trackpad device read baseline " Dudley Du
2014-11-19  8:37 ` [PATCH v11 10/19] input: cyapa: add gen3 trackpad device force re-calibrate " Dudley Du
2014-11-19  8:37 ` [PATCH v11 11/19] input: cyapa: add gen5 trackpad device firmware update " Dudley Du
2014-11-19  8:37 ` [PATCH v11 12/19] input: cyapa: add gen5 trackpad device read baseline " Dudley Du
2014-11-19  8:37 ` [PATCH v11 13/19] input: cyapa: add gen5 trackpad device force re-calibrate " Dudley Du
2014-11-19  8:37 ` [PATCH v11 14/19] input: cyapa: add read firmware image debugfs interface support Dudley Du
2014-11-19  8:37 ` [PATCH v11 15/19] input: cyapa: add gen3 trackpad device read firmware image function support Dudley Du
2014-11-19  8:37 ` [PATCH v11 16/19] input: cyapa: add gen5 " Dudley Du
2014-11-19  8:37 ` [PATCH v11 17/19] input: cyapa: add read sensors raw data debugfs interface support Dudley Du
2014-11-19  8:37 ` [PATCH v11 18/19] input: cyapa: add gen5 trackpad device read raw data function support Dudley Du
2014-11-19  8:37 ` [PATCH v11 19/19] input: cyapa: add acpi device id supported Dudley Du
2014-11-21  8:56 ` [PATCH v11 00/19] input: cyapa: instruction of cyapa patches Jeremiah Mahler
2014-11-24  3:06   ` Dudley Du
2014-11-24  8:50     ` Jeremiah Mahler
2014-11-25 10:07       ` [BUG] [PATCH] next: cyapa: fix inop touchpad after resume on Acer C720 Jeremiah Mahler
2014-11-26  6:01         ` Dudley Du
2014-11-26 19:59           ` Jeremiah Mahler
2014-11-26  6:16         ` Dudley Du
2014-11-26 20:02           ` Jeremiah Mahler
2014-11-27  5:45             ` Dudley Du [this message]
2014-11-27  9:05               ` Jeremiah Mahler
2014-11-27 18:16               ` Dmitry Torokhov

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='000d01d00a05$7ffe4970$7ffadc50$@gmail.com' \
    --to=dudley.dulixin@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dudl@cypress.com \
    --cc=jmmahler@gmail.com \
    --cc=linux-kernel@vger.kernel.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: 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