Mailing List archive

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

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



Andrew de Quincey wrote:
On Sunday 12 Sep 2004 15:29, Holger Waechtler wrote:

Andrew de Quincey wrote:

Not registering to the i2c core and calling the i2c read/write functions
directly solves this. You just need to check that the card mutex is hold
by the read/write functions.
So you're suggesting using the i2c_adapter structure, but not registering
it with the kernel? Gah, I wish I'd understood thats what you meant two
days ago!
Will this not cause problems with devices like the cx88 though - cards
using it can have other non-DVB i2c drivers which are registered with the
kernel i2c. I doubt they will work particularly well if they were given
an "unofficial" i2c_adapter.
why?


In that case, it would have to be registered,
why?

It sounds bad to me from a modularity point of view - we become enmeshed in the guts of the kernel i2c core. Although linux is OSS, I don't like bypassing the "standard" APIs and hacking about in internal structures unless there is a necessity. By adding the flags I suggest to the i2c core for disabling autoprobing, we can use the standard APIs.

Anyway, enough about that. _please_.

I'd like to get going with the new frontend stuff. Have you implemented any of your frontend proposal yet? I was thinking about trying to convert the
tda1004x to using it and seeing how it went.
the pseudo-code was just braindumping the ideas while writing the mail. It would be great to get a 'real' testcase.

Our current project has nothing to do with DVB, but I can send you the i2c driver-replacement code (off-list) if you want.

The project before had the early mt352 linux driver as side-product, see the early CVS revisions of this file as reference (http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/linux/drivers/media/dvb/frontends/mt352.c?rev=1.1&content-type=text/x-cvsweb-markup). This code is now running on a microcontroller, mt352_read/write() are directly calling the i2c_read/write() functions. The i2c implementation consists of 115 lines of code for this example, the mt352 driver including scan code 299 loc.

In the kernel driver only opaque structs are passed, it knows nothing about i2c nor the actual hardware. We plan to submit this kernel driver this autumn as soon the hardware is widely available.

I'd be happy to help whereever possible in porting the tda1004x driver, let's contact off-list.

Holger




Home | Main Index | Thread Index