Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

UM0851 Datasheet(PDF) 82 Page - STMicroelectronics

Part # UM0851
Description  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 Datasheet(HTML) 82 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 78Page - STMicroelectronics UM0851 Datasheet HTML 79Page - STMicroelectronics UM0851 Datasheet HTML 80Page - STMicroelectronics UM0851 Datasheet HTML 81Page - STMicroelectronics UM0851 Datasheet HTML 82Page - STMicroelectronics UM0851 Datasheet HTML 83Page - STMicroelectronics UM0851 Datasheet HTML 84Page - STMicroelectronics UM0851 Datasheet HTML 85Page - STMicroelectronics UM0851 Datasheet HTML 86Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 82 / 245 page
background image
Communication device drivers
UM0851
82/245
Doc ID 16604 Rev 2
Attaching an adapter
After the registration of the I2C chip driver, when an I2C bus driver is loaded, the
attach_adapter() function callback is called. This function checks if any I2C devices are on
the I2C bus to which the client driver wants to attach.
static int eeprom_attach_adapter(struct i2c_adapter *adapter)
{
return i2c_probe(adapter, &addr_data, eeprom_detect);
}
The i2c_probe() function probes the I2C adapter, looking for the different addresses
specified in the struct addr_data. If a device is found, the eeprom_detect() function is called.
The addr_data macro is defined in the include/linux/i2c.h file. It sets up a static variable
called addr_data based on the number of different types of chips that this driver supports
and the addresses at which these chips typically are present. It then provides the ability to
override these values by using module parameters.
static struct i2c_client_address_data addr_data = {
.normal_i2c = normal_i2c,
.probe
= probe,
.ignore
= ignore,
.forces
= forces,
}
/*
normal_i2c:
An I2C chip driver provide the variables normal_i2c. It is an
array of addresses, all terminated by special value
I2C_CLIENT_END. Usually a specific type of I2C chip shows up
in only a limited range of addresses. The eeprom.c driver
defines these variables as static unsigned short normal_i2c[]
= { 0x50, 0x51, 0x52, 0x53, 0x54,0x55, 0x56, 0x57,
I2C_CLIENT_END }
The normal_i2c_range variable specifies that we can find this
chip device at any I2C address.
Probe:
A list of pairs. The first value is a bus number (adapter
id), the second is the I2C address. These addresses are also
probed, as if they were in the 'normal' list.
The i2c_probe function will call the eeprom_detect function
only for those i2c addresses and the adapter id that actually
have a device on them (unless a `force' parameter was used).
Ignore:
List of adapter, address pairs not to scan. These addresses
are Never probed.
Forces:
Contains list of valid address along with there adapter id.
The first value is a bus number (adapter id), the second is
the I2C address. A device is blindly assumed to be on the
given address, no probing is done. */
Chip detection
In the chip driver, when an I2C chip device is found, the function chip_detect() is called by
the I2C core. This function is declared with the following parameters:
static int eeprom_detect(struct i2c_adapter *adapter, int address, int kind);
The adapter variable is the I2C adapter structure on which this chip is located. The address
variable contains the address where the chip was found, and the kind variable indicates
what kind of chip was found.
Note:
The kind variable usually is ignored, but some I2C chip drivers support different kinds of I2C
chips, so this variable can be used to determine the type of chip present.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com