This document describes how to develop an I2C interface touch screen driver mounted on the friendly mini-2440 platform.
Kernel edition linux-2.6.32.2,The platform is a touch screen with the arm9-s3c2440 + I2C interface.
For exampleLinux I2C driver architectureDescription
I. Overview
Speaking of writing I2C drivers in Linux, there are currently two main methods: one is to treat I2C devices as a common character device, the other is to use the Linux I2C driver architecture. The two drivers are compared below.
The advantages of the first method
1. Overview
2. Data Structure
3. Adapter
4. I2c-core
5. Slave Device
1. Overview
1.1 Definition I2C inter-integrated circuit SMBUS System Management Bus, the I2C subset
1.2 Characteristics The amount of data exchanged is small. The required data transfer rate is low.
1.3 Speed Fast speed Kbps Full speed Kbps
1.4 Topol
My philosophy: Simple and practical can be, do not engage in a pile of source code out, the results show people do not know how to use, Look at me:
1, in arch/arm/mach-xxx/own platform file to add I2C information, beauty its name Yue: i2c_board_info
For example:
static struct I2c_board_info __initdata xxxi2c_board_info[] = {{I2c_board_info ("Abcd1", 0x20),/* string to match the back, 0x20 from the device a
Seven: I2C Dev node operation now to analyze the above structural diagram of the i2c-dev.c in part. this section provides an adapter operation interface for the user space. this part of the code is actually a module. its initialization function is: module_init (i2c_dev_init); The i2c_dev_init () code is as follows: static int _ init i2c_dev_init (void) {int res; printk (kern_info "
need to use I2c_new_device (). Its prototype is: struct i2c_client *I2c_new_device (struct i2c_adapter *adap, struct i2c_board_info const *info); This function will use the information provided by info to create a i2c_client and bind to the i2c_adapter that the first parameter points to. The returned parameter is a i2c_client pointer. The driver can communicate directly with the device using the i2c_client
I was writing a driver some time ago. It is an I2C bus device. so here we will briefly talk about some simple experiences about I2C device drivers. I believe there are many such articles on the Internet. let me add some bricks.
Start to get started.
I will not introduce the
I. Summary
Bma220 gravity sensor driver involves three files: bma220.c bma220.h bma220_driver.c. Bma220.c is an API that contains the bma220 driver. bma220.h contains the bma220 Register address, and bma220_driver.c is the I2C device driver of bma220. Here we will analyze an
6. After the registration of the adapter and I2C driver for other extensions, it seems that the entire architecture is similar. There are many other extensions. let's take an example of legacy, which is randomly searched in the kernel: In the linux-2.6.26.3/Drivers/hwmon/ad7418.c, the initialization function is: static int _ init ad7418_init (void) {return i2c_add_driver ( ad7418_driver);} The i2c_driver ad
Linux under the I2C-driven loading process, divided into I2C equipment layer, I2C adapter layer and I2C core layer
The I2C device driver layer is the drive we write for a particular
I2C ok6410 I2C driver analysis-user-mode driver, linuxok6410i2c3 i2c-dev
3.1 Overview
Previously speaking about the I2C subsystem, I mentioned using i2c-dev.c files to implement our
Original article: Documentation/I2C/upgrading-clientsTranslator: Guo shaobei2010/05/10
Update I2C drivers to the new 2.6 Driver Model========================================================== ==========
Note: the I2C driver here refers to the
Linux using IIC Bus Read and write I2C from device registers by Handavei @ Jilin Normal University handawei@jusontech.com reproduced please be sure to indicate the source ******************* *******
2012.7.16 1, this paper gives the implementation program of I2C from device using IIC bus under Linux.
2, this paper give
I recently studied the Bluetooth keyboard and mouse, so I took a rough look at the Linux HID framework.HID Bus
The HID bus is initialized in the hid-init of the hid-core.c:
Bus_register ( hid_bus_type );
Definition of hid_bus_type:
Static struct bus_type hid_bus_type = {
. Name = "
Probe Method of I2C driver framework, i2c framework probe
The Linux-based I2C driver adopts the probe method. The Linux driver for any device supporting
file: 3) Croot to the android source code root directory: Make -After J8 is complete, find the command in the out directory to find ...... The results are as follows: OK; finally ------------------------ Summary: Recently, we have been porting the touch screen driver under Android (4.1) and have been exposed to several touch screens. In general, either the touch screen when the standard HID
Failure phenomenon:
Umdf HID MiniDriver Device unknown device appears in Device Manager under Windows 8 system, as shown in figure:
Reason Analysis:
Umdf is the User-mode Driver framework (user-mode driver architecture,
This time I will study the Code with the I2C driver in the kernel. Before going into the code, I will first briefly understand the relationship between the I2C core data structure. From this, we may be able to have a better understanding of the driver code. The design of the software data structure and the relationship
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.