Fwd: doubts about I2C driver.....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




 If you want the link for reference from where I have read the driver
it is
http://www.linuxjournal.com/article/7136
Thanks
Akshay
---------- Forwarded message ----------
From: Akshay Pujari <akshayarwind@xxxxxxxxx>
Date: Wed, Mar 25, 2009 at 6:31 PM
Subject: doubts about I2C driver.....
To: kernelnewbies@xxxxxxxxxxxx


Hi
I have read an article on www.linuxjournal.com on i2c driver.I have a question on that.
The article defines
static struct i2c_algorithm tiny_algorithm = {
    .name           = "tiny algorithm",
    .id             = I2C_ALGO_SMBUS,
    .smbus_xfer     = tiny_access,
    .functionality  = tiny_func,
};
and also
static u32 tiny_func(struct i2c_adapter *adapter)
{
    return I2C_FUNC_SMBUS_QUICK |
           I2C_FUNC_SMBUS_BYTE |
           I2C_FUNC_SMBUS_BYTE_DATA |
           I2C_FUNC_SMBUS_WORD_DATA |
           I2C_FUNC_SMBUS_BLOCK_DATA;
}

what do the macros  I2C_FUNC_SMBUS_QUICK ,I2C_FUNC_SMBUS_BYTE etc mean?Do they mean in what form data is sent
,eg I2C_FUNC_SMBUS_QUICK means quick data transfer and I2C_FUNC_SMBUS_BYTE means data transfer in units of bytes ?
Am I right?

My question is : On basis is it decided in which type of message a particular driver will support,what values should be returned by tiny_func function ? does it depend on hardware configuration?

Request you to clear my doubt.I will be very grateful
 
Thanks and Regards
Akshay Arwind Pujari




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux