linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: sameo@linux.intel.com
Cc: broonie@opensource.wolfsonmicro.com,
	ashish.jangam@kpitcummins.com, dchen@diasemi.com, arnd@arndb.de,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	Fabio Estevam <fabio.estevam@freescale.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	<linux-input@vger.kernel.org>
Subject: [PATCH 3/6] Input: da9052_tsi.c: Fix interrupt handling
Date: Thu,  4 Oct 2012 00:15:06 -0300	[thread overview]
Message-ID: <1349320509-26930-3-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1349320509-26930-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <fabio.estevam@freescale.com>

Currently da9062_tsi does not probe and it fails as follows:

da9052 1-0048: Unable to determine device interrupts

Use the new da9052 irq functions and allow the driver to probe and operate 
correctly.

Tested on mx53qsb board using 'evtest' tool.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/input/touchscreen/da9052_tsi.c |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/input/touchscreen/da9052_tsi.c b/drivers/input/touchscreen/da9052_tsi.c
index 71f6165..33fd3fa 100644
--- a/drivers/input/touchscreen/da9052_tsi.c
+++ b/drivers/input/touchscreen/da9052_tsi.c
@@ -274,16 +274,16 @@ static int __devinit da9052_ts_probe(struct platform_device *pdev)
 	/* Disable ADC */
 	da9052_ts_adc_toggle(tsi, false);
 
-	error = da9052_request_irq(tsi->da9052, DA9052_IRQ_PENDOWN, "pendown-irq",
-			    da9052_ts_pendwn_irq, tsi);
+	error = da9052_request_irq(tsi->da9052, DA9052_IRQ_PENDOWN,
+				"pendown-irq", da9052_ts_pendwn_irq, tsi);
 	if (error) {
 		dev_err(tsi->da9052->dev,
 			"Failed to register PENDWN IRQ: %d\n", error);
 		goto err_free_mem;
 	}
 
-	error = da9052_request_irq(tsi->da9052, DA9052_IRQ_TSIREADY, "tsiready-irq",
-			    da9052_ts_datardy_irq, tsi);
+	error = da9052_request_irq(tsi->da9052, DA9052_IRQ_TSIREADY,
+				"tsiready-irq", da9052_ts_datardy_irq, tsi);
 	if (error) {
 		dev_err(tsi->da9052->dev,
 			"Failed to register TSIRDY IRQ :%d\n", error);
@@ -307,9 +307,9 @@ static int __devinit da9052_ts_probe(struct platform_device *pdev)
 	return 0;
 
 err_free_datardy_irq:
-	da9052_free_irq(da9052, DA9052_IRQ_TSIREADY, da9052);
+	da9052_free_irq(tsi->da9052, DA9052_IRQ_TSIREADY, tsi);
 err_free_pendwn_irq:
-	da9052_free_irq(da9052, DA9052_IRQ_PENDOWN, da9052);
+	da9052_free_irq(tsi->da9052, DA9052_IRQ_PENDOWN, tsi);
 err_free_mem:
 	kfree(tsi);
 	input_free_device(input_dev);
@@ -320,12 +320,11 @@ err_free_mem:
 static int  __devexit da9052_ts_remove(struct platform_device *pdev)
 {
 	struct da9052_tsi *tsi = platform_get_drvdata(pdev);
-	struct da9052 *da9052 = dev_get_drvdata(pdev->dev.parent);
 
 	da9052_reg_write(tsi->da9052, DA9052_LDO9_REG, 0x19);
 
-	da9052_free_irq(da9052, DA9052_IRQ_TSIREADY, da9052);
-	da9052_free_irq(da9052, DA9052_IRQ_PENDOWN, da9052);
+	da9052_free_irq(tsi->da9052, DA9052_IRQ_TSIREADY, tsi);
+	da9052_free_irq(tsi->da9052, DA9052_IRQ_PENDOWN, tsi);
 
 	input_unregister_device(tsi->dev);
 	kfree(tsi);
-- 
1.7.9.5


  parent reply	other threads:[~2012-10-04  3:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04  3:15 [PATCH 1/6] mfd: da9052-core: Use regmap_irq_get_virq() and fix the probe Fabio Estevam
2012-10-04  3:15 ` [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c Fabio Estevam
2012-10-04  7:12   ` Arnd Bergmann
2012-10-04 11:14     ` Mark Brown
2012-10-04 12:17       ` Arnd Bergmann
2012-10-04 11:25   ` Mark Brown
2012-10-04  3:15 ` Fabio Estevam [this message]
2012-10-04  3:15 ` [PATCH 4/6] Input: da9052_onkey.c: Convert to the new da9052 interrupt functions Fabio Estevam
2012-10-05 18:57   ` Mark Brown
2012-10-04  3:15 ` [PATCH 5/6] power: da9052-battery: " Fabio Estevam
2012-10-05 18:58   ` Mark Brown
2012-11-18  4:20   ` Anton Vorontsov
2012-11-18 12:30     ` Fabio Estevam
2012-10-04  3:15 ` [PATCH 6/6] gpio: gpio-da9052: " Fabio Estevam
2012-10-04 11:26   ` Mark Brown
2012-10-08  6:20   ` Linus Walleij
2012-10-08 10:40     ` Fabio Estevam
2012-10-09 12:04       ` Linus Walleij
2012-10-09 12:19         ` Fabio Estevam
2012-10-04 11:26 ` [PATCH 1/6] mfd: da9052-core: Use regmap_irq_get_virq() and fix the probe Mark Brown
2012-11-12 16:22   ` Fabio Estevam
2012-11-18 23:44 ` Samuel Ortiz

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=1349320509-26930-3-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=arnd@arndb.de \
    --cc=ashish.jangam@kpitcummins.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dchen@diasemi.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fabio.estevam@freescale.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@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).