On Wed, 4 Jul 2007, Segher Boessenkool wrote: > > be filled by respective drivers themselves. > > That would be nicer yes, but a bigger change.
Aha, but nicer!:-) > > For this to work i2c would need something similar to what pci, usb do - > > register supported device ids. The only difference is that instead of > > numerical IDs we have to use plain text names for i2c devices... > > Yeah, that would be nice. Are you suggesting the Linux I2C > layer should use "OF-style" names as its "native" naming > scheme? I'd rather keep the namespaces separate, coupling > them always seems like a great idea and always turns out a > disaster. Sorry, I'm probably missing something here. What's the principal difference between the "OF-style" and "native" names? Wouldn't "rs5c372b" be a natural name for both the DT "compatible" property and the list of driver supported devices in i2c? The only thing that I can see here is devices with not so obvious names. OTOH, we do want all .dts to use the same name for the same chip, soooo... > > Yes, this is why I put "would". Looks like this is the common powerpc > > practice ATM - to make such a glue to map arbitrary "OF names" to what > > respective drivers react to. Like in the case of the serial driver. > > Yes. This is the most flexible scheme possible and allows > for all kinds of fixups/workarounds in case of broken device > trees (or broken kernel code, for that matter). Well, I think, I might bite. But - mostly for the above argument, i.e., just because it offers slightly more flexibility, doesn't require changes to existing drivers / subsystems... > > But - > > i2c is much more diverse and dynamic than serial, so, maybe it is worth > > thinking about "fixing" i2c? > > Be my guest :-) I care more about the OF side of things, but > let me ask anyway -- what do you see as "broken" in the Linux > IIC "core" that needs fixing here? No, I put "fixing" in quotes, i.e., I didn't really mean it was some brokenness. Just nobody needed this until now. Just that device - driver matching in i2c happens based on driver id, not device id, like in pci, usb, maybe others. Thanks Guennadi --- Guennadi Liakhovetski _______________________________________________ Linuxppc-dev mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-dev
