2009-08-07 12:08:41 I2C_FUNC_SMBUS_I2C_BLOCK_2 query
Harbhajan Singh (INDIA)
Message: 78523
Hi,
I am trying to use the i2c blackfin twi driver for configuring the device interfaced to the bf52x chip.
I am trying to read the data configured and verify them.
I checked the smbus protocol document. the required read format exactly matches as below details.
I2C Block Read (2 Comm bytes)
=============================
This command reads a block of bytes from a device, from a
designated register that is specified through the two Comm bytes.
S Addr Wr [A] Comm1 [A] Comm2 [A]
S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P
I2C_FUNC_SMBUS_*I2C_BLOCK_2 APIs are needed for this, but when i check the functionality it says it is not supported.
"Oops, the needed functionality (I2C_FUNC_SMBUS_I2C_BLOCK_2) is not available!"
how i achieve this functionality. is there any other api available. any test application available similar to it will be really helpful.
Thank you.
.
QuoteReplyEditDelete
2009-08-07 13:11:06 Re: I2C_FUNC_SMBUS_I2C_BLOCK_2 query
Robin Getz (UNITED STATES)
Message: 78524
Harbhajan:
What version of software are you using?
-Robin
QuoteReplyEditDelete
2009-08-08 01:29:26 Re: I2C_FUNC_SMBUS_I2C_BLOCK_2 query
Harbhajan Singh (INDIA)
Message: 78529
Hi Robin,
I am working with 2009 R1-RC1 distribution.
Thank you.
QuoteReplyEditDelete
2009-08-08 12:19:44 Re: I2C_FUNC_SMBUS_I2C_BLOCK_2 query
Harbhajan Singh (INDIA)
Message: 78536
Dear Robin,
Could you please tell me is there any api which suits to my requirement for reading the data.
Thank you.
QuoteReplyEditDelete
2009-08-10 10:42:45 Re: I2C_FUNC_SMBUS_I2C_BLOCK_2 query
Robin Getz (UNITED STATES)
Message: 78567
Harbhajan:
I thought that should have everything you need.
static u32 bfin_twi_functionality(struct i2c_adapter *adap)
{
return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
I2C_FUNC_SMBUS_BLOCK_DATA | I2C_FUNC_SMBUS_PROC_CALL |
I2C_FUNC_I2C | I2C_FUNC_SMBUS_I2C_BLOCK;
}
-Robin
QuoteReplyEditDelete
2009-08-10 11:25:03 Re: I2C_FUNC_SMBUS_I2C_BLOCK_2 query
Harbhajan Singh (INDIA)
Message: 78571
Hi Robin,
Yes robin, i saw this in twi driver file but when i check whether i can use this function using the below ioctl call.
it says it is not available.
if (! (funcs & I2C_FUNC_SMBUS_I2C_BLOCK)) {
i2c_debug(" Oops, the needed functionality (I2C_FUNC_SMBUS_I2C_BLOCK) is not available! \\n");
}
if (! (funcs & I2C_FUNC_SMBUS_I2C_BLOCK_2)) {
i2c_debug(" Oops, the needed functionality (I2C_FUNC_SMBUS_I2C_BLOCK_2) is not available! \\n");
}
Please suggest.
Thank you.
QuoteReplyEditDelete
2009-08-10 13:35:53 Re: I2C_FUNC_SMBUS_I2C_BLOCK_2 query
Robin Getz (UNITED STATES)
Message: 78575
Harbhajan:
Where are you looking?
Freetext search: I2C_FUNC_SMBUS_I2C_BLOCK_2 (0 estimated hits)
in trunk, and in the 2009 release.
-Robin