summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKuninori Morimoto2010-03-11 11:42:52 +0100
committerPaul Mundt2010-04-07 09:22:09 +0200
commit91cf5082292129881fbbfb6390b9544050c25619 (patch)
tree825367f0bbbe2a0221fe992204f3ac56f60d607e /arch
parentARM: mach-shmobile: sh7372: Add I2C0, I2C1 support (diff)
downloadkernel-qcow2-linux-91cf5082292129881fbbfb6390b9544050c25619.tar.gz
kernel-qcow2-linux-91cf5082292129881fbbfb6390b9544050c25619.tar.xz
kernel-qcow2-linux-91cf5082292129881fbbfb6390b9544050c25619.zip
ARM: mach-shmobile: ap4evb: Add TouchScreen support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 1c2ec96ce261..b10431451f39 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -26,6 +26,8 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
+#include <linux/i2c.h>
+#include <linux/i2c/tsc2007.h>
#include <linux/io.h>
#include <linux/smsc911x.h>
#include <linux/gpio.h>
@@ -234,6 +236,23 @@ static struct platform_device *ap4evb_devices[] __initdata = {
&sdhi0_device,
};
+/* TouchScreen */
+#define IRQ28 396
+struct tsc2007_platform_data tsc2007_info = {
+ .model = 2007,
+ .x_plate_ohms = 180,
+};
+
+/* I2C */
+static struct i2c_board_info i2c1_devices[] = {
+ {
+ I2C_BOARD_INFO("tsc2007", 0x48),
+ .type = "tsc2007",
+ .platform_data = &tsc2007_info,
+ .irq = IRQ28,
+ },
+};
+
static struct map_desc ap4evb_io_desc[] __initdata = {
/* create a 1:1 entity map for 0xe6xxxxxx
* used by CPGA, INTC and PFC.
@@ -318,6 +337,13 @@ static void __init ap4evb_init(void)
gpio_request(GPIO_FN_SDHID0_1, NULL);
gpio_request(GPIO_FN_SDHID0_0, NULL);
+ /* enable TouchScreen */
+ gpio_request(GPIO_FN_IRQ28_123, NULL);
+ set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW);
+
+ i2c_register_board_info(1, i2c1_devices,
+ ARRAY_SIZE(i2c1_devices));
+
sh7372_add_standard_devices();
platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));