AM3517: Enable TSC2004 driver support for AM3517EVM
Subsystems (3)
PATCH 1/1 AM3517: Enable TSC2004 driver support for AM3517EVM
From: Vaibhav Hiremath <[email protected]>
Add platform hook-up interface to support touch-Screen driver (TSC2004).
--- arch/arm/mach-omap2/board-am3517evm.c | 60 +++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-am3517evm.c +60 -0
@@ -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
Tony Lindgren
maintainerPATCH 1/1 AM3517: Enable TSC2004 driver support for AM3517EVM
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
Quoted 11 lines
-----Original Message-----
From: [email protected] [mailto:linux-omap- [email protected]] On Behalf Of Tony Lindgren
Sent: Friday, February 05, 2010 6:35 AM
To: [email protected]
Subject: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVMThis 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
Quoted 18 lines
Branch in linux-omap: for-next
Initial commit ID (Likely to change):
5fcad6b119b8760f817dbf2f2d6331ee0cee442fPatchWorks
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Tony Lindgren
maintainerQuoted 8 lines · Hiremath, Vaibhav
Quoted 8 lines
-----Original Message-----
From: [email protected] [mailto:linux-omap- [email protected]] On Behalf Of Tony Lindgren
Sent: Friday, February 05, 2010 6:35 AM
To: [email protected]
Subject: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM
Quoted 8 lines
Quoted 3 lines
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
Quoted 29 lines
-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Friday, February 05, 2010 10:09 PM
To: Hiremath, Vaibhav
Cc: [email protected]
Subject: Re: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVMQuoted 8 lines · Hiremath, Vaibhav
Quoted 8 lines
-----Original Message-----
From: [email protected] [mailto:linux-omap- [email protected]] On Behalf Of Tony Lindgren
Sent: Friday, February 05, 2010 6:35 AM
To: [email protected]
Subject: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVMQuoted 6 lines
Quoted 3 lines
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.
Quoted 1 line
Quoted 7 lines
Quoted 1 line
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
Quoted 3 lines
Regards,
Tony
Tony Lindgren
maintainerQuoted 33 lines · Hiremath, Vaibhav
Quoted 33 lines
-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Friday, February 05, 2010 10:09 PM
To: Hiremath, Vaibhav
Cc: [email protected]
Subject: Re: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVMQuoted 8 lines · Hiremath, Vaibhav
Quoted 8 lines
-----Original Message-----
From: [email protected] [mailto:linux-omap- [email protected]] On Behalf Of Tony Lindgren
Sent: Friday, February 05, 2010 6:35 AM
To: [email protected]
Subject: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVMQuoted 6 lines
Quoted 3 lines
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.
Quoted 2 lines
So please revert hits commit.
Yeah noticed that as they did not compile with
omap3_defconfig.
Quoted 7 lines
Quoted 3 lines
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