[i2c] "regd i2c-viapro bus driver"
savitha_j at yahoo.com
Sun Oct 8 14:54:06 CEST 2006
After reading your suggestions, i thought it is better
to explain you my requirement, than asking vague
My typical setup is like below
PCI Bus I2C/SMBus
cpu <------------> Vt8251<------------>i2C Device-X
PCI driver(i2c-viapro) i2c driver(need to write)
Coming from bottom up, the i2c Device-X will interrupt
the VT 8251 whenever the data is raady. The i2c Device
driver which needs to be developed by me, is required
to handle this interrupt and read the i2c device-X
data and some how i need to pass it to application
layer(user mode). In the application layer, based on
the data read from the device-X, i need to call
Initially i read the i2c docs realted to i2c driver
stack and found the details. After that, i started
making each driver work from top. I understand that
the i2c-viapro is the bus driver which sits on the top
of stack. I started making it work with your
guidelines and suggesttions. Now i need to write the
i2c Device-X driver for my device. This is where i
came across my questions like how to handle interrupts
from i2c device etc. Now after reading your comments,
it looks like interrupt handling is not supported in
i2c protocol!. With the above information, i would
like to know
1. Is it possible to handle the I2C device in
interrupt mode? IF yes what all need to be
modified/developed to support this?
2.How do i read the i2c Device using Polling mode?
3.Can i pass the data read from the Device-X (using
i2c Device-X driver) directly to application layer or
in other words, can the application layer(user mode)
read the data directly from the Device X driver?.
Please give your valuable advice.
Thanks in advance
--- Jean Delvare <khali at linux-fr.org> wrote:
> Hi Savitha,
> > I saw the patch in the following link. It looks
> > very minimal changes to i2c-viapro.c.
> > how do i check if the i2c-viapro works for VT 8251
> > after applying patch?
> After loading i2c-viapro and i2c-dev, "i2cdetect -l"
> should list an
> entry for the VIA south bridge.
> i2c-0 unknown SMBus Via Pro adapter at
> 5000 Algorithm unavailable
> > Secondly if i am interfacing a i2c device to VT
> > southbridge, which ports of VT 8251 are used to
> > communicate with the i2c device?
> You don't really care. The implementation details
> belong to the
> i2c-viapro driver. The ports used are
> "i2cdetect -l" will tell you, but this is for
> information only, again
> you don't need to know. What you really care about
> is the i2c bus
> number (which again "i2cdetect -l" will give you.)
> > and also, If the i2c device generates interrupts
> to VT
> > 8251, how it should be handled?
> That's a complex question. First of all, the I2C
> protocol has no
> provision for interrupts. The SMBus protocol does,
> in a form known as
> "SMBus Alert". However, not all motherboards are
> wired to support it,
> and more importantly, the Linux i2c-core doesn't
> support it at the
> moment, and the i2c-viapro driver (and others) would
> need to be
> converted from poll-based to interrupt-driven to use
> it if it were.
> It's a long way to go.
> Jean Delvare
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the i2c