I2C driver for a video enhancement Chip

Source: Internet
Author: User

A cssp specification-visual enhancement engine chip produced by quick logic is used to enhance the image data output to the Panel. Schematic:

Generally, you only need to add an I2C device and write it to the register group during initialization. Linux I2C architecture:
I2C core i2c-core.c: Provides I2C bus drivers and device drivers registration, logout methods and I2C communication methods. The code at the underlying layer, irrelevant to the specific adapter, as well as the probe device and detection device address code.
I2C bus driver: adapter implementation in I2C hardware architecture, mainly including I2C adapter Data Structure i2c_adapter, I2C adapter algorithm Data Structure i2c_algorithm, etc.
I2C Device Driver: The implementation of the device in the I2C hardware architecture. the device is generally attached to the I2C adapter controlled by the CPU and exchanged data with the CPU through the I2C adapter. It mainly includes the data structure i2c_driver and i2c_client.

1. Complete an I2C driver struct:

Static struct i2c_driver ql_vee_driver =
{
. Driver = {
. Name = "ql_vee ",
. Owner = this_module,
},
. Probe = ql_vee_probe,
. Remove = ql_vee_remove,
. Id_table = ql_vee_id,
};

Complete the corresponding exploration and deletion functions.

2. In the added Vee file, add the output symbol:
Module_init (ql_vee_init );
Module_exit (ql_vee_exit );

The two functions complete i2c_add_driver (& ql_vee_driver) and i2c_del_driver (& ql_vee_driver) respectively ).

3, in $ kernel/ARCH/ARM/mach-s3c6410/mach-smdk6410.c

Static struct i2c_board_info i2c_devs0 [] _ initdata =
{
{I2c_board_info ("axp18x", 0x16 ),},
{I2c_board_info ("ql_vee", 0x19 ),},
{I2c_board_info ("24c08", 0x50 ),},
/* {I2c_board_info ("wm8580", 0x1b ),},*/
};
Add the newly registered I2C device address. Note that the actual access address is one place to the right of the above value.

4. Modify the makefile and kconfig files.
Add in makefile:

OBJ-$ (config_ql_vee) + = ql_vee.o

Add:

Config ql_vee
Tristate "QL visual enhancement engine (vee )"
Default y
Depends on I2C & experimental
Help
QL visual enhancement engine (vee) V1.0 with I2C-Compatible interface and 24-bit RGB support rev.

 

 

 

 

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.