From 16aced80f6739beb2a6ff7b6f96c83ba80d331e8 Mon Sep 17 00:00:00 2001 From: Zumeng Chen Date: Wed, 20 Jun 2012 17:14:53 +0800 Subject: ARM: OMAP3530evm: set pendown_state and debounce time for ads7846 Currently most ads7846 config definitions for OMAP3 series boards have been moved to common-board-devices.c, and it is transparent for init. And it's no very proper to do gpio_request based on get_pendown_state since omap_ads7846_init knows everything about ads7846_config. So it's more fit to request gpio according to the right gpio_pendown and set debounce time conditionally. If we don't set proper debouce time, there are flooded interrupt counters of ads7846 responding to one time touch on screen, then the driver couldn't work very well. This patch has been validated on 3530evm. Signed-off-by: Zumeng Chen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/common-board-devices.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-omap2/common-board-devices.h') diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h index a0b4a42836a..4c4ef6a6166 100644 --- a/arch/arm/mach-omap2/common-board-devices.h +++ b/arch/arm/mach-omap2/common-board-devices.h @@ -4,6 +4,7 @@ #include "twl-common.h" #define NAND_BLOCK_SIZE SZ_128K +#define OMAP3_EVM_TS_GPIO 175 struct mtd_partition; struct ads7846_platform_data; -- cgit v1.2.3 From c31cc1b764b6efb713601d351c1a879c042eab34 Mon Sep 17 00:00:00 2001 From: Igor Grinberg Date: Mon, 6 Aug 2012 23:22:15 +0300 Subject: Revert "ARM: OMAP3530evm: set pendown_state and debounce time for ads7846" 1) The above commit introduced a common ->get_pendown_state() function into the generic code, but that function was board-specific for the OMAP3EVM and thus broke most other boards using this code. 2) The above commit was mis-merged introducing another bug which prevents the ads7846 driver probe function to succeed. The omap_ads7846_init() function frees the pendown GPIO in case there is no ->get_pendown_state() function set by the caller (board specific code), so it can be requested later by the ads7846 driver. The above commit add a common ->get_pendown_state() function without removing the gpio_free() call and thus once the ads7846 driver tries to use the pendown GPIO, it crashes as the pendown GPIO has not been requested. 3) The above commit introduces NO new functionality as get_pendown_state() function is already implemented in a suitable way by the ads7846 driver and the debounce time handling has already been fixed by commit 97ee9f01 (ARM: OMAP: fix the ads7846 init code). This reverts commit 16aced80f6739beb2a6ff7b6f96c83ba80d331e8. Conflicts: arch/arm/mach-omap2/common-board-devices.c Solved by taking the working version prior to the above commit. Cc: Zumeng Chen Cc: Arnd Bergmann Signed-off-by: Igor Grinberg Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/common-board-devices.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-omap2/common-board-devices.h') diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h index 4c4ef6a6166..a0b4a42836a 100644 --- a/arch/arm/mach-omap2/common-board-devices.h +++ b/arch/arm/mach-omap2/common-board-devices.h @@ -4,7 +4,6 @@ #include "twl-common.h" #define NAND_BLOCK_SIZE SZ_128K -#define OMAP3_EVM_TS_GPIO 175 struct mtd_partition; struct ads7846_platform_data; -- cgit v1.2.3 From 2e618261c96d72e5c5409d134d6d93e679683ab8 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Wed, 29 Feb 2012 18:11:56 +0530 Subject: ARM: OMAP2+: nand: unify init functions Helper function for updating nand platform data has been added the capability to take timing structure arguement. Usage of omap_nand_flash_init() has been replaced by modifed one, omap_nand_flash_init was doing things similar to board_nand_init except that NAND CS# were being acquired based on bootloader setting. As CS# is hardwired for a given board, acquiring gpmc CS# has been removed, and updated with the value on board. NAND CS# used in beagle board & omap3evm was found to be CS0. Thomas Weber reported that value of devkit8000 to be CS0. Overo board was found to be using CS0 based on u-boot, while google grep says omap3touchbook too has CS0. Signed-off-by: Afzal Mohammed Reviewed-by: Jon Hunter Acked-by: Igor Grinberg --- arch/arm/mach-omap2/common-board-devices.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-omap2/common-board-devices.h') diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h index a0b4a42836a..72bb41b3fd2 100644 --- a/arch/arm/mach-omap2/common-board-devices.h +++ b/arch/arm/mach-omap2/common-board-devices.h @@ -10,6 +10,5 @@ struct ads7846_platform_data; void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, struct ads7846_platform_data *board_pdata); -void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts); #endif /* __OMAP_COMMON_BOARD_DEVICES__ */ -- cgit v1.2.3