Skip to contentSkip to conversation

Driving non-smbus i2c chip given I2C_FUNC_SMBUS_EMUL adapter driv

DISCUSSION Geoff Goldberg 2 participants 3 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

Greetings,

I read through the docs and FAQ and some driver code but could not determine how to communicate with my i2c chip from my chip driver.

I'm working with an embedded system that has the following:

* i2c adapter
* i2c device (not indicated to be smbus-compatible in the data sheet)
* i2c-algo-<arch>.o
* i2c-adap-<arch>.o

and I need to create chip drivers for the non-smbus i2c device.

Also given:

* the existing bus driver functionality doesn't include I2C_FUNC_I2C
(only I2C_FUNC_SMBUS_EMUL and a couple of other flags)
* In the adapter algo driver, master_xfer is implemented, smbus_xfer
is NULL

My question is this:

Can my chip driver reliably use i2c calls (i2c_master_send, i2c_master_receive, etc)? Can it reliably use i2c_smbus_xxx() calls?

Hopefully these are not overly stupid questions. Thanks very much in advance for your time.

- geoff

#1 lore raw

Driving non-smbus i2c chip given I2C_FUNC_SMBUS_EMUL adapter

Quoted 22 lines · Geoff Goldberg

Greetings,

I read through the docs and FAQ and some driver code but could not determine how to communicate with my i2c chip from my chip driver.

I'm working with an embedded system that has the following:

*       i2c adapter
*       i2c device (not indicated to be smbus-compatible in the data sheet)
*       i2c-algo-<arch>.o
*       i2c-adap-<arch>.o

and I need to create chip drivers for the non-smbus i2c device.

Also given:

* the existing bus driver functionality doesn't include I2C_FUNC_I2C
(only I2C_FUNC_SMBUS_EMUL and a couple of other flags)
* In the adapter algo driver, master_xfer is implemented, smbus_xfer
is NULL

Quoted 4 lines

My question is this:

Can my chip driver reliably use i2c calls (i2c_master_send, i2c_master_receive, etc)?

no

Quoted 1 line

Can it reliably use i2c_smbus_xxx() calls?

yes, subject to the capabilities of the i2c device.

#2 lore raw

Driving non-smbus i2c chip given I2C_FUNC_SMBUS_EMUL adapter

In reply to Geoff Goldberg

Thanks for the info Mark

- geoff

-----Original Message-----
From: Mark Studebaker [mailto:[email protected]]
Sent: Thursday, October 02, 2003 4:33 PM
To: Geoff Goldberg
Cc: '[email protected]'
Subject: Re: Driving non-smbus i2c chip given I2C_FUNC_SMBUS_EMUL adapter driver

Quoted 4 lines · Geoff Goldberg

Greetings,

I read through the docs and FAQ and some driver code but could not

determine

Quoted 6 lines

how to communicate with my i2c chip from my chip driver.

I'm working with an embedded system that has the following:

* i2c adapter
* i2c device (not indicated to be smbus-compatible in the data

sheet)

Quoted 12 lines

* i2c-algo-<arch>.o
* i2c-adap-<arch>.o

and I need to create chip drivers for the non-smbus i2c device.

Also given:

* the existing bus driver functionality doesn't include I2C_FUNC_I2C
(only I2C_FUNC_SMBUS_EMUL and a couple of other flags)
* In the adapter algo driver, master_xfer is implemented, smbus_xfer
is NULL

Quoted 4 lines

My question is this:

Can my chip driver reliably use i2c calls (i2c_master_send, i2c_master_receive, etc)?

no

Quoted 1 line

Can it reliably use i2c_smbus_xxx() calls?

yes, subject to the capabilities of the i2c device.