[Drive] touch screen TP

Detailed 9.6_7.linux kernel subsystem I2C 1_2
5.9.6.1, overview summary I2C bus
(1) three communication lines: the SCL, the SDA, the GND
(2) synchronous, serial, level, low-speed, short distance
(3) Bus structure, a plurality of support devices are attached to the same bus
(4) master-slave configuration, the two sides have a main communication (master) from a (Slave), the master device to grasp the initiative each communication
from device rhythm master responds with a passive device. Each has a unique address (slave address) from a device in the bus,
the master device from the device (broadcast nature) by finding the address from its own to be communicated.
(5) I2C main purpose is communication between the main advantage of the maximum SoC and peripheral devices can be extended to support a plurality of peripheral devices on the bus.
Various things common sensor chip (e.g. Gsensor, temperature, humidity, light intensity, pH, smoke concentration, pressure, etc.)
are using the I2C interface and the main SoC connected.
A plurality (6) of the pin chips constituting the capacitive touch screen two interfaces. An interface is I2C responsible and the main SoC connection (itself as a slave device),
the main SoC report information touch event (touch coordinates, etc.) through the interface to initialize and control the capacitive touch screen, chip through the interface to the SoC
, we use capacitance touch screen focus is on this interface; the other is a capacitive touch pad interface to the management interface,
capacitive touch screen touchpad hardware chip to control via the interface. The interface is a capacitive touch screen company concerned,
their touch screen chip internal firmware programming to deal with this part, we use capacitive touch screen of people do not care here.

Description: Main SoC by our main SOC through the interface initialization and control a capacitive touch screen chips, touch screen capacitive chips are not a power-on can be used, which itself requires
initialization, within a series of registers, the master chip give each register set a correct value, then the capacitive touch screen to work.
Chip touch event report information (touch coordinates) to the SoC through the interface, the coordinate / pressing time / pressure and the like.
Capacitive screen users, does not itself manufacture of capacitive touch screen, do we just use their products, users are generally concerned only with
I2C interface, I2C interface is a communication interface between our TP chip and main chip, so we only care about this, and only
concerned to this level, we do not care about the down layer.
Then the lower is another interface, ie the capacitive touchpad management interface that we capacitive touch screen IC
through this interface management capacitive touch (capacitive touch screen hardware), the interface is a capacitive touch screen company concerned.
Firmware, i.e. integrated into the MCU / CPU inside the code, the microcontroller program is essentially a limited complexity.

5.9.6.2, I2C driver framework overview linux kernel
(1) The main objective of I2C driver framework is: Let driven developers can easily add your own I2C device driver in the kernel,
which can more easily driven in linux own I2C interface hardware
(2) I2C source code associated drivers are located: at drivers / i2c directory. linux system offers two I2C driver implementations: the first called I2C
-dev, the corresponding drivers / i2c / i2c-dev.c, but this method encapsulates the host (I2C master,
usually built I2C controller SoC) the basic I2C operations, and provides a corresponding user interface, the application layer to the
application layer of code required to implement their control and operation of the slave,
so this is equivalent to only I2C driver interface may provide access to the application layer of the slave hardware device itself did not do anything for hardware,
applications need to implement the operation of the hardware, so the application must be written by the hardware is well aware,
in fact, equivalent to the traditional drive in dry threw application to do the job, so this I2C driver also known as "application layer drive,"
in this way is not mainstream, it is to the advantage of differentiation are placed in the application, so that equipment is relatively tough (especially non-standard I2C slave when
not to move while driving), but only need to modify the application can be achieved for driving various devices. This layer is very simple drive in the drive (dev-that is, the I2C
.c) we would not analyzed.
(3) The second I2C driver is driving in all the code layer, it directly provides the end result to the application layer.
The application layer even need to know that there exists I2C, such as a capacitive touch screen driver, directly provided to the application layer / dev / input /
event1 operator interface, the application layer programming people do not know event1 involved in the I2C. This is the focus of our subsequent analysis.


Description: linux kernel is implemented as part of the drive, and then let the engineers implemented as part of the drive, add up to an overall framework that it drives.

Differences of I2C devices, the main list is not the same in the register of the device itself, how to initialize the register is not the same. The overall mode of operation is very similar.

Guess you like

Origin www.cnblogs.com/xiaohujian/p/12199337.html