linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM
@ 2010-01-11  6:20 hvaibhav
  2010-02-05  1:05 ` [APPLIED] " Tony Lindgren
  0 siblings, 1 reply; 6+ messages in thread
From: hvaibhav @ 2010-01-11  6:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, khilman, Vaibhav Hiremath

From: Vaibhav Hiremath <hvaibhav@ti.com>

Add platform hook-up interface to support touch-Screen driver
(TSC2004).

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
 arch/arm/mach-omap2/board-am3517evm.c |   60 +++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 300b165..33d364a 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -20,6 +20,8 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
+#include <linux/irq.h>
+#include <linux/i2c/tsc2004.h>

 #include <mach/hardware.h>
 #include <mach/am35xx.h>
@@ -33,6 +35,59 @@

 #include "mux.h"

+/*
+ * TSC 2004 Support
+ */
+#define	GPIO_TSC2004_IRQ	65
+
+static int tsc2004_init_irq(void)
+{
+	int ret = 0;
+
+	ret = gpio_request(GPIO_TSC2004_IRQ, "tsc2004-irq");
+	if (ret < 0) {
+		printk(KERN_WARNING "failed to request GPIO#%d: %d\n",
+				GPIO_TSC2004_IRQ, ret);
+		return ret;
+	}
+
+	if (gpio_direction_input(GPIO_TSC2004_IRQ)) {
+		printk(KERN_WARNING "GPIO#%d cannot be configured as "
+				"input\n", GPIO_TSC2004_IRQ);
+		return -ENXIO;
+	}
+
+	omap_set_gpio_debounce(GPIO_TSC2004_IRQ, 1);
+	omap_set_gpio_debounce_time(GPIO_TSC2004_IRQ, 0xa);
+	return ret;
+}
+
+static void tsc2004_exit_irq(void)
+{
+	gpio_free(GPIO_TSC2004_IRQ);
+}
+
+static int tsc2004_get_irq_level(void)
+{
+	return gpio_get_value(GPIO_TSC2004_IRQ) ? 0 : 1;
+}
+
+struct tsc2004_platform_data am3517evm_tsc2004data = {
+	.model = 2004,
+	.x_plate_ohms = 180,
+	.get_pendown_state = tsc2004_get_irq_level,
+	.init_platform_hw = tsc2004_init_irq,
+	.exit_platform_hw = tsc2004_exit_irq,
+};
+
+static struct i2c_board_info __initdata am3517evm_tsc_i2c_boardinfo[] = {
+	{
+		I2C_BOARD_INFO("tsc2004", 0x4B),
+		.type		= "tsc2004",
+		.platform_data	= &am3517evm_tsc2004data,
+	},
+};
+
 static int __init am3517_evm_i2c_init(void)
 {
 	omap_register_i2c_bus(1, 400, NULL, 0);
@@ -90,6 +145,11 @@ static void __init am3517_evm_init(void)

 	omap_serial_init();
 	usb_ehci_init(&ehci_pdata);
+	/* TSC 2004 */
+	omap_mux_init_gpio(65, OMAP_PIN_INPUT_PULLUP);
+	am3517evm_tsc_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_TSC2004_IRQ);
+	i2c_register_board_info(1, am3517evm_tsc_i2c_boardinfo,
+				ARRAY_SIZE(am3517evm_tsc_i2c_boardinfo));
 }

 static void __init am3517_evm_map_io(void)
--
1.6.2.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM
  2010-01-11  6:20 [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM hvaibhav
@ 2010-02-05  1:05 ` Tony Lindgren
  2010-02-05  5:33   ` Hiremath, Vaibhav
  0 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2010-02-05  1:05 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 5fcad6b119b8760f817dbf2f2d6331ee0cee442f

PatchWorks
http://patchwork.kernel.org/patch/72102/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=5fcad6b119b8760f817dbf2f2d6331ee0cee442f



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM
  2010-02-05  1:05 ` [APPLIED] " Tony Lindgren
@ 2010-02-05  5:33   ` Hiremath, Vaibhav
  2010-02-05 16:38     ` Tony Lindgren
  0 siblings, 1 reply; 6+ messages in thread
From: Hiremath, Vaibhav @ 2010-02-05  5:33 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Tony Lindgren
> Sent: Friday, February 05, 2010 6:35 AM
> To: linux-omap@vger.kernel.org
> Subject: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver
> support for AM3517EVM
> 
> This patch has been applied to the linux-omap
> by youw fwiendly patch wobot.
> 
[Hiremath, Vaibhav] Tony,

Please revert this single commit. Actually I had a discussion with Dmitry Torokhov and the conclusion is, as of now for TSC2004 we can reuse TSC2007, and once they start diverging we can split them. I will be submitting patches for this support shortly.

So please revert hits commit.

Thanks,
Vaibhav

> Branch in linux-omap: for-next
> 
> Initial commit ID (Likely to change):
> 5fcad6b119b8760f817dbf2f2d6331ee0cee442f
> 
> PatchWorks
> http://patchwork.kernel.org/patch/72102/
> 
> Git (Likely to change, and takes a while to get mirrored)
> http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-
> 2.6.git;a=commit;h=5fcad6b119b8760f817dbf2f2d6331ee0cee442f
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM
  2010-02-05  5:33   ` Hiremath, Vaibhav
@ 2010-02-05 16:38     ` Tony Lindgren
  2010-02-10  9:20       ` Hiremath, Vaibhav
  0 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2010-02-05 16:38 UTC (permalink / raw)
  To: Hiremath, Vaibhav; +Cc: linux-omap

* Hiremath, Vaibhav <hvaibhav@ti.com> [100204 21:31]:
> > -----Original Message-----
> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > owner@vger.kernel.org] On Behalf Of Tony Lindgren
> > Sent: Friday, February 05, 2010 6:35 AM
> > To: linux-omap@vger.kernel.org
> > Subject: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver
> > support for AM3517EVM
> > 
> > This patch has been applied to the linux-omap
> > by youw fwiendly patch wobot.
> > 
> [Hiremath, Vaibhav] Tony,
> 
> Please revert this single commit. Actually I had a discussion with Dmitry Torokhov and the conclusion is, as of now for TSC2004 we can reuse TSC2007, and once they start diverging we can split them. I will be submitting patches for this support shortly.
> 
> So please revert hits commit.

Yeah noticed that as they did not compile with omap3_defconfig.

Reverted all of them except patch "AM3517: Enable basic I2C Support".

Regards,

Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM
  2010-02-05 16:38     ` Tony Lindgren
@ 2010-02-10  9:20       ` Hiremath, Vaibhav
  2010-02-10 17:14         ` Tony Lindgren
  0 siblings, 1 reply; 6+ messages in thread
From: Hiremath, Vaibhav @ 2010-02-10  9:20 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap


> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com]
> Sent: Friday, February 05, 2010 10:09 PM
> To: Hiremath, Vaibhav
> Cc: linux-omap@vger.kernel.org
> Subject: Re: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver
> support for AM3517EVM
> 
> * Hiremath, Vaibhav <hvaibhav@ti.com> [100204 21:31]:
> > > -----Original Message-----
> > > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > > owner@vger.kernel.org] On Behalf Of Tony Lindgren
> > > Sent: Friday, February 05, 2010 6:35 AM
> > > To: linux-omap@vger.kernel.org
> > > Subject: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver
> > > support for AM3517EVM
> > >
> > > This patch has been applied to the linux-omap
> > > by youw fwiendly patch wobot.
> > >
> > [Hiremath, Vaibhav] Tony,
> >
> > Please revert this single commit. Actually I had a discussion with
> Dmitry Torokhov and the conclusion is, as of now for TSC2004 we can
> reuse TSC2007, and once they start diverging we can split them. I
> will be submitting patches for this support shortly.
> 
> >
> > So please revert hits commit.
> 
> Yeah noticed that as they did not compile with omap3_defconfig.
> 
> Reverted all of them except patch "AM3517: Enable basic I2C
> Support".
> 
[Hiremath, Vaibhav] Tony,
The issue was only with TSC2004 support patch, all other patches should go in, since the driver is already being supported in Linux kernel, it was just hookup part.

So can you please merge all other patches expect TSC2004 support?

Thanks,
Vaibhav
> Regards,
> 
> Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM
  2010-02-10  9:20       ` Hiremath, Vaibhav
@ 2010-02-10 17:14         ` Tony Lindgren
  0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2010-02-10 17:14 UTC (permalink / raw)
  To: Hiremath, Vaibhav; +Cc: linux-omap

* Hiremath, Vaibhav <hvaibhav@ti.com> [100210 01:17]:
> 
> > -----Original Message-----
> > From: Tony Lindgren [mailto:tony@atomide.com]
> > Sent: Friday, February 05, 2010 10:09 PM
> > To: Hiremath, Vaibhav
> > Cc: linux-omap@vger.kernel.org
> > Subject: Re: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver
> > support for AM3517EVM
> > 
> > * Hiremath, Vaibhav <hvaibhav@ti.com> [100204 21:31]:
> > > > -----Original Message-----
> > > > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > > > owner@vger.kernel.org] On Behalf Of Tony Lindgren
> > > > Sent: Friday, February 05, 2010 6:35 AM
> > > > To: linux-omap@vger.kernel.org
> > > > Subject: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver
> > > > support for AM3517EVM
> > > >
> > > > This patch has been applied to the linux-omap
> > > > by youw fwiendly patch wobot.
> > > >
> > > [Hiremath, Vaibhav] Tony,
> > >
> > > Please revert this single commit. Actually I had a discussion with
> > Dmitry Torokhov and the conclusion is, as of now for TSC2004 we can
> > reuse TSC2007, and once they start diverging we can split them. I
> > will be submitting patches for this support shortly.
> > 
> > >
> > > So please revert hits commit.
> > 
> > Yeah noticed that as they did not compile with omap3_defconfig.
> > 
> > Reverted all of them except patch "AM3517: Enable basic I2C
> > Support".
> > 
> [Hiremath, Vaibhav] Tony,
> The issue was only with TSC2004 support patch, all other patches should go in, since the driver is already being supported in Linux kernel, it was just hookup part.
> 
> So can you please merge all other patches expect TSC2004 support?

Please repost the others, they don't apply.

Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-10 17:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-11  6:20 [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM hvaibhav
2010-02-05  1:05 ` [APPLIED] " Tony Lindgren
2010-02-05  5:33   ` Hiremath, Vaibhav
2010-02-05 16:38     ` Tony Lindgren
2010-02-10  9:20       ` Hiremath, Vaibhav
2010-02-10 17:14         ` Tony Lindgren

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).