Mailing List archive

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

[linux-dvb] Re: Proposal for new frontend architecture



On Thursday 16 Sep 2004 12:00, Gerd Knorr wrote:
> > > I've been implementing this suggestion. One reason I prefer having a
> > > flag in the adapter (as opposed to i2c_add_adapter_noprobe()) is the
> > > following situation:
> > >
> > > i2c_add_adapter_noprobe()
> > > .... hardware communicates with EEPROM
> > > .... in the meantime, another module is loaded which registers an
> > > i2c_driver with the I2C_DF_NOTIFY flag set - this will attempt to
> > > register this new driver with the the partially initialised adapter.
> > > ....
>
> Yep, for that a flag probably works better.
>
> > However, I think I would prefer to be able to just say NOPROBE once and
> > for all and only have to worry about things registering themselves when I
> > specifically call i2c_adapter_probe_drivers().
>
> i2c_adapter_probe_drivers() probably should (a) clear the NOPROBE flags
> and (b) refuse to probe (again) if NOPROBE is already cleared (maybe
> even BUG() on that).  That way the probing is really just delayed to
> solve initialization order problems, any modules loaded after the
> i2c_adapter_probe_drivers() call will still be probed.
>
> If you don't want autoprobing you must never ever call
> i2c_adapter_probe_drivers().  Do the probing exactly one when you'll
> call i2c_adapter_probe_drivers() is silly and would introduce all kinds
> of strange module load order bugs.  Don't even think about that.
>
> i2c_adapter_enable_probing() would probably a better name to make clear
> what it actually does.

Yeah - I was wondering about that.

What I originally thought was that i2c_adapter_probe_drivers() should not 
re-enable probing. If you want to do that, you're perfectly free to mask off 
the I2C_AF_NOPROBE flag when you want to reenable it. 

But yeah - there is still the issue of someone calling it twice... and we can 
always stop things from attaching themselves later using the other mechanisms 
we've just added.




Home | Main Index | Thread Index