ARM: S3C24XX: touchscreen device definition
Add definition for the touchscreen driver platform data and initial support for the H1940 machine. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This commit is contained in:
parent
c9f937e4a3
commit
b9bf770e0d
4 changed files with 41 additions and 0 deletions
21
arch/arm/mach-s3c2410/include/mach/ts.h
Normal file
21
arch/arm/mach-s3c2410/include/mach/ts.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/* linux/include/asm/arch-s3c2410/ts.h
|
||||||
|
*
|
||||||
|
* Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ASM_ARM_TS_H
|
||||||
|
#define __ASM_ARM_TS_H
|
||||||
|
|
||||||
|
struct s3c2410_ts_mach_info {
|
||||||
|
int delay;
|
||||||
|
int presc;
|
||||||
|
int oversampling_shift;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *);
|
||||||
|
|
||||||
|
#endif /* __ASM_ARM_TS_H */
|
|
@ -31,6 +31,7 @@ extern struct platform_device s3c64xx_device_iisv4;
|
||||||
extern struct platform_device s3c64xx_device_pcm0;
|
extern struct platform_device s3c64xx_device_pcm0;
|
||||||
extern struct platform_device s3c64xx_device_pcm1;
|
extern struct platform_device s3c64xx_device_pcm1;
|
||||||
|
|
||||||
|
extern struct platform_device s3c_device_ts;
|
||||||
extern struct platform_device s3c_device_fb;
|
extern struct platform_device s3c_device_fb;
|
||||||
extern struct platform_device s3c_device_usb;
|
extern struct platform_device s3c_device_usb;
|
||||||
extern struct platform_device s3c_device_lcd;
|
extern struct platform_device s3c_device_lcd;
|
||||||
|
|
|
@ -37,6 +37,8 @@
|
||||||
#include <plat/cpu.h>
|
#include <plat/cpu.h>
|
||||||
#include <plat/regs-spi.h>
|
#include <plat/regs-spi.h>
|
||||||
|
|
||||||
|
#include <mach/ts.h>
|
||||||
|
|
||||||
/* Serial port registrations */
|
/* Serial port registrations */
|
||||||
|
|
||||||
static struct resource s3c2410_uart0_resource[] = {
|
static struct resource s3c2410_uart0_resource[] = {
|
||||||
|
@ -182,6 +184,22 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Touchscreen */
|
||||||
|
struct platform_device s3c_device_ts = {
|
||||||
|
.name = "s3c2410-ts",
|
||||||
|
.id = -1,
|
||||||
|
};
|
||||||
|
EXPORT_SYMBOL(s3c_device_ts);
|
||||||
|
|
||||||
|
static struct s3c2410_ts_mach_info s3c2410ts_info;
|
||||||
|
|
||||||
|
void __init s3c24xx_ts_set_platdata(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(s3c24xx_ts_set_platdata);
|
||||||
|
|
||||||
/* USB Device (Gadget)*/
|
/* USB Device (Gadget)*/
|
||||||
|
|
||||||
static struct resource s3c_usbgadget_resource[] = {
|
static struct resource s3c_usbgadget_resource[] = {
|
||||||
|
|
|
@ -70,6 +70,7 @@ void __init s3c244x_map_io(void)
|
||||||
s3c_device_sdi.name = "s3c2440-sdi";
|
s3c_device_sdi.name = "s3c2440-sdi";
|
||||||
s3c_device_i2c0.name = "s3c2440-i2c";
|
s3c_device_i2c0.name = "s3c2440-i2c";
|
||||||
s3c_device_nand.name = "s3c2440-nand";
|
s3c_device_nand.name = "s3c2440-nand";
|
||||||
|
s3c_device_ts.name = "s3c2440-ts";
|
||||||
s3c_device_usbgadget.name = "s3c2440-usbgadget";
|
s3c_device_usbgadget.name = "s3c2440-usbgadget";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue