Add linux-next specific files for 20110831
[linux-2.6/next.git] / arch / arm / plat-samsung / dev-ts.c
blob00374938610140db7d9bc76b701b6f6eec234c59
1 /* linux/arch/arm/mach-s3c64xx/dev-ts.c
3 * Copyright (c) 2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
7 * Adapted by Maurus Cuelenaere for s3c64xx
9 * S3C64XX series device definition for touchscreen device
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
16 #include <linux/kernel.h>
17 #include <linux/string.h>
18 #include <linux/platform_device.h>
20 #include <mach/irqs.h>
21 #include <mach/map.h>
23 #include <asm/sizes.h>
25 #include <plat/devs.h>
26 #include <plat/ts.h>
28 static struct resource s3c_ts_resource[] = {
29 [0] = {
30 .start = SAMSUNG_PA_ADC,
31 .end = SAMSUNG_PA_ADC + SZ_256 - 1,
32 .flags = IORESOURCE_MEM,
34 [1] = {
35 .start = IRQ_TC,
36 .end = IRQ_TC,
37 .flags = IORESOURCE_IRQ,
41 struct platform_device s3c_device_ts = {
42 .name = "s3c64xx-ts",
43 .id = -1,
44 .num_resources = ARRAY_SIZE(s3c_ts_resource),
45 .resource = s3c_ts_resource,
48 static struct s3c2410_ts_mach_info default_ts_data __initdata = {
49 .delay = 10000,
50 .presc = 49,
51 .oversampling_shift = 2,
54 void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
56 if (!pd)
57 pd = &default_ts_data;
59 s3c_set_platdata(pd, sizeof(struct s3c2410_ts_mach_info),
60 &s3c_device_ts);