Mailing List archive

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

[linux-dvb] Re: CX88 i2c issue w/ DVB tuners



Kenneth Aafløy wrote:
On Sunday 12 September 2004 16:07, Holger Waechtler wrote:

Kenneth Aafløy wrote:

On Sunday 12 September 2004 14:03, Holger Waechtler wrote:


Remember: i2c is a trivial protocol: two wires only and ususally controlled by 3-8 registers on the host controller. Really nothing to write tens of thousands of lines of code around it.

I'm wondering where you see those tens-of-thousands of lines, as the
i2c-core.c is about 1300 lines (including whitespace), of which
the smbus is around half. The object without any debugging compiled
for a athlon with smbus is around 26k, hardly a lot for a embedded device,
hmm?
everly little helps:
<snip>

 17394 total

Does the dvb adapter/frontend drivers _really_ depend on all that?
Do you _really_ include all those drivers in a embedded kernel compile?

If so you'r _really_ including a lot of completly unrelated code.
Following the mainstream ideas you need a i2c_algo, an i2c_bus, the driver implementations and the include files. Collect these and you get easily well over 2000 lines, take e.g. the favourite saa7146 as example. Maybe you can get better-looking combinations by cheating, but the average case is useless complicated.

Our in-house i2c_read/write() implementations rarely take more than 100-400 lines of code including everything you need.

Holger




Home | Main Index | Thread Index