Create a new file s3c2410_ts.c in the linux2.6.14/drivers/input/touchscreen directory. We can refer to similar touch screen drivers for driver files. For specific content, please refer to the source code provided on the website or CD.
First: modify the makefile file in the linux2.6.14/drivers/input/touchscreen directory and add the following to the end of the file:
obj-$(CONFIG_TOUCHSCREEN_S3C2410) += hfrk_s3c2410_ts.o
Second: Add in linux2.6.14/ drivers/input/touchscreen/Kconfig:
config TOUCHSCREEN_S
tristate "Samsung S3C2410 touchscreen input driver"
depends on ARCH_SMDK2410 && INPUT && INPUT_TOUCHSCREEN
select SERIO
help
Say Y here if you have the s3c2410 touchscreen.
If unsure, say N.
To compile this driver as a module, choose M here: the
module will be called s3c2410_ts.
config TOUCHSCREEN_S3C2410_DEBUG
boolean "Samsung S3C2410 touchscreen debug messages"
depends on TOUCHSCREEN_S3C2410
help
Select this if you want debug messages
Configure the kernel and select these configurations
Device drivers - to
Input device support at
Touchscreens at
<*>Samsung S3C2410 touchscreen input driver
[]Samsung s3c2410 touchscreen debug message
Third: Add the following content to /linux-2.6.14/arch/arm/mach-s3c2410/mach-smdk2410.c:
static struct s3c2410_ts_mach_info sbc2410_ts_cfg __initdata = {
.delay = 10000,
.almost = 49,
.oversampling_shift = 2,
};
In the smdk2410_devices structure, add:
&s3c_device_ts,
Add in smdk2410_map_io function:
set_s3c2410ts_info(&sbc2410_ts_cfg);
Fourth: Add in the /linux-2.6.14/arch/arm/mach-s3c2410/devs.h file:
extern struct platform_device s3c_device_ts;
Fifth: Add the following lines to the arch/arm/mach-s3c2410/devs.c file:
/* Touchscreen */
static struct s3c2410_ts_mach_info s3c2410ts_info;
void __init set_s3c2410ts_info(struct s3c2410_ts_mach_info *hard_s3c2410ts_info)
{
memcpy(&s3c2410ts_info,hard_s3c2410ts_info,sizeof(struct s3c2410_ts_mach_info));
}
EXPORT_SYMBOL(set_s3c2410ts_info);
struct platform_device s3c_device_ts = {
.name = "s3c2410-ts",
.id = -1,
.dev = {
.platform_data = &s3c2410ts_info,
}
};
EXPORT_SYMBOL(s3c_device_ts);
Compile the touch screen driver and register it in the kernel as /dev/input/mouse0
Previous article:2.6.26.5 kernel porting based on s3c2410 development board
Next article:The whole process of porting Linux2.4.18 core to s3c2410
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Keysight Technologies recently collaborated with Nanyang Technological University, Singapore, to develop hybrid vehicle networking communication technology, and the forecast is promising.
- Principle Analysis of Temperature Acquisition System Designed by Temperature Sensor MAX6613
- iTOP-iMX6ULL development board-Using UVC camera under Qt5
- How to achieve high-performance mobile phone design? The mobile phone college evaluation seminar will reveal the answer for you!
- When checking the PCB using Altium Designer, I found that the signal line is segmented. What's going on?
- Just to meet you, Fuchang Electronics WeChat recruitment is now online
- Begging
- EEWORLD University ---- FPGA design and FPGA application based on Verilog HDL (Intel official tutorial)
- Showing off the goods + the first wave of development boards
- RF Circuit Engineering Design