linux-2.6.32 porting I2C-EEPROM driver on mini2440 development board

Publisher:和谐相伴Latest update time:2024-07-09 Source: elecfansKeywords:linux-2  6 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Configure I2C driver in the kernel
Linux-2.6.32.2 provides a complete driver for the I2C interface of S2C2440, so we only need to configure it in the kernel to use it.
Execute: make menuconfig in the kernel source code directory to enter the kernel configuration main menu, and select the following submenus in sequence:
Device Drivers --->
<*> I2C support --->
I2C Hardware Bus support --->
As shown in the figure, we can see that "<*> S3C2410 I2C Driver" has been selected here. The S3C2410 here can also be applied to S3C2440 because their I2C port and register definitions are exactly the same.

The driver source code corresponding to the above configuration is: linux-2.6.32.2/drivers/i2c/busses/i2c-s3c2410.c



2 Test I2C-EEPROM

Mini2440 In order to facilitate user testing, an EEPROM chip is mounted based on the I2C bus, which is AT24C08. By writing and reading this chip, we can test the I2C bus driver. Execute: make zImage in the kernel root directory, burn the generated new kernel into the development board, and still use the root_qtopoia provided by Friendly Arm, because it already contains the I2C-EEPROM test program



Enter in the command line: i2c –w to write data to the 24C08 device of the board (0x00-0xff)


Type in the command line: i2c –r to read the output from the 24C08 device on the board


Keywords:linux-2  6 Reference address:linux-2.6.32 porting I2C-EEPROM driver on mini2440 development board

Previous article:Linux-2.6.32 ported to mini2440 development board Ported UDA1341 audio driver
Next article:S3C2440 spi driver simple test

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号