lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1349320509-26930-3-git-send-email-festevam@gmail.com>
Date:	Thu,  4 Oct 2012 00:15:06 -0300
From:	Fabio Estevam <festevam@...il.com>
To:	sameo@...ux.intel.com
Cc:	broonie@...nsource.wolfsonmicro.com, ashish.jangam@...tcummins.com,
	dchen@...semi.com, arnd@...db.de, kernel@...gutronix.de,
	linux-kernel@...r.kernel.org,
	Fabio Estevam <fabio.estevam@...escale.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	<linux-input@...r.kernel.org>
Subject: [PATCH 3/6] Input: da9052_tsi.c: Fix interrupt handling

From: Fabio Estevam <fabio.estevam@...escale.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@...il.com>
Cc: <linux-input@...r.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@...escale.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ