Reply by drasko August 9, 20062006-08-09
Hi all.
After reaging the docs, I am still a bit confused about terminology
used by lm-sensors team.
I have to implement i2c driver for my specific hardware, that is based
on ARM926EJ and AMBA bus. As I can see, there is not support for I2C
interface that sits on AMBA bus (APB part of AMBA) adn is on the othae
side connected to peripherals via I2C bus. So, that interface, called
ApI2c, is bridge between I2C and AMBA bus. I have to write driver to
describe it, so I am confused what files to look.

1) Is this what I described an "adapter" (in i2c terminology)?

2) Where should new .c file which I am suppose to write be put - in
"busses" folder? What sits in "busses" folder - only these "bridges"
between the internal data bus and I2C bus? Am I right?

3) These "bridges" are not devices in strict sense. The devices are
peripherals connected to I2C bus that goes out (or in) these bridges.
Supposably I want to write "chip" part sometime later when I decide
what peripheral I'll put on I2C. Is there a way to see, WITHOUT "chip"
part of driver, if I correctly wrote "bridge" (ApI2c) part of driver,
thus enabling future I2C support on my board. Do I have to load some
modules to test this? Under what directory in Linux will this "bridge"
be seen? Are there some userspace tools to send some messages to that
"bridge" and receive messages from it?

4) What about "algo" folder. What are this algorithms? Does not one
describe the functionality of such a bridge within "busses" folder? Do
I need some file in "algo" folder (preferably not). If not, do I have
to implemant some algorithm within my "bridge" file, which will sit in
"busses" directory? What are these algorithms exactly, when we have
protocol described in i2c-core file?

5) Do I have to change arch/arm/<mach-myboard>/core.c file to note
somehow that this ApI2c "bridge" is amba_device?