From 7f90a049d8ddcb6c485e2a6889cb3b5d4a5be1c0 Mon Sep 17 00:00:00 2001 From: Nelson Castillo Date: Sat, 24 Oct 2009 03:04:40 -0500 Subject: Add s3c2410ts Add the ts and the relevant files. Signed-off-by: Nelson Castillo --- arch/arm/mach-s3c2410/include/mach/ts.h | 35 +++++++++++++++++++++++++++++++++ arch/arm/plat-s3c/include/plat/devs.h | 2 ++ arch/arm/plat-s3c24xx/devs.c | 20 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 arch/arm/mach-s3c2410/include/mach/ts.h (limited to 'arch/arm') diff --git a/arch/arm/mach-s3c2410/include/mach/ts.h b/arch/arm/mach-s3c2410/include/mach/ts.h new file mode 100644 index 00000000000..ffd73d5bda2 --- /dev/null +++ b/arch/arm/mach-s3c2410/include/mach/ts.h @@ -0,0 +1,35 @@ +/* arch/arm/mach-s3c2410/include/mach/ts.h + * + * Copyright (c) 2005 Arnaud Patard + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * + * Changelog: + * 24-Mar-2005 RTP Created file + * 03-Aug-2005 RTP Renamed to ts.h + */ + +#ifndef __ASM_ARM_TS_H +#define __ASM_ARM_TS_H + +#include <../drivers/input/touchscreen/ts_filter.h> + +struct s3c2410_ts_mach_info { + /* Touchscreen delay. */ + int delay; + /* Prescaler value. */ + int presc; + /* + * Null-terminated array of pointers to filter APIs and configurations + * we want to use. In the same order they will be applied. + */ + const struct ts_filter_chain_configuration *filter_config; +}; + +void set_s3c2410ts_info(const struct s3c2410_ts_mach_info *hard_s3c2410ts_info); + +#endif /* __ASM_ARM_TS_H */ diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h index 0f540ea1e99..50d50a2f086 100644 --- a/arch/arm/plat-s3c/include/plat/devs.h +++ b/arch/arm/plat-s3c/include/plat/devs.h @@ -53,6 +53,8 @@ extern struct platform_device s3c_device_nand; extern struct platform_device s3c_device_usbgadget; extern struct platform_device s3c_device_usb_hsotg; +extern struct platform_device s3c_device_ts; + /* s3c2440 specific devices */ #ifdef CONFIG_CPU_S3C2440 diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index f52a92ce8dd..9ef0e97d56e 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c @@ -30,6 +30,8 @@ #include #include +#include + #include #include @@ -182,6 +184,24 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) } } +/* Touchscreen */ + +struct platform_device s3c_device_ts = { + .name = "s3c2410-ts", + .id = -1, + .dev.parent = &s3c_device_adc.dev, +}; + +static struct s3c2410_ts_mach_info s3c2410ts_info; + +void set_s3c2410ts_info(const struct s3c2410_ts_mach_info *hard_s3c2410ts_info) +{ + memcpy(&s3c2410ts_info, hard_s3c2410ts_info, + sizeof(struct s3c2410_ts_mach_info)); + s3c_device_ts.dev.platform_data = &s3c2410ts_info; +} +EXPORT_SYMBOL(set_s3c2410ts_info); + /* USB Device (Gadget)*/ static struct resource s3c_usbgadget_resource[] = { -- cgit v1.2.3