On 11/6/07, Jean Delvare <[EMAIL PROTECTED]> wrote: > Hi Scott, Jon, > > On Mon, 05 Nov 2007 14:51:51 -0600, Scott Wood wrote: > > Jon Smirl wrote: > > > How about renaming the old driver file and leaving it hooked to ppc? > > > Then it would get deleted when ppc goes away. That would let work > > > progress on the powerpc version. > > > > Or we could have one driver that has two probe methods. I don't like > > forking the driver. > > I agree with Scott here, I don't want to fork the drivers. It is > possible (and easy) to support both methods in the same module, let's > just to that. See for example David Brownell's work on the lm75 driver: > http://lists.lm-sensors.org/pipermail/lm-sensors/2007-September/021270.html
I agree that it is easy to make make a chip driver support both new and old style. But when I call i2c_new_device() on an old style chip driver it exits saying that it doesn't work for the old style adapters. Checks for is_newstyle_driver() are in the i2c_new_device code. That's what caused me to rewrite the rtc-pcf8563 driver for the new style. This probably related to probing, I have to pass the address in struct i2c_board_info. The old style drivers don't support having their address passed in. This may be complicated by the fact that the rtc drivers I'm working on are not probable. That's why I want to add device tree support for them. If this is going to work on an old style driver, how do I get the address to it? -- Jon Smirl [EMAIL PROTECTED] _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev