summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/common-board-devices.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-23 17:34:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-23 17:34:48 -0700
commitf1d2c07d331f717da79a42952be7dc1c0d35f846 (patch)
tree5bc98d2d63a37b688b40a4641855c512b385d0ae /arch/arm/mach-omap2/common-board-devices.c
parenta17f29a5e98c0a32a900a773083c719e27f4bc0e (diff)
parentd003e09891fdc0c170b99328eba7ed004809ef5a (diff)
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc board specific updates from Arnd Bergmann: "These changes are all for individual board files. In the long run, those files will largely go away, and the amount of changes appears to be continuously decreasing, which is a good sign. This time around, changes are focused on tegra, omap and samsung." Fix conflicts in arch/arm/mach-{omap2/common-board-devices.c,tegra/Makefile.boot} as per the 'for-linus' branch. * tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (39 commits) ARM: EXYNOS: Add leds status1 and status2 on Origen board ARM: S3C64XX: Mark most Cragganmore initdata devinitdata ARM: EXYNOS: Add missing .reserve field to SMDKC210 ARM: EXYNOS: Add DRM device to SMDK4X12 board ARM: S3C64XX: Clean up after SPI driver platform data updates ARM: SAMSUNG: no need to set the value for clk_xusbxti when it is 24Mhz ARM: EXYNOS: Add framebuffer support for SMDK4X12 ARM: EXYNOS: Add HSOTG support to SMDK4X12 ARM: S5PV210: Add audio platform device in Goni board ARM: S5PV210: Add audio platform device in Aquila board ARM: EXYNOS: Add audio platform device in SMDKV310 board ARM: S3C64XX: Don't specify an irq_base for WM1192-EV1 board ARM: OMAP3: Fix omap3evm randconfig error introduced by VBUS support ARM: OMAP: board-omap4panda: MUX configuration for sys_nirq2 ARM: OMAP: board-4430sdp: MUX configuration for sys_nirq2 ARM: OMAP3530evm: set pendown_state and debounce time for ads7846 ARM: omap3evm: enable VBUS switch for EHCI tranceiver ARM: OMAP3EVM: Adding USB internal LDOs board file ARM: OMAP3EVM: Add NAND flash definition ARM: OMAP3: cm-t35: add tvp5150 decoder support ...
Diffstat (limited to 'arch/arm/mach-omap2/common-board-devices.c')
-rw-r--r--arch/arm/mach-omap2/common-board-devices.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index c1875862679f..14734746457c 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -35,6 +35,16 @@ static struct omap2_mcspi_device_config ads7846_mcspi_config = {
.turbo_mode = 0,
};
+/*
+ * ADS7846 driver maybe request a gpio according to the value
+ * of pdata->get_pendown_state, but we have done this. So set
+ * get_pendown_state to avoid twice gpio requesting.
+ */
+static int omap3_get_pendown_state(void)
+{
+ return !gpio_get_value(OMAP3_EVM_TS_GPIO);
+}
+
static struct ads7846_platform_data ads7846_config = {
.x_max = 0x0fff,
.y_max = 0x0fff,
@@ -45,6 +55,7 @@ static struct ads7846_platform_data ads7846_config = {
.debounce_rep = 1,
.gpio_pendown = -EINVAL,
.keep_vref_on = 1,
+ .get_pendown_state = &omap3_get_pendown_state,
};
static struct spi_board_info ads7846_spi_board_info __initdata = {