Mailing List archive

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

[linux-dvb] Re: NEWSTRUCT questions



Johannes Stezenbach wrote:
> On Wed, Oct 23, 2002 at 03:34:08PM +0200, Florian Schirmer wrote:
> 
>>>NEWSTRUCT is history...
>>
>>Doh. This was a naming issue. No idea how to call the current api. Maybe 
>>newapi :D 
> 
> 
> According to include/linux/dvb/version.h we call it "DVB_API_VERSION 3".
> 
> 
> 
>>My idea is to extend the dvb_i2c layer with some kind of gateway/bridge to the 
>>linux i2c layer. dvb_i2c will try to probe its internal busses first and then 
>>fallback to linux i2c if no devices could be attached.
>>
>>Would you accept a patch for that? This will result in a dependency to the 
>>i2c_core. If a dependency is not acceptable it is possible to make it a 
>>compile time option.
> 
> 
> Holger was mumbling something about a wrapper driver, like the one
> Ralph mentions in his posting. But I don't know the details, so I
> leave it up to Holger to answer that (tomorrow, Holger's taken the
> day off).

it's not to hard. When you have a master_xfer() function for i2c-core 
and assuming that i2c->data contains the i2c-core i2c_adapter pointer 
you just can write a second one like this:

static
int dvb_master_xfer(struct dvb_i2c_bus *i2c, struct i2c_msg *msg, int num)
{
	return master_xfer (i2c->data, msg, num);
}

Then you call dvb_register_i2c_bus() additionally to the dvb-core 
rigistration functions. So you register your bus to both the i2c-core 
and the dvb-core.

Holger



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index