Skip to contentSkip to conversation

how to use the struct : i2c_client_address_data

lm-sensors herb 2 participants 2 messages Dec 24, 2005 – Dec 27, 2005

lore
Share & tools
lore

herb

author
#0 lore raw

Hello everyone:

I'm writing a driver for a chip named tvp5150a on at51rm9200 platform.

I tried to understand the architecture of i2c driver for linux,
but there're some points that I couldnt understand.

I think the struct i2c_client_address_data is used to probe
a chip attached to the i2c bus, but I can't see how to set it
properly. I've checked others drivers such as msp3400.c,
ds1307.c, saa5249.c, i2c.h, i2c-dev.h, i2c-core.c, and the documents
for i2c in src/Documentation/i2c, but I didnt find any information useful.

I guess it may work by simply setting the fields of
i2c_client_address_data with "I2C_CLIENT_END", but I dont kno why it works!

Can somebody tell me the exact meanning of the fields in
i2c_client_address_data? And how should I set them?

Any reply will be appreciate. Thanks.

regards.

herb

#1 lore raw

Hi.

Quoted 3 lines · herb

I think the struct i2c_client_address_data is used to probe
a chip attached to the i2c bus, but I can't see how to set it properly.

I'm new to i2c, so take everything I say with a grain of salt.

Maybe having a look at how the probing is done with entries of this struct helps to understand how it works. For example i2c_probe() in drivers/i2c/i2c-core.c. In addition, the comments in include/linux/i2c.h might add to the picture.

Hth.

Bye, Mike