aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-ap4evb.c
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2010-03-11 05:42:52 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-04-07 03:22:09 -0400
commit91cf5082292129881fbbfb6390b9544050c25619 (patch)
tree825367f0bbbe2a0221fe992204f3ac56f60d607e /arch/arm/mach-shmobile/board-ap4evb.c
parentc1909cc19abdfa9f995036996603c9e969117e72 (diff)
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/arm/mach-shmobile/board-ap4evb.c')
-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 @@
26#include <linux/mtd/mtd.h> 26#include <linux/mtd/mtd.h>
27#include <linux/mtd/partitions.h> 27#include <linux/mtd/partitions.h>
28#include <linux/mtd/physmap.h> 28#include <linux/mtd/physmap.h>
29#include <linux/i2c.h>
30#include <linux/i2c/tsc2007.h>
29#include <linux/io.h> 31#include <linux/io.h>
30#include <linux/smsc911x.h> 32#include <linux/smsc911x.h>
31#include <linux/gpio.h> 33#include <linux/gpio.h>
@@ -234,6 +236,23 @@ static struct platform_device *ap4evb_devices[] __initdata = {
234 &sdhi0_device, 236 &sdhi0_device,
235}; 237};
236 238
239/* TouchScreen */
240#define IRQ28 396
241struct tsc2007_platform_data tsc2007_info = {
242 .model = 2007,
243 .x_plate_ohms = 180,
244};
245
246/* I2C */
247static struct i2c_board_info i2c1_devices[] = {
248 {
249 I2C_BOARD_INFO("tsc2007", 0x48),
250 .type = "tsc2007",
251 .platform_data = &tsc2007_info,
252 .irq = IRQ28,
253 },
254};
255
237static struct map_desc ap4evb_io_desc[] __initdata = { 256static struct map_desc ap4evb_io_desc[] __initdata = {
238 /* create a 1:1 entity map for 0xe6xxxxxx 257 /* create a 1:1 entity map for 0xe6xxxxxx
239 * used by CPGA, INTC and PFC. 258 * used by CPGA, INTC and PFC.
@@ -318,6 +337,13 @@ static void __init ap4evb_init(void)
318 gpio_request(GPIO_FN_SDHID0_1, NULL); 337 gpio_request(GPIO_FN_SDHID0_1, NULL);
319 gpio_request(GPIO_FN_SDHID0_0, NULL); 338 gpio_request(GPIO_FN_SDHID0_0, NULL);
320 339
340 /* enable TouchScreen */
341 gpio_request(GPIO_FN_IRQ28_123, NULL);
342 set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW);
343
344 i2c_register_board_info(1, i2c1_devices,
345 ARRAY_SIZE(i2c1_devices));
346
321 sh7372_add_standard_devices(); 347 sh7372_add_standard_devices();
322 348
323 platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); 349 platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));